Skip to content

test: tidy up tests, disable some tests on windows (#160) #307

test: tidy up tests, disable some tests on windows (#160)

test: tidy up tests, disable some tests on windows (#160) #307

Workflow file for this run

name: Build
on:
pull_request:
branches:
- master
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
setup:
- {ocaml-version: '4.05', os: ubuntu-latest, runtest: false}
- {ocaml-version: '4.09', os: ubuntu-latest, runtest: true}
- {ocaml-version: '4.14', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.1', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.2', os: ubuntu-latest, runtest: true}
- {ocaml-version: '5.2', os: windows-latest, runtest: true}
steps:
- uses: actions/checkout@v4
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.setup.ocaml-version }}
- name: Setup opam
run: opam pin add -n .
- name: Build
if: ${{ ! matrix.setup.runtest }}
run: opam install .
- name: Build for testing
if: ${{ matrix.setup.runtest }}
run: opam install -t .
- name: Test
if: ${{ matrix.setup.runtest }}
run: opam exec -- dune build @github_action_tests
nix-build:
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
setup:
- {ocamlVersion: 4_12, os: ubuntu-latest}
- {ocamlVersion: 4_14, os: ubuntu-latest}
- {ocamlVersion: 5_1, os: ubuntu-latest}
- {ocamlVersion: 5_2, os: ubuntu-latest}
- {ocamlVersion: 5_2, os: macos-latest}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
extra-substituters = https://anmonteiro.nix-cache.workers.dev
extra-trusted-public-keys = ocaml.nix-cache.com-1:/xI2h2+56rwFfKyyFVbkJSeGqSIYMC/Je+7XXqGKDIY=
- name: "Run nix-build"
run: nix-build ./nix/ci/test.nix --argstr ocamlVersion ${{ matrix.setup.ocamlVersion }}