-
Notifications
You must be signed in to change notification settings - Fork 22
100 lines (94 loc) · 2.7 KB
/
coq-hacspec-lib.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
name: Hacspec - Coq Lib
on:
push:
branches:
- master
pull_request:
branches:
- '**'
jobs:
build:
# the OS must be GNU/Linux to be able to use the docker-coq-action
runs-on: ubuntu-latest
strategy:
matrix:
image:
- 'coqorg/coq:8.18'
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
run: nix build -L
- name: Install the toolchain
run: |
nix profile install nixpkgs#yq
nix profile install .#rustc
nix profile install .
- name: Install tomlq
run: cargo install --git https://github.com/Techcable/tomlq
- name: Set up environment
run: |
echo "::group::Setting up problem matcher"
echo "::add-matcher::./.github/coq-errors.json"
echo "::endgroup::"
- name: Build Coq-Hacspec lib
uses: coq-community/docker-coq-action@v1
with:
opam_file: 'opam/coq-hacspec.opam'
custom_image: ${{ matrix.image }}
- name: Run Coq on Tests
working-directory: tests
run: |
paths=$(tomlq -r '.workspace.members | .[]' Cargo.toml)
for cratePath in $paths; do
crate=$(tomlq -r '.package.name' "$cratePath/Cargo.toml")
for skip in $SKIPLIST; do
if [[ "$skip" == "$crate" || "$skip" == "$crate-$backend" ]]; then
echo "⛔ $crate [$backend] (skipping)"
continue 2
fi
done
for backend in coq; do
echo "::group::$crate [$backend]"
cargo hax -C -p "$crate" \; into "$backend"
coqc $cratePath/proofs/coq/extraction/*.v
echo "::endgroup::"
done
done
env:
SKIPLIST: |
enum-struct-variant
literals
slices
naming
if-let
enum-repr
pattern-or
side-effects
v1-lib
mut_arg
fnmut
mut-ref-functionalization
generics
loops
even
odd
never-type
attributes
attribute-opaque
raw-attributes
traits
reordering
nested-derefs
minimal
basic-structs
ping-pong
noise-kkpsk0
fn-to-letfun
include-flag
recursion
# See also:
# https://github.com/coq-community/docker-coq-action#readme
# https://github.com/erikmd/docker-coq-github-action-demo