-
Notifications
You must be signed in to change notification settings - Fork 22
46 lines (40 loc) · 1.69 KB
/
extract_and_run_coq.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
name: Extract and Run - Coq
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: hax
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: ⤵ Install hax
run: |
nix profile install --verbose ./hax
- name: build coverage example
working-directory: hax/examples/coverage
run: |
nix run . into coq
- name: run coq - coverage
working-directory: hax/examples/coverage/proofs/coq/extraction
run: |
sed 's/_impl_f_/_f_/' < Coverage_Test_instance.v > Coverage_Test_instance.v # TODO: this is a hotfix, should be solved in backend and removed from here.
nix-shell --packages coq coqPackages.coq-record-update --run "coq_makefile -f _CoqProject -o Makefile"
nix-shell --packages coq coqPackages.coq-record-update --run "make"
- name: build and run coq on tests
env:
FILES: assert attribute-opaque constructor-as-closure enum-repr enum-struct-variant even
NOT_SUPPORTED_FILES: attributes cli conditional-match cyclic-modules dyn functions
run: |
for f in $FILES; do \
cd hax/tests/$f && \
nix run . into coq && \
cd ../../..
done
for f in $FILES; do \
cd hax/tests/$f/proofs/coq/extraction && \
nix-shell --packages coq coqPackages.coq-record-update --run "coq_makefile -f _CoqProject -o Makefile" && \
nix-shell --packages coq coqPackages.coq-record-update --run "make" && \
cd ../../../../../../
done