Skip to content

Try no depext

Try no depext #366

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "5.1.1"
- name: Install dependencies
run: opam install . --deps-only --with-test
- name: Test
run: opam exec -- dune runtest
build:
strategy:
fail-fast: false
matrix:
include:
- name: Windows
uses: windows-latest
ocaml: ocaml-variants.5.1.1+options,ocaml-option-mingw
input-file: illuaminate.exe
output-file: illuaminate-windows-x86_64.exe
dune-flags:
# Copied from https://github.com/ocaml-multicore/eio/blob/main/.github/workflows/main.yml
# - name: Linux
# uses: ubuntu-22.04
# # We don't use flambda as that ends up much buliker than without.
# ocaml: ocaml-variants.5.1.1+options,ocaml-option-musl
# input-file: illuaminate
# output-file: illuaminate-linux-x86_64
# dune-flags: --workspace dune-workspace.release
# - name: macOS
# uses: macos-latest
# ocaml: "5.1.1"
# input-file: illuaminate
# output-file: illuaminate-macos-x86_64
# dune-flags:
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.uses }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml }}
opam-depext: false
opam-repositories: |
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
normal: https://github.com/ocaml/opam-repository.git
- name: Install dependencies
run: opam install . --deps-only
- name: Build release
run: |
opam exec -- dune subst
opam exec -- dune build ${{ matrix.dune-flags }} -p illuaminate @install
opam exec -- dune install --prefix=_install
cp _install/bin/${{ matrix.input-file }} ${{ matrix.output-file }}
- name: Publish executable
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.output-file }}
path: ${{ matrix.output-file }}
if-no-files-found: error
retention-days: 1
upload_archives:
name: Upload Archives
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download executable
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Upload
run: .github/workflows/deploy.sh 2> /dev/null
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}