-
Notifications
You must be signed in to change notification settings - Fork 93
151 lines (147 loc) · 4.89 KB
/
coq-action.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
---
name: CI
on:
push:
branches:
- master
paths-ignore:
- 'lib/**'
pull_request:
paths-ignore:
- 'lib/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# ATTENTION: the "matrix" section must be identical for the "build" and "test" job
# except for the "make_target" field and make_target related excludes
coq_version:
# See https://github.com/coq-community/docker-coq/wiki for supported images
- '8.17'
- '8.18'
- '8.19'
- 'dev'
bit_size:
- 32
- 64
make_target:
- vst
exclude:
- coq_version: 8.17
bit_size: 32
- coq_version: 8.18
bit_size: 32
- coq_version: dev
bit_size: 32
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: coq-community/docker-coq-action@v1
with:
coq_version: ${{ matrix.coq_version }}
# See https://github.com/coq-community/docker-coq-action/tree/v1 for usage
before_install: |
startGroup "Opam config"
opam repo add -y prerelease file://$(pwd)/opam-prerelease
opam update -y
opam config list; opam repo list; opam list
endGroup
install: |
startGroup "Install dependencies"
opam install -y ${{ matrix.coq_version == 'dev' && 'coq-flocq' || matrix.bit_size == 32 && 'coq-compcert-32.3.13.1' || 'coq-compcert.3.13.1' }}
# Required by test2
opam install -y coq-ext-lib
if [ ${{ github.ref_name }} = "755/merge" ]
then
opam repo add -y iris-dev https://gitlab.mpi-sws.org/iris/opam.git
opam install -y coq-iris.dev.2024-02-04.0.0771fa71
fi
endGroup
# See https://github.com/coq-community/docker-coq-action/tree/v1#permissions
before_script: |
startGroup "Workaround permission issue"
sudo chmod -R a=u .
endGroup
script: |
startGroup "Build & Install"
make ${{matrix.make_target}} BITSIZE=${{matrix.bit_size}} COMPCERT=${{ matrix.coq_version=='dev' && 'bundled' || 'platform' }} IGNORECOQVERSION=true IGNORECOMPCERTVERSION=true
endGroup
after_script: |
startGroup 'Copy Opam coq/user-contrib and coq-variant'
cp -R -v "$(opam var lib)"/coq/user-contrib .
mkdir -p "$(opam var lib)"/coq-variant/dummy
cp -R -v "$(opam var lib)"/coq-variant .
endGroup
uninstall:
- name: 'Create archive'
run: tar -cpvzf archive.tgz * .depend
- name: 'Upload archive'
uses: actions/upload-artifact@v2
with:
name: 'VST build artifacts ${{matrix.coq_version}} ${{matrix.bit_size}}'
path: archive.tgz
retention-days: 1
test:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
coq_version:
- '8.17'
- '8.18'
- '8.19'
- 'dev'
make_target:
- assumptions.txt
- test
- test2
- test3
- test4
- test5
bit_size:
- 32
- 64
exclude:
- coq_version: 8.17
bit_size: 32
- coq_version: 8.18
bit_size: 32
- coq_version: dev
bit_size: 32
- bit_size: 64
make_target: test3
- bit_size: 32
make_target: test4
- bit_size: 64
make_target: test5
steps:
- name: 'Download archive'
uses: actions/download-artifact@v2
id: download
with:
name: 'VST build artifacts ${{matrix.coq_version}} ${{matrix.bit_size}}'
- name: 'Extract archive'
run: tar -xvpzf archive.tgz
- uses: coq-community/docker-coq-action@v1
with:
coq_version: ${{ matrix.coq_version }}
install: |
startGroup "Copy downloaded Opam coq/user-contrib and coq-variant"
cp -R -v user-contrib/* "$(opam var lib)"/coq/user-contrib
mkdir -p "$(opam var lib)"/coq-variant
cp -R -v coq-variant/* "$(opam var lib)"/coq-variant
endGroup
before_script: |
startGroup "Workaround permission issue"
sudo chmod -R a=u .
endGroup
script: |
startGroup "Build & Install"
make -f util/make-touch IGNORECOQVERSION=true IGNORECOMPCERTVERSION=true
make ${{matrix.make_target}} BITSIZE=${{matrix.bit_size}} COMPCERT=${{ matrix.coq_version=='dev' && 'bundled' || 'platform' }} IGNORECOQVERSION=true IGNORECOMPCERTVERSION=true
endGroup
uninstall: