Skip to content

Commit

Permalink
Run CI on Windows (#156)
Browse files Browse the repository at this point in the history
* CI: run on Windows

* runs-on: ${{ matrix.setup.os }}

* Try tests on Windows in bash shell

* Use single-line shell-agnostic commands

* windows: don't runtest, just build

---------

Co-authored-by: Antonio Nuno Monteiro <[email protected]>
  • Loading branch information
aantron and anmonteiro authored Nov 17, 2024
1 parent fedaeef commit 48759c1
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,39 @@ concurrency:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
setup:
- {ocaml-version: '4.05', runtest: false}
- {ocaml-version: '4.09', runtest: true}
- {ocaml-version: '4.14', runtest: true}
- {ocaml-version: '5.1', runtest: true}
- {ocaml-version: '5.2', runtest: true}
- {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: false}
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: Install dependencies
run: opam depext -yt mad
- name: Build
if: ${{ ! matrix.setup.runtest }}
run: opam install .
- name: Build and test
- name: Build for testing
if: ${{ matrix.setup.runtest }}
run: opam install -t .
- name: Test
if: ${{ matrix.setup.runtest }}
run: |
opam install -t .
eval $(opam env)
dune build @github_action_tests
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_13, os: ubuntu-latest}
- {ocamlVersion: 4_14, os: ubuntu-latest}
- {ocamlVersion: 5_1, os: ubuntu-latest}
- {ocamlVersion: 5_2, os: ubuntu-latest}
Expand Down

0 comments on commit 48759c1

Please sign in to comment.