-
Notifications
You must be signed in to change notification settings - Fork 16
86 lines (67 loc) · 1.9 KB
/
build-and-test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Build & Test
on:
push: {}
pull_request:
branches:
- master
jobs:
lint:
name: Linting
strategy:
fail-fast: true
matrix:
ocaml-compiler:
- 4.14.x
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: fkirc/skip-duplicate-actions@master
- name: Checkout code
uses: actions/checkout@v4
- name: Check whitespaces
run: ./LINT
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
- name: Install dependencies
run: opam install --locked --deps-only --with-test --with-doc ./beluga.opam
- name: Check format
run: opam exec -- dune fmt
build-and-test:
name: Build & Test
strategy:
fail-fast: true
matrix:
ocaml-compiler:
- 4.14.x
os:
- ubuntu-latest
- macOS-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
# Cancel queued workflows from earlier commits in this branch
- uses: fkirc/skip-duplicate-actions@master
- name: Set git to use LF line ending
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v4
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
- name: Install dependencies
run: opam install --locked --deps-only --with-test --with-doc ./beluga.opam
- name: Build
run: opam exec -- make
- name: Install coreutils on MacOS
if: runner.os == 'macOS'
run: brew install coreutils
- name: Test
run: opam exec -- make test