-
Notifications
You must be signed in to change notification settings - Fork 29
84 lines (67 loc) · 2.12 KB
/
ci-cn-spec-testing.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
name: CN Spec Testing
on:
pull_request:
push:
branches:
- master
env:
CERBERUS_IMAGE_ID: ghcr.io/rems-project/cerberus/cn:release
# cancel in-progress job when a new push is performed
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
# version: [4.12.0, 4.14.1]
version: [4.14.1]
runs-on: ubuntu-22.04
steps:
- name: Checkout cerberus
uses: actions/checkout@v4
- name: System dependencies (ubuntu)
run: |
sudo apt-get install build-essential libgmp-dev z3 opam cmake lcov
- name: Restore cached opam
id: cache-opam-restore
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: ${{ matrix.version }}
fail-on-cache-miss: true
- name: Install Cerberus
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
opam pin --yes --no-action add cerberus-lib .
opam pin --yes --no-action add cerberus .
opam install --yes cerberus
- name: Install CN
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
opam pin --yes --no-action add cn .
opam install --yes cn ocamlformat.0.26.2
- name: Run CN-runtime CI tests (Cerberus)
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd tests; ./run-cn-exec.sh
- name: Checkout cn-tutorial
uses: actions/checkout@v4
with:
repository: rems-project/cn-tutorial
path: cn-tutorial
ref: cn-runtime-testing # FIXME: remove once the branch is merged
- name: Run CN-runtime CI tests (CN tutorial)
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd cn-tutorial; ./runtime-test.sh
cd ..
- name: Run CN-Test-Gen CI tests
run: |
opam switch ${{ matrix.version }}
eval $(opam env --switch=${{ matrix.version }})
cd tests; ./run-cn-test-gen.sh