-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More CI jobs, including a Windows job (#134)
Co-authored-by: Hugo Heuzard <hugo.heuzard@nomadic-labs.com> Co-authored-by: Xavier Leroy <xavier.leroy@college-de-france.fr>
- Loading branch information
1 parent
0aa02d9
commit b139389
Showing
1 changed file
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
# Prime the caches every Monday | ||
- cron: 0 1 * * MON | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
ocaml-compiler: | ||
- 4.14.x | ||
include: | ||
- os: ubuntu-latest | ||
ocaml-compiler: 5.0.x | ||
- os: macos-latest | ||
ocaml-compiler: 5.0.x | ||
- os: windows-latest | ||
ocaml-compiler: ocaml.5.0.0,ocaml-option-mingw | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v2 | ||
if: runner.os != 'Windows' | ||
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 | ||
|
||
- name: configure tree | ||
run: opam exec -- ./configure | ||
|
||
- name: Build | ||
run: opam exec -- make | ||
|
||
- name: Run the testsuite | ||
run: opam exec -- make -C tests test | ||
|
||
- run: opam install . --with-test | ||
|
||
- run: opam exec -- git diff --exit-code | ||
if: ${{ !matrix.skip-test }} |