-
Notifications
You must be signed in to change notification settings - Fork 47
74 lines (73 loc) · 2.04 KB
/
main.yml
File metadata and controls
74 lines (73 loc) · 2.04 KB
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
name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
run:
name: Build
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- "4.11"
- "4.12"
- "4.14"
- "5.0"
- "5.1"
- "5.2"
- "5.3"
- "5.4"
exclude:
- os: macos-latest
ocaml-compiler: "4.11"
- os: windows-latest
ocaml-compiler: "4.11"
- os: windows-latest
ocaml-compiler: "4.12"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam update -y
- run: opam install . --deps-only --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest
i386:
strategy:
fail-fast: false
matrix:
container-image:
- ocaml/opam:debian-12-ocaml-4.14
- ocaml/opam:debian-12-ocaml-5.4
runs-on: ubuntu-latest
container:
image: ${{ matrix.container-image }}
options: --platform linux/i386
steps:
# GitHub insists on HOME=/github/home which clashes with the opam image setup
- name: Setup, init, and update opam
run: |
sudo cp /usr/bin/opam-2.3 /usr/bin/opam
cd /home/opam && HOME=/home/opam opam init -y
git -C /home/opam/opam-repository pull origin master && HOME=/home/opam opam update -y
- name: Checkout repository
# See https://github.com/actions/checkout/issues/334
uses: actions/checkout@v1
- name: Setup repo and install dependencies
run: |
sudo chown -R opam:opam .
HOME=/home/opam opam install . --deps-only --with-test
- name: Build
run: HOME=/home/opam opam exec -- dune build
- name: Run the testsuite
run: HOME=/home/opam opam exec -- dune runtest