@@ -39,13 +39,14 @@ jobs:
3939 uses : actions/cache/restore@v4
4040 with :
4141 path : _opam
42- key : opam-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
42+ key : opam-${{ runner.os }}-${{ runner.arch }}-fstar1- ${{ github.run_id }}
4343 restore-keys : |
44+ opam-${{ runner.os }}-${{ runner.arch }}-fstar1-
4445 opam-${{ runner.os }}-${{ runner.arch }}-
4546
46- # Build F* master .
47+ # Build F*, from the fstar1 branch .
4748 - run : opam update
48- - run : opam pin -n fstar --dev-repo
49+ - run : opam pin -n fstar git+https://github.com/FStarLang/FStar#fstar1
4950 - run : opam install fstar
5051
5152 # Install karamel deps
6465 # and so far no Karamel regression test suite for EverParse
6566 # requires 3d
6667
68+ # Paranoid delete before saving. Note: run_id is constant across reruns.
6769 - name : Delete OPAM state if it already existed
6870 run : |
69- gh cache delete opam-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} || true
71+ gh cache delete opam-${{ runner.os }}-${{ runner.arch }}-fstar1- ${{ github.run_id }} || true
7072 env :
7173 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7274 GH_REPO : ${{ github.repository }}
7678 uses : actions/cache/save@v4
7779 with :
7880 path : _opam
79- key : opam-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
81+ key : opam-${{ runner.os }}-${{ runner.arch }}-fstar1- ${{ github.run_id }}
8082
8183 build-and-test :
8284 needs : build-deps
9496 - name : Setup ocaml
9597 uses : ocaml/setup-ocaml@v3
9698 with :
97- ocaml-compiler : 4.14.2
99+ ocaml-compiler : 5.3.0
98100
99101 - uses : actions/checkout@master
100102 with :
@@ -103,16 +105,14 @@ jobs:
103105 - name : Restore OPAM state
104106 uses : actions/cache/restore@v4
105107 with :
106- fail-on-cache-miss : true
108+ fail-on-cache-miss : true # should never happen, cache was filled by build-deps
107109 path : _opam
108- key : opam-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
110+ key : opam-${{ runner.os }}-${{ runner.arch }}-fstar1- ${{ github.run_id }}
109111
110112 - uses : actions/setup-node@v4
111113 with :
112114 node-version : 16
113115
114- - run : echo "KRML_HOME=$(pwd)/karamel" >> $GITHUB_ENV
115-
116116 - name : Karamel CI
117117 working-directory : karamel
118118 run : |
@@ -144,7 +144,7 @@ jobs:
144144 - name : Setup ocaml
145145 uses : ocaml/setup-ocaml@v3
146146 with :
147- ocaml-compiler : 4.14.2
147+ ocaml-compiler : 5.3.0
148148
149149 - uses : actions/checkout@master
150150 with :
@@ -153,9 +153,9 @@ jobs:
153153 - name : Restore OPAM state
154154 uses : actions/cache/restore@v4
155155 with :
156- fail-on-cache-miss : true
156+ fail-on-cache-miss : true # should never happen, cache was filled by build-deps
157157 path : _opam
158- key : opam-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }}
158+ key : opam-${{ runner.os }}-${{ runner.arch }}-fstar1- ${{ github.run_id }}
159159
160160 - name : Setup environment
161161 run : |
@@ -193,6 +193,7 @@ jobs:
193193 run : |
194194 git pull && make cbor-extract-krml cose-extract-krml -kj$(nproc)
195195
196+ # Paranoid delete before saving. Note: run_id is constant across reruns.
196197 - name : Delete EverParse cache if it already existed
197198 run : |
198199 gh cache delete everparse-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} || true
@@ -239,17 +240,96 @@ jobs:
239240 - uses : actions/checkout@master
240241 - name : Build the checked-in krmllib
241242 run : |
242- export KRML_HOME=$(pwd)
243243 export CC=${{matrix.cc}}
244+ export KRML_INCLUDEDIR=$(pwd)/include
245+ export KRML_LIBDIR=$(pwd)/krmllib
244246 make -kj$(nproc) -C krmllib/dist/generic -f Makefile.basic
245247
248+ build-and-test-pulse :
249+ runs-on : ubuntu-latest
250+ needs : build-deps
251+ steps :
252+ - name : Setup ocaml
253+ uses : ocaml/setup-ocaml@v3
254+ with :
255+ ocaml-compiler : 5.3.0
256+
257+ # Note, we prefer to restore the -master cache, but if it doesn't exist,
258+ # we restore the latest normal one.
259+ - name : Restore OPAM state
260+ uses : actions/cache/restore@v4
261+ with :
262+ fail-on-cache-miss : true
263+ path : _opam
264+ key : opam-${{ runner.os }}-${{ runner.arch }}-master-${{ github.run_id }}
265+ restore-keys : |
266+ opam-${{ runner.os }}-${{ runner.arch }}-master-
267+ opam-${{ runner.os }}-${{ runner.arch }}-
268+
269+ # Build F*, master branch
270+ - run : opam update
271+ - run : opam pin -n fstar git+https://github.com/FStarLang/FStar#master
272+ - run : opam install fstar
273+
274+ # Save OPAM state, note master- in key.
275+ - name : Save OPAM state
276+ uses : actions/cache/save@v4
277+ with :
278+ path : _opam
279+ key : opam-${{ runner.os }}-${{ runner.arch }}-master-${{ github.run_id }}
280+
281+ - name : Install Z3 with script
282+ run : |
283+ wget https://raw.githubusercontent.com/FStarLang/FStar/refs/heads/master/.scripts/get_fstar_z3.sh -O get_fstar_z3.sh
284+ chmod +x get_fstar_z3.sh
285+ ./get_fstar_z3.sh /usr/local/bin
286+ # If these fail, stop right now.
287+ - run : which z3-4.8.5
288+ - run : which z3-4.13.3
289+
290+ - uses : actions/checkout@master
291+ with :
292+ path : karamel
293+
294+ - uses : actions/setup-node@v4
295+ with :
296+ node-version : 16
297+
298+ - run : echo "KRML_HOME=$(pwd)/karamel" >> $GITHUB_ENV
299+
300+ - name : Karamel CI (test-pulse)
301+ working-directory : karamel
302+ run : |
303+ eval $(opam env)
304+ export OCAMLRUNPARAM=b
305+ make -kj$(nproc) test-pulse
306+
307+ test-eurydice :
308+ runs-on : ubuntu-latest
309+ steps :
310+ - name : Install Nix
311+ uses : DeterminateSystems/nix-installer-action@main
312+
313+ - name : Setup Cachix
314+ uses : cachix/cachix-action@v15
315+ with :
316+ name : hacl
317+
318+ - name : Build and test Eurydice against this Karamel
319+ run : |
320+ nix build -L --no-link \
321+ "github:AeneasVerif/eurydice#checks.x86_64-linux.default" \
322+ --override-input karamel "github:FStarLang/karamel/$GITHUB_SHA"
323+
246324 # A single no-op job to use for branch protection
247325 ciok :
248326 runs-on : ubuntu-latest
249327 if : ${{ cancelled() || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') }}
250328 needs :
251329 - build-and-test
330+ - build-and-test-pulse
252331 - build-krmllib
332+ - test-eurydice
253333 steps :
254334 # Note: this only runs when a dependency fails. If they all succeed,
255335 # this jobs is skipped, which counts as a success.
0 commit comments