Debian Codegraph @

.github/workflows/coq-debian.yml

raw symbols SCIP
1 name: CI (Coq, Debian)
2
3 on:
4 push:
5 branches: [ master , sp2019latest ]
6 pull_request:
7 merge_group:
8 workflow_dispatch:
9 release:
10 types: [published]
11 schedule:
12 - cron: '0 0 1 * *'
13
14 jobs:
15 build:
16
17 strategy:
18 fail-fast: false
19 matrix:
20 include:
21 - debian: "sid"
22 #- debian: "bookworm" # restore once 8.17 lands in Debian stable
23
24 runs-on: 'ubuntu-22.04'
25 name: debian-${{ matrix.debian }}
26 container: debian:${{ matrix.debian }}
27
28 concurrency:
29 group: ${{ github.workflow }}-${{ matrix.debian }}-${{ github.head_ref || github.run_id }}
30 cancel-in-progress: true
31
32 steps:
33 - name: install system dependencies
34 run: |
35 apt-get -o Acquire::Retries=30 update -y
36 apt-get -q -y --allow-unauthenticated -o Acquire::Retries=30 install sudo git make time jq python3 python-is-python3 ocaml coq libcoq-core-ocaml-dev libfindlib-ocaml-dev ocaml-findlib cabal-install js-of-ocaml
37 - uses: actions/checkout@v4
38 with:
39 submodules: recursive
40 - name: work around broken git config
41 run: |
42 git config --global --add safe.directory "*"
43 sudo git config --global --add safe.directory "*"
44 - name: container build params
45 run: etc/ci/describe-system-config.sh
46 - name: make deps
47 run: etc/ci/github-actions-make.sh -j2 deps
48 - name: all-except-generated-and-js-of-ocaml
49 run: etc/ci/github-actions-make.sh -j2 all-except-generated-and-js-of-ocaml
50 - name: generated-files
51 run: etc/ci/github-actions-make.sh -j2 generated-files
52 - run: tar -czvf generated-files.tgz fiat-*/
53 if: failure()
54 - name: upload generated files
55 uses: actions/upload-artifact@v4
56 with:
57 name: generated-files-${{ matrix.debian }}
58 path: generated-files.tgz
59 if: failure()
60 - run: find . -name "*.timing" | xargs tar -czvf timing-files.tgz
61 if: failure()
62 - name: upload generated timing files
63 uses: actions/upload-artifact@v4
64 with:
65 name: timing-files-${{ matrix.debian }}
66 path: timing-files.tgz
67 if: failure()
68 - name: install-standalone-unified-ocaml
69 run: etc/ci/github-actions-make.sh install-standalone-unified-ocaml BINDIR=dist
70 - name: standalone-js-of-ocaml
71 run: etc/ci/github-actions-make.sh -j1 standalone-js-of-ocaml
72 - name: install-standalone-js-of-ocaml
73 run: etc/ci/github-actions-make.sh install-standalone-js-of-ocaml
74 - name: upload standalone files
75 uses: actions/upload-artifact@v4
76 with:
77 name: standalone-${{ matrix.debian }}
78 path: dist/fiat_crypto
79 - name: upload standalone js files
80 uses: actions/upload-artifact@v4
81 with:
82 name: standalone-html-${{ matrix.debian }}
83 path: fiat-html
84 - name: upload OCaml files
85 uses: actions/upload-artifact@v4
86 with:
87 name: ExtractionOCaml-${{ matrix.debian }}
88 path: src/ExtractionOCaml
89 if: always ()
90 - name: upload js_of_ocaml files
91 uses: actions/upload-artifact@v4
92 with:
93 name: ExtractionJsOfOCaml-${{ matrix.debian }}
94 path: src/ExtractionJsOfOCaml
95 if: always ()
96 - name: standalone-haskell
97 run: etc/ci/github-actions-make.sh -j1 standalone-haskell GHCFLAGS='+RTS -M7G -RTS'
98 - name: upload Haskell files
99 uses: actions/upload-artifact@v4
100 with:
101 name: ExtractionHaskell-${{ matrix.debian }}
102 path: src/ExtractionHaskell
103 if: always ()
104 - name: only-test-amd64-files-lite
105 run: etc/ci/github-actions-make.sh -j2 only-test-amd64-files-lite SLOWEST_FIRST=1
106 - name: install
107 run: sudo etc/ci/github-actions-make.sh EXTERNAL_DEPENDENCIES=1 SKIP_COQSCRIPTS_INCLUDE=1 install install-standalone-ocaml
108 - name: install-without-bedrock2
109 run: sudo etc/ci/github-actions-make.sh EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 install-without-bedrock2 install-standalone-ocaml
110 - name: install-dev
111 run: sudo etc/ci/github-actions-make.sh EXTERNAL_REWRITER=1 EXTERNAL_COQPRIME=1 install install-standalone-ocaml
112 - name: display timing info
113 run: cat time-of-build-pretty.log
114 - name: display per-line timing info
115 run: etc/ci/github-actions-display-per-line-timing.sh
116
117 test-standalone-host:
118 strategy:
119 fail-fast: false
120 matrix:
121 include:
122 - debian: sid
123 #- debian: bookworm # restore once 8.17 lands in Debian stable
124 runs-on: ubuntu-latest
125 needs: build
126 steps:
127 - uses: actions/checkout@v4
128 - name: Download standalone ${{ matrix.debian }}
129 uses: actions/download-artifact@v4
130 with:
131 name: standalone-${{ matrix.debian }}
132 path: dist/
133 - name: List files
134 run: find dist
135 - run: chmod +x dist/fiat_crypto
136 - name: host build params
137 run: etc/ci/describe-system-config.sh
138 - name: Test files (host)
139 run: |
140 echo "::group::file fiat_crypto"
141 file dist/fiat_crypto
142 echo "::endgroup::"
143 echo "::group::ldd fiat_crypto"
144 ldd dist/fiat_crypto
145 echo "::endgroup::"
146 etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto || {
147 printf '::warning::Debian ${{ matrix.debian }} binary does not run on ubuntu: %s\n' \
148 "$(etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto 2>&1 | tr '\n' '~' | sed 's/~/%0A/g')";
149 }
150
151 test-standalone-container:
152 strategy:
153 fail-fast: false
154 matrix:
155 include:
156 - debian: sid
157 #- debian: bookworm # restore once 8.17 lands in Debian stable
158 runs-on: ubuntu-latest
159 container: debian:${{ matrix.debian }}
160 needs: build
161 steps:
162 - uses: actions/checkout@v4
163 - name: Download standalone ${{ matrix.debian }}
164 uses: actions/download-artifact@v4
165 with:
166 name: standalone-${{ matrix.debian }}
167 path: dist/
168 - name: install system dependencies
169 run: |
170 apt-get -o Acquire::Retries=30 update -y
171 apt-get -q -y --allow-unauthenticated -o Acquire::Retries=30 install sudo time file
172 - name: List files
173 run: find dist
174 - run: chmod +x dist/fiat_crypto
175 - name: host build params
176 run: etc/ci/describe-system-config.sh
177 - name: Test files (container)
178 run: |
179 echo "::group::file fiat_crypto"
180 file dist/fiat_crypto
181 echo "::endgroup::"
182 echo "::group::ldd fiat_crypto"
183 ldd dist/fiat_crypto
184 echo "::endgroup::"
185 etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto
186
187 publish-standalone-dry-run:
188 runs-on: ubuntu-latest
189 needs: build
190 # permissions:
191 # contents: write # IMPORTANT: mandatory for making GitHub Releases
192 steps:
193 - uses: actions/checkout@v4
194 with:
195 fetch-depth: 0 # Fetch all history for all tags and branches
196 tags: true # Fetch all tags as well, `fetch-depth: 0` might be sufficient depending on Git version
197 - name: Download standalone sid
198 uses: actions/download-artifact@v4
199 with:
200 name: standalone-sid
201 path: dist/
202 - name: List files
203 run: find dist
204 - name: Rename files
205 run: |
206 echo "::group::find arch"
207 arch="$(etc/ci/find-arch.sh dist/fiat_crypto "unknown")"
208 tag="$(git describe --tags HEAD)"
209 fname="Fiat-Cryptography_${tag}_Linux_debian_sid_${arch}"
210 echo "$fname"
211 mv dist/fiat_crypto "dist/$fname"
212 find dist
213 # - name: Upload artifacts to GitHub Release
214 # env:
215 # GITHUB_TOKEN: ${{ github.token }}
216 # # Upload to GitHub Release using the `gh` CLI.
217 # # `dist/` contains the built packages
218 # run: >-
219 # gh release upload
220 # '${{ github.ref_name }}' dist/**
221 # --repo '${{ github.repository }}'
222 # if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}
223
224 debian-check-all:
225 runs-on: ubuntu-latest
226 needs: [build, test-standalone-host, test-standalone-container, publish-standalone-dry-run]
227 if: always()
228 steps:
229 - run: echo 'build passed'
230 if: ${{ needs.build.result == 'success' }}
231 - run: echo 'test-standalone-host passed'
232 if: ${{ needs.test-standalone-host.result == 'success' }}
233 - run: echo 'test-standalone-container passed'
234 if: ${{ needs.test-standalone-container.result == 'success' }}
235 - run: echo 'publish-standalone-dry-run passed'
236 if: ${{ needs.publish-standalone-dry-run.result == 'success' }}
237 - run: echo 'build failed' && false
238 if: ${{ needs.build.result != 'success' }}
239 - run: echo 'test-standalone-host failed' && false
240 if: ${{ needs.test-standalone-host.result != 'success' }}
241 - run: echo 'test-standalone-container failed' && false
242 if: ${{ needs.test-standalone-container.result != 'success' }}
243 - run: echo 'publish-standalone-dry-run failed' && false
244 if: ${{ needs.publish-standalone-dry-run.result != 'success' }}