-
Notifications
You must be signed in to change notification settings - Fork 7
193 lines (178 loc) · 6.18 KB
/
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
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
name: CI (Coq)
on:
push:
branches: [ master , main ]
pull_request:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# N.B. The update-README makefile target pulls information
# about Coq versions from this file, so be careful about the
# presence of COQ_VERSION immediately followed by : in this
# file and about the ordering of the list
COQ_VERSION: ["dev-native", "8.19-native", "8.18-native", "8.17-native", "8.16-native", "8.15", "8.14", "8.13", "8.12", "8.11", "8.10", "8.9", "8.8"]
concurrency:
group: ${{ github.workflow }}-${{ matrix.COQ_VERSION }}-${{ github.head_ref || ( github.ref == 'refs/heads/master' && github.run_id ) || github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: echo build params
run: |
echo "::group::lscpu"
lscpu
echo "::endgroup::"
echo "::group::uname -a"
uname -a
echo "::endgroup::"
echo "::group::lsb_release -a"
lsb_release -a
echo "::endgroup::"
echo "::group::etc/machine.sh"
etc/machine.sh
echo "::endgroup::"
- uses: coq-community/docker-coq-action@v1
with:
coq_version: ${{ matrix.COQ_VERSION }}
ocaml_version: default
custom_script: |
startGroup "install deps"
sudo apt-get -o Acquire::Retries=30 update -q
sudo apt-get -o Acquire::Retries=30 install -y --allow-unauthenticated \
texlive \
texlive-latex-extra \
texlive-bibtex-extra \
texlive-science \
texlive-luatex \
texlive-lang-greek \
lmodern \
biber \
gnuplot-nox \
wget \
curl \
sed \
grep \
pdf2svg \
python3 \
python3-pygments
endGroup
startGroup "lscpu"
lscpu
endGroup
startGroup "uname -a"
uname -a
endGroup
startGroup "etc/machine.sh"
etc/machine.sh
endGroup
startGroup "ocamlc -config"
ocamlc -config
endGroup
startGroup "coqc --config"
coqc --config
endGroup
startGroup "coqc --version"
coqc --version
endGroup
startGroup "echo | coqtop"
true | coqtop
endGroup
sudo chmod -R a=u .
# Work around https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "*"
startGroup 'make -j2 TIMED=1'
make -j2 TIMED=1
endGroup
startGroup 'make perf TIMED=1'
make perf TIMED=1
endGroup
startGroup 'make validate -j2'
make validate -j2
endGroup
startGroup 'make install install-perf'
make install install-perf
endGroup
startGroup 'make copy-perf OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"'
make copy-perf OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"
endGroup
startGroup 'make pdf'
make pdf
endGroup
startGroup 'make doc'
make doc
endGroup
startGroup 'make copy-pdf copy-doc OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"'
make copy-pdf copy-doc OUTPUT="doc-build/${{ matrix.COQ_VERSION }}"
endGroup
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.COQ_VERSION }}
path: doc-build/${{ matrix.COQ_VERSION }}
- name: Aggregate generated files for debugging if job failed
if: ${{ failure() }}
run: |
sudo chmod -R a+rw PerformanceExperiments/ src/ plots/
git ls-files --others -z PerformanceExperiments/ src/ plots/ | xargs -0 tar -czvf generated-files.tar.gz
- name: Upload generated files for debugging if job failed
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: generated-files-${{ matrix.COQ_VERSION }}
path: generated-files.tar.gz
check-all:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- run: echo 'The triggering workflow passed'
if: ${{ needs.build.result == 'success' }}
- run: echo 'The triggering workflow failed' && false
if: ${{ needs.build.result != 'success' }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout repo (only required because of deploy step) # https://github.com/JamesIves/github-pages-deploy-action/issues/335
uses: actions/checkout@v4
- name: Download a Build Artifact
uses: actions/download-artifact@v4
with:
path: doc-build
- name: Deploy pdfs
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: doc-build
SINGLE_COMMIT: true
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' )
deploy-history:
runs-on: ubuntu-latest
needs: build
steps:
- name: checkout repo (only required because of deploy step) # https://github.com/JamesIves/github-pages-deploy-action/issues/335
uses: actions/checkout@v4
- name: Install SSH Client 🔑
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.HISTORY_DEPLOY_KEY }}
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' )
- name: Download a Build Artifact
uses: actions/download-artifact@v4
with:
path: doc-build
- name: Deploy pdfs to history repo
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
REPOSITORY_NAME: coq-community/coq-performance-tests-plots-history
SSH: true
BRANCH: main
FOLDER: doc-build
SINGLE_COMMIT: false
if: github.ref == 'refs/heads/master' && ( github.event_name == 'push' || github.event_name == 'schedule' )