-
Notifications
You must be signed in to change notification settings - Fork 5
55 lines (46 loc) · 1.62 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
54
55
name: Opam
on:
- push
- pull_request
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.0]
steps:
- name: Checkout project
uses: actions/checkout@v3.1.0
with:
submodules: "recursive"
# This is supposed to be solved by the time opam 2.2.0 is released
# Hack provided by https://github.com/ocaml/setup-ocaml/issues/529#issuecomment-1142547616
- name: Hack Git CRLF for ocaml/setup-ocaml with MinGW and upstream repository
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
git config --system core.autocrlf input
- name: Setup OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
if: ${{ startsWith(matrix.os, 'windows-') }}
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-repositories: |
default: https://github.com/fdopen/opam-repository-mingw.git#opam2
upstream: 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