Skip to content

A redesign of our error system #355

A redesign of our error system

A redesign of our error system #355

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: 4.14.x
- 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: 4.14.x
input-file: illuaminate.exe
output-file: illuaminate-windows-x86_64.exe
dune-flags:
- name: Linux
uses: ubuntu-22.04
# We don't use flambda as that ends up much buliker than without.
ocaml: ocaml-variants.4.14.0+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: 4.14.x
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 }}
- 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 }}