-
Notifications
You must be signed in to change notification settings - Fork 33
105 lines (83 loc) · 2.48 KB
/
build.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build
on:
push:
pull_request:
# Restrict the GITHUB_TOKEN
permissions: {}
env:
OCAML_DEFAULT_VERSION: 4.08.1
# Add OPAMYES=true to the environment, this is usefill to replace `-y` option
# in any opam call
OPAMYES: true
# Alt-Ergo's depext crashs with with-test flag to yes
# # The with-test flag is set to true to force installation of deps and
# # depext needed to run the alt-ergo tests
# OPAMWITHTEST: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
ocaml-compiler:
- 4.08.1
- 4.14.1
- 5.0.0
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- 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 exec -- make test-deps
- name: Build alt-ergo with opam
run: opam exec -- opam reinstall .
- name: Run tests
run: opam exec -- make runtest-ci
make:
name: Make all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}
dune-cache: true
- name: Install dependencies
run: opam exec -- make deps js-deps
- name: Run make
run: opam exec -- make
- name: Monitor changes
uses: getsentry/action-git-diff-suggestions@main
with:
message: 'The following changes have been made after `make`:'
make_release:
name: Make package release
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use OCaml ${{ env.OCAML_DEFAULT_VERSION }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ env.OCAML_DEFAULT_VERSION }}
dune-cache: true
- name: Install dependencies
run: opam exec -- make deps
- name: Run make install
run: opam exec -- make install