1
- name : CHERI
1
+ # Builds cerberus-cheri and runs CHERI tests
2
+
3
+ name : Cerberus-CHERI
2
4
3
5
on :
4
6
pull_request :
5
7
push :
6
8
branches :
7
9
- master
8
- - cheri-tests
9
10
10
11
env :
11
12
CERBERUS_IMAGE_ID : ghcr.io/rems-project/cerberus/cn:release
@@ -26,33 +27,52 @@ jobs:
26
27
runs-on : ubuntu-22.04
27
28
28
29
steps :
29
- - uses : actions/checkout@v3
30
+
31
+ - name : Checkout Cerberus
32
+ uses : actions/checkout@v4
30
33
31
34
- name : System dependencies (ubuntu)
32
35
run : |
33
36
sudo apt-get install build-essential libgmp-dev opam
34
37
35
- - name : Restore cached opam
38
+ - name : Restore OPAM cache
36
39
id : cache-opam-restore
37
40
uses : actions/cache/restore@v4
38
41
with :
39
42
path : ~/.opam
40
- key : ${{ matrix.version }}
41
- fail-on-cache-miss : true
43
+ key : ${{ matrix.version }}-cheri
42
44
45
+ - name : Setup OPAM
46
+ if : steps.cache-opam-restore.outputs.cache-hit != 'true'
47
+ run : |
48
+ opam init --yes --no-setup --shell=sh --compiler=${{ matrix.version }}
49
+ eval $(opam env --switch=${{ matrix.version }}-cheri)
50
+ opam repo add --yes --this-switch coq-released https://coq.inria.fr/opam/released
51
+ opam pin --yes -n coq-struct-tact https://github.com/uwplse/StructTact.git
52
+ opam repo add --yes --this-switch iris-dev https://gitlab.mpi-sws.org/iris/opam.git
53
+ opam pin --yes -n coq-sail-stdpp https://github.com/rems-project/coq-sail.git#f319aad
54
+ opam pin --yes -n coq-cheri-capabilities https://github.com/rems-project/coq-cheri-capabilities.git#2f02c44ad061d4da30136dc9dbc06c142c94fdaf
55
+
56
+ - name : Save OPAM cache
57
+ uses : actions/cache/save@v4
58
+ if : steps.cache-opam-restore.outputs.cache-hit != 'true'
59
+ with :
60
+ path : ~/.opam
61
+ key : ${{ matrix.version }}-cheri
62
+
43
63
- name : Install Cerberus-CHERI
44
64
if : ${{ matrix.version == '4.14.1' }}
45
65
run : |
46
- opam switch with_coq
47
- eval $(opam env --switch=with_coq )
66
+ opam switch ${{ matrix.version }}-cheri
67
+ eval $(opam env --switch=${{ matrix.version }}-cheri )
48
68
opam pin --yes --no-action add cerberus-lib .
49
69
opam pin --yes --no-action add cerberus-cheri .
50
70
opam install --yes cerberus-cheri
51
71
52
72
- name : Run Cerberus-CHERI CI tests
53
73
if : ${{ matrix.version == '4.14.1' }}
54
74
run : |
55
- opam switch with_coq
56
- eval $(opam env --switch=with_coq )
75
+ opam switch ${{ matrix.version }}-cheri
76
+ eval $(opam env --switch=${{ matrix.version }}-cheri )
57
77
cd tests; USE_OPAM='' ./run-cheri.sh
58
78
cd ..
0 commit comments