Skip to content

Commit

Permalink
Switch to opam 2.2 for CI (#153)
Browse files Browse the repository at this point in the history
* Switch to opam 2.2
* Apply suggestions from code review

Co-authored-by: Hugo Heuzard <[email protected]>
Co-authored-by: Sora Morimoto <[email protected]>
  • Loading branch information
3 people authored Jul 7, 2024
1 parent 5f8e5e2 commit f71e859
Showing 1 changed file with 7 additions and 29 deletions.
36 changes: 7 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,24 @@ jobs:
- windows-latest
- macos-latest
ocaml-compiler:
- 4.14.x
include:
- os: ubuntu-latest
ocaml-compiler: 5.1.x
- os: macos-latest
ocaml-compiler: 5.1.x
- os: windows-latest
ocaml-compiler: ocaml.5.0.0,ocaml-option-mingw
- "4.14"
- "5.2"

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

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: runner.os != 'Windows'
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
opam-depext: true
opam-depext-flags: --with-test

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: runner.os == 'Windows'
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
dra27: https://github.com/dra27/opam-repository.git#windows-5.0
default: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
opam: https://github.com/ocaml/opam-repository.git
dune-cache: true
opam-depext: true
opam-depext-flags: --with-test
- run: opam install . --with-test --deps-only

- name: configure tree
run: opam exec -- ./configure
run: opam exec -- sh ./configure

- name: Build
run: opam exec -- make
Expand All @@ -68,4 +47,3 @@ jobs:
- run: opam install . --with-test

- run: opam exec -- git diff --exit-code
if: ${{ !matrix.skip-test }}

0 comments on commit f71e859

Please sign in to comment.