-
Notifications
You must be signed in to change notification settings - Fork 5
53 lines (44 loc) · 1.45 KB
/
opam.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Opam
on:
- push
- pull_request
# This will cancel previous runs when a branch or PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ocaml-compiler: [4.12.1, 4.13.1, 4.14.1]
steps:
- name: Checkout project
uses: actions/[email protected]
with:
submodules: "recursive"
- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: ${{ startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
default: https://github.com/ocaml/opam-repository.git
- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: ${{ !startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: Install local dependencies
run: |
opam install . --deps-only --with-test
- name: Build project
run: |
opam exec -- dune build
- name: Run tests
run: |
opam exec -- dune runtest --display=short