Debian Codegraph @

.github/workflows/coq-docker.yml

raw symbols SCIP
1 name: CI (Coq, docker, dev)
2
3 on:
4 push:
5 branches: [ master , sp2019latest , v8.6 , v8.8 , v8.10 ]
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 strategy:
17 fail-fast: false
18 matrix:
19 include:
20 - env: { COQ_VERSION: "master", DOCKER_COQ_VERSION: "dev", DOCKER_OCAML_VERSION: "default", SKIP_VALIDATE: "" , COQCHKEXTRAFLAGS: "-bytecode-compiler yes", EXTRA_GH_REPORTIFY: "--warnings", ALLOW_DIFF: "1", CI: "1" }
21 os: 'ubuntu-latest'
22
23 runs-on: ${{ matrix.os }}
24 env: ${{ matrix.env }}
25 name: docker-${{ matrix.env.COQ_VERSION }}
26
27 outputs:
28 coq_image_name: ${{ steps.set-output-step.outputs.coq_image_name }}
29
30 concurrency:
31 group: ${{ github.workflow }}-${{ matrix.env.COQ_VERSION }}-${{ github.head_ref || github.run_id }}
32 cancel-in-progress: true
33
34 steps:
35 - uses: actions/checkout@v4
36 with:
37 submodules: recursive
38 - name: echo host build params
39 run: etc/ci/describe-system-config.sh
40 - name: echo container build params
41 uses: coq-community/docker-coq-action@v1
42 with:
43 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
44 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
45 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
46 custom_script: |
47 eval $(opam env)
48 etc/ci/describe-system-config.sh
49 - name: deps
50 uses: coq-community/docker-coq-action@v1
51 with:
52 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
53 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
54 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
55 custom_script: etc/ci/github-actions-docker-make.sh COQBIN="$(dirname "$(which coqc)")/" -j2 deps
56 - name: all-except-generated-and-js-of-ocaml
57 uses: coq-community/docker-coq-action@v1
58 with:
59 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
60 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
61 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
62 custom_script: etc/ci/github-actions-docker-make.sh ${EXTRA_GH_REPORTIFY} -j2 all-except-generated-and-js-of-ocaml
63 - name: pre-standalone-extracted
64 uses: coq-community/docker-coq-action@v1
65 with:
66 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
67 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
68 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
69 custom_script: etc/ci/github-actions-docker-make.sh ${EXTRA_GH_REPORTIFY} -j2 pre-standalone-extracted
70 - name: upload OCaml files
71 uses: actions/upload-artifact@v4
72 with:
73 name: ExtractionOCaml-${{ matrix.env.COQ_VERSION }}
74 path: src/ExtractionOCaml
75 if: always ()
76 - name: upload js_of_ocaml source files
77 uses: actions/upload-artifact@v4
78 with:
79 name: ExtractionJsOfOCaml-source-${{ matrix.env.COQ_VERSION }}
80 path: src/ExtractionJsOfOCaml
81 if: always ()
82 - name: upload Haskell source files
83 uses: actions/upload-artifact@v4
84 with:
85 name: ExtractionHaskell-source-${{ matrix.env.COQ_VERSION }}
86 path: src/ExtractionHaskell
87 if: always ()
88 - name: install-standalone-unified-ocaml
89 run: make -f Makefile.standalone install-standalone-unified-ocaml BINDIR=dist
90 - name: upload standalone files
91 uses: actions/upload-artifact@v4
92 with:
93 name: standalone-docker-coq-${{ matrix.env.DOCKER_COQ_VERSION }}
94 path: dist/fiat_crypto
95 - run: git config --file .gitmodules --get-regexp path | awk '{ print $2 }' | xargs tar -czvf fiat-crypto-build.tar.gz src
96 - name: Upload built files
97 uses: actions/upload-artifact@v4
98 with:
99 name: build-outputs-docker-coq-${{ matrix.env.DOCKER_COQ_VERSION }}-ocaml-${{ matrix.env.DOCKER_OCAML_VERSION }}
100 path: fiat-crypto-build.tar.gz
101 - run: find . -name "*.timing" | xargs tar -czvf timing-files.tgz
102 if: failure()
103 - name: upload generated timing files
104 uses: actions/upload-artifact@v4
105 with:
106 name: timing-files-${{ matrix.env.COQ_VERSION }}
107 path: timing-files.tgz
108 if: failure()
109 - name: install
110 uses: coq-community/docker-coq-action@v1
111 with:
112 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
113 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
114 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
115 custom_script: |
116 sudo git config --global --add safe.directory "*"
117 sudo make EXTERNAL_DEPENDENCIES=1 SKIP_COQSCRIPTS_INCLUDE=1 COQBIN="$(dirname "$(which coqc)")/" install install-standalone-ocaml
118 - name: install-without-bedrock2
119 uses: coq-community/docker-coq-action@v1
120 with:
121 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
122 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
123 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
124 custom_script: |
125 sudo git config --global --add safe.directory "*"
126 sudo make EXTERNAL_DEPENDENCIES=1 SKIP_BEDROCK2=1 COQBIN="$(dirname "$(which coqc)")/" install-without-bedrock2 install-standalone-ocaml
127 - name: install-dev
128 uses: coq-community/docker-coq-action@v1
129 with:
130 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
131 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
132 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
133 custom_script: |
134 sudo git config --global --add safe.directory "*"
135 sudo make EXTERNAL_REWRITER=1 EXTERNAL_COQPRIME=1 COQBIN="$(dirname "$(which coqc)")/" install install-standalone-ocaml
136 - name: Save COQ_IMAGE
137 uses: coq-community/docker-coq-action@v1
138 with:
139 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
140 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
141 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY COQ_IMAGE GITHUB_ENV
142 custom_script: |
143 echo "COQ_IMAGE=${COQ_IMAGE}" | tee -a $GITHUB_ENV
144 - run: docker save "$COQ_IMAGE" -o image.tar
145 - name: Set coq_image_name Output to ${{ runner.os }}-docker-${{ hashFiles('image.tar') }}
146 id: set-output-step
147 run: echo "coq_image_name=${{ runner.os }}-docker-${{ hashFiles('image.tar') }}" >> $GITHUB_OUTPUT
148 - name: Cache Docker image
149 uses: actions/cache@v4
150 with:
151 path: image.tar
152 key: ${{ runner.os }}-docker-${{ hashFiles('image.tar') }}
153 - name: display timing info
154 run: cat time-of-build-pretty.log
155 - name: display per-line timing info
156 run: etc/ci/github-actions-display-per-line-timing.sh
157
158 validate:
159 strategy:
160 fail-fast: false
161 matrix:
162 include:
163 - env: { COQ_VERSION: "master", DOCKER_COQ_VERSION: "dev", DOCKER_OCAML_VERSION: "default", SKIP_VALIDATE: "" , COQCHKEXTRAFLAGS: "-bytecode-compiler yes", EXTRA_GH_REPORTIFY: "--warnings", ALLOW_DIFF: "1", CI: "1" }
164 os: 'ubuntu-latest'
165
166 runs-on: ${{ matrix.os }}
167 env: ${{ matrix.env }}
168 name: validate-docker-${{ matrix.env.COQ_VERSION }}
169
170 concurrency:
171 group: ${{ github.workflow }}-validate-${{ matrix.env.COQ_VERSION }}-${{ github.head_ref || github.run_id }}
172 cancel-in-progress: true
173
174 needs: build
175
176 steps:
177 - uses: actions/checkout@v4
178 with:
179 submodules: recursive
180 - name: Restore cached Docker image ${{ needs.build.outputs.coq_image_name }}
181 uses: actions/cache@v4
182 with:
183 path: image.tar
184 key: ${{ needs.build.outputs.coq_image_name }}
185 - name: Load Docker image
186 run: docker load -i image.tar
187 - name: Download a Build Artifact
188 uses: actions/download-artifact@v4
189 with:
190 name: build-outputs-docker-coq-${{ matrix.env.DOCKER_COQ_VERSION }}-ocaml-${{ matrix.env.DOCKER_OCAML_VERSION }}
191 path: .
192 - name: Unpack build artifact
193 run: tar --overwrite -xzvf fiat-crypto-build.tar.gz
194 - name: validate
195 uses: coq-community/docker-coq-action@v1
196 with:
197 coq_version: ${{ matrix.env.DOCKER_COQ_VERSION }}
198 ocaml_version: ${{ matrix.env.DOCKER_OCAML_VERSION }}
199 export: CI ALLOW_DIFF COQCHKEXTRAFLAGS GITHUB_STEP_SUMMARY
200 custom_script: etc/ci/github-actions-docker-make.sh TIMED=1 validate COQCHKFLAGS="-o ${COQCHKEXTRAFLAGS}"
201 if: env.SKIP_VALIDATE == '' && github.event_name != 'pull_request'
202
203 build-js-of-ocaml:
204 needs: build
205 runs-on: ubuntu-latest
206 strategy:
207 fail-fast: false
208 matrix:
209 coq-version: [ 'master' ]
210 ocaml-compiler: [ '4.11.1' ]
211 concurrency:
212 group: ${{ github.workflow }}-build-js-of-ocaml-${{ matrix.coq-version }}-${{ matrix.ocaml-compiler }}-${{ github.head_ref || github.run_id }}
213 cancel-in-progress: true
214 steps:
215 - uses: actions/checkout@v4
216 with:
217 submodules: recursive
218 - name: Set up OCaml
219 uses: ocaml/setup-ocaml@v3
220 with:
221 ocaml-compiler: ${{ matrix.ocaml-compiler }}
222 - name: opam install deps
223 run: |
224 eval $(opam env)
225 opam update -y
226 opam install -y js_of_ocaml ocamlfind
227 - name: echo build params
228 run: etc/ci/describe-system-config.sh
229 - name: Download a Build Artifact
230 uses: actions/download-artifact@v4
231 with:
232 name: ExtractionJsOfOCaml-source-${{ matrix.coq-version }}
233 path: src/ExtractionJsOfOCaml
234 - name: standalone-js-of-ocaml
235 run: |
236 eval $(opam env)
237 etc/ci/github-actions-make.sh --warnings -f Makefile.standalone -j2 standalone-js-of-ocaml
238 - name: install-standalone-js-of-ocaml
239 run: make -f Makefile.standalone install-standalone-js-of-ocaml
240 - name: upload js_of_ocaml build files
241 uses: actions/upload-artifact@v4
242 with:
243 name: ExtractionJsOfOCaml-${{ matrix.coq-version }}-ocaml-${{ matrix.ocaml-compiler }}
244 path: src/ExtractionJsOfOCaml
245 if: always ()
246 - name: Upload js_of_ocaml outputs
247 uses: actions/upload-artifact@v4
248 with:
249 name: fiat-html-js-of-ocaml
250 path: fiat-html
251
252 build-wasm-of-ocaml:
253 needs: build
254 runs-on: ubuntu-latest
255 strategy:
256 fail-fast: false
257 matrix:
258 coq-version: [ 'master' ]
259 ocaml-compiler: [ '4.14.1' ]
260 concurrency:
261 group: ${{ github.workflow }}-build-wasm-of-ocaml-${{ matrix.coq-version }}-${{ matrix.ocaml-compiler }}-${{ github.head_ref || github.run_id }}
262 cancel-in-progress: true
263 steps:
264 - uses: actions/checkout@v4
265 with:
266 submodules: recursive
267 - name: Set up OCaml
268 uses: ocaml/setup-ocaml@v3
269 with:
270 ocaml-compiler: ${{ matrix.ocaml-compiler }}
271 - name: echo build params
272 run: etc/ci/describe-system-config.sh
273 - run: opam update -y
274 - name: install wasm_of_ocaml
275 run: opam install -y wasm_of_ocaml-compiler ocamlfind
276 - name: echo build params
277 run: etc/ci/describe-system-config.sh
278 - name: Download a Build Artifact
279 uses: actions/download-artifact@v4
280 with:
281 name: ExtractionJsOfOCaml-source-${{ matrix.coq-version }}
282 path: src/ExtractionJsOfOCaml
283 - name: standalone-wasm-of-ocaml
284 run: |
285 eval $(opam env)
286 etc/ci/github-actions-make.sh --warnings -f Makefile.standalone -j2 standalone-wasm-of-ocaml
287 - name: install-standalone-wasm-of-ocaml
288 run: make -f Makefile.standalone install-standalone-wasm-of-ocaml
289 - name: upload wasm_of_ocaml build files
290 uses: actions/upload-artifact@v4
291 with:
292 name: ExtractionJsOfOCaml-${{ matrix.coq-version }}-ocaml-${{ matrix.ocaml-compiler }}+wasm
293 path: src/ExtractionJsOfOCaml
294 if: always ()
295 - name: Upload wasm_of_ocaml outputs
296 uses: actions/upload-artifact@v4
297 with:
298 name: fiat-html-wasm-of-ocaml
299 path: fiat-html
300
301 deploy-js-wasm-of-ocaml:
302 needs: [build-js-of-ocaml, build-wasm-of-ocaml]
303 runs-on: ubuntu-latest
304 concurrency:
305 group: ${{ github.workflow }}-deploy-js-wasm-of-ocaml-${{ github.head_ref || github.run_id }}
306 cancel-in-progress: true
307 steps:
308 - uses: actions/checkout@v4
309 with:
310 submodules: recursive
311 fetch-depth: 0 # Fetch all history for all tags and branches, for fiat-html/version.js
312 tags: true # Fetch all tags as well, `fetch-depth: 0` might be sufficient depending on Git version
313 - name: Download a Build Artifact
314 uses: actions/download-artifact@v4
315 with:
316 name: fiat-html-js-of-ocaml
317 path: fiat-html
318 - run: find fiat-html
319 - run: ls -la fiat-html
320 - name: Download a Build Artifact
321 uses: actions/download-artifact@v4
322 with:
323 name: fiat-html-wasm-of-ocaml
324 path: fiat-html
325 - run: find fiat-html
326 - run: ls -la fiat-html
327 - run: make -f Makefile.js-html fiat-html/version.js
328 - run: find fiat-html
329 - run: ls -la fiat-html
330 - name: backup .gitignore
331 run: mv .gitignore{,.bak}
332 - name: Deploy js_of_ocaml and wasm_of_ocaml 🚀 ${{ ( github.ref != 'refs/heads/master' && '(dry run)' ) || '' }}
333 uses: JamesIves/[email protected]
334 with:
335 branch: gh-pages # The branch the action should deploy to.
336 folder: fiat-html # The folder the action should deploy.
337 git-config-email: [email protected]
338 target-folder: .
339 single-commit: true # otherwise the repo will get too big
340 dry-run: ${{ github.ref != 'refs/heads/master' }}
341 - name: restore .gitignore
342 run: mv .gitignore{.bak,}
343
344
345 generated-files:
346 needs: build
347 runs-on: ubuntu-latest
348 # Required permissions for creating PRs and pushing branches
349 permissions:
350 contents: write
351 pull-requests: write
352 actions: read
353 strategy:
354 fail-fast: false
355 matrix:
356 coq-version: [ 'master' ]
357 concurrency:
358 group: ${{ github.workflow }}-generated-files-${{ matrix.coq-version }}-${{ github.head_ref || github.run_id }}
359 cancel-in-progress: true
360 steps:
361 - uses: actions/checkout@v4
362 with:
363 submodules: recursive
364 # fetch-depth: 0 is required to checkout a new branch from the PR's head.
365 # persist-credentials: true is needed to push to the new branch.
366 fetch-depth: 0
367 persist-credentials: true
368 - name: Download a Build Artifact
369 uses: actions/download-artifact@v4
370 with:
371 name: ExtractionOCaml-${{ matrix.coq-version }}
372 path: src/ExtractionOCaml
373 - name: make binaries executable
374 run: git check-ignore src/ExtractionOCaml/* src/ExtractionOCaml/*/* | grep -v '\.' | xargs chmod +x
375 - name: generated-files
376 id: generate
377 run: etc/ci/github-actions-make.sh --warnings -f Makefile.examples -j2 generated-files
378 if: github.event_name == 'pull_request'
379 - run: tar -czvf generated-files.tgz fiat-*/
380 if: failure()
381 - name: upload generated files
382 uses: actions/upload-artifact@v4
383 with:
384 name: generated-files-${{ matrix.coq-version }}
385 path: generated-files.tgz
386 if: failure()
387 - name: Commit files and create PR or comment
388 if: failure() && github.event_name == 'pull_request'
389 env:
390 GH_TOKEN: ${{ github.token }}
391 PR_NUMBER: ${{ github.event.pull_request.number }}
392 SOURCE_BRANCH: ${{ github.head_ref }}
393 BASE_REPO: ${{ github.repository }}
394 HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
395 run: |
396 set -euo pipefail # Exit immediately on error
397
398 echo "File generation failed. Committing updated files to a new branch."
399
400 # Configure Git to commit as the github-actions bot
401 git config user.name "github-actions[bot]"
402 git config user.email "github-actions[bot]@users.noreply.github.com"
403
404 # Create a unique, descriptive branch name using slashes for organization
405 NEW_BRANCH="fix/pr${PR_NUMBER}/generated-files"
406 git checkout -b "$NEW_BRANCH"
407
408 # Add only the relevant generated files to the index
409 echo "Adding generated files from 'fiat-*/' directory."
410 git add fiat-*/
411
412 # Crucial check: if no files were changed, the failure was for another reason.
413 # In this case, we exit cleanly to avoid creating an empty commit.
414 if git diff --staged --quiet; then
415 echo "No file changes to commit. The failure was likely not due to outdated generated files."
416 exit 0
417 fi
418
419 git commit -m "chore(generated): Update generated files for #${PR_NUMBER}"
420 git push --set-upstream origin "$NEW_BRANCH"
421
422 # Conditional logic: create a PR for internal branches, or comment for forks.
423 if [[ "$HEAD_REPO" == "$BASE_REPO" ]]; then
424 echo "PR is from a branch on the main repository. Creating a fixup PR."
425
426 # Create a new PR targeting the original PR's branch
427 NEW_PR_URL=$(gh pr create \
428 --title "chore: Update generated files for #${PR_NUMBER}" \
429 --body "This PR was automatically created to update the generated files for #${PR_NUMBER}. It will be automerged." \
430 --base "$SOURCE_BRANCH" \
431 --head "$NEW_BRANCH")
432
433 # Enable automerge, so it merges as soon as checks pass.
434 gh pr merge --auto --squash --delete-branch "$NEW_PR_URL"
435
436 echo "Successfully created and set PR ${NEW_PR_URL} to automerge."
437
438 else
439 echo "PR is from a fork. Commenting on original PR with instructions."
440
441 # For forks, the contributor must create the PR. We provide a convenient link that
442 # pre-fills the PR form on their fork, targeting their own branch.
443 COMPARE_URL="https://github.com/${HEAD_REPO}/compare/${SOURCE_BRANCH}...${BASE_REPO}:${NEW_BRANCH}?expand=1"
444
445 COMMENT_BODY="❌ **Generated files are out of date.**
446
447 You can review the updates in branch \`${NEW_BRANCH}\` and [open a pull request](${COMPARE_URL}) to merge them into your branch."
448
449 gh pr comment "$PR_NUMBER" --body "$COMMENT_BODY"
450
451 echo "Successfully commented on PR #${PR_NUMBER} with instructions."
452 fi
453
454 standalone-haskell:
455 needs: build
456 runs-on: ubuntu-latest
457 strategy:
458 fail-fast: false
459 matrix:
460 coq-version: [ 'master' ]
461 concurrency:
462 group: ${{ github.workflow }}-standalone-haskell-${{ matrix.coq-version }}-${{ github.head_ref || github.run_id }}
463 cancel-in-progress: true
464 steps:
465 - uses: actions/checkout@v4
466 with:
467 submodules: recursive
468 - name: Download a Build Artifact
469 uses: actions/download-artifact@v4
470 with:
471 name: ExtractionHaskell-source-${{ matrix.coq-version }}
472 path: src/ExtractionHaskell
473 - name: standalone-haskell
474 run: etc/ci/github-actions-make.sh -f Makefile.standalone -j1 standalone-haskell GHCFLAGS='+RTS -M9G -RTS'
475 - name: upload Haskell files
476 uses: actions/upload-artifact@v4
477 with:
478 name: ExtractionHaskell-${{ matrix.coq-version }}
479 path: src/ExtractionHaskell
480 if: always ()
481
482
483 test-amd64:
484
485 runs-on: ubuntu-latest
486
487 concurrency:
488 group: ${{ github.workflow }}-test-amd64-${{ github.head_ref || github.run_id }}
489 cancel-in-progress: true
490 needs: build
491
492 steps:
493 - name: checkout repo
494 uses: actions/checkout@v4
495 with:
496 submodules: recursive
497 - name: Download a Build Artifact
498 uses: actions/download-artifact@v4
499 with:
500 name: ExtractionOCaml-master
501 path: src/ExtractionOCaml
502 - name: make binaries executable
503 run: git check-ignore src/ExtractionOCaml/* src/ExtractionOCaml/*/* | grep -v '\.' | xargs chmod +x
504 - name: only-test-amd64-files
505 run: etc/ci/github-actions-make.sh -f Makefile.examples -j2 only-test-amd64-files SLOWEST_FIRST=1
506 env:
507 ALLOW_DIFF: 1
508
509 test-standalone:
510 strategy:
511 fail-fast: false
512 matrix:
513 include:
514 - coq-version: master
515 docker-coq-version: dev
516 docker-ocaml-version: default
517
518 runs-on: ubuntu-latest
519 needs: build
520 steps:
521 - uses: actions/checkout@v4
522 - name: Download standalone Docker
523 uses: actions/download-artifact@v4
524 with:
525 name: standalone-docker-coq-${{ matrix.docker-coq-version }}
526 path: dist/
527 - name: List files
528 run: find dist
529 - run: chmod +x dist/fiat_crypto
530 - name: Test files (host)
531 run: |
532 echo "::group::file fiat_crypto"
533 file dist/fiat_crypto
534 echo "::endgroup::"
535 echo "::group::ldd fiat_crypto"
536 ldd dist/fiat_crypto
537 echo "::endgroup::"
538 etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto
539 - name: Test files (container)
540 uses: coq-community/docker-coq-action@v1
541 with:
542 coq_version: ${{ matrix.docker-coq-version }}
543 ocaml_version: ${{ matrix.docker-ocaml-version }}
544 custom_script: |
545 echo "::group::install dependencies"
546 sudo apt-get update -y
547 sudo apt-get install -y file
548 echo "::endgroup::"
549 echo "::group::file fiat_crypto"
550 file dist/fiat_crypto
551 echo "::endgroup::"
552 echo "::group::ldd fiat_crypto"
553 ldd dist/fiat_crypto
554 echo "::endgroup::"
555 etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto
556
557 publish-standalone-dry-run:
558 runs-on: ubuntu-latest
559 needs: build
560 # permissions:
561 # contents: write # IMPORTANT: mandatory for making GitHub Releases
562 steps:
563 - uses: actions/checkout@v4
564 with:
565 fetch-depth: 0 # Fetch all history for all tags and branches
566 tags: true # Fetch all tags as well, `fetch-depth: 0` might be sufficient depending on Git version
567 - name: Download standalone Docker
568 uses: actions/download-artifact@v4
569 with:
570 name: standalone-docker-coq-dev
571 path: dist/
572 - name: List files
573 run: find dist
574 - name: Rename files
575 run: |
576 echo "::group::find arch"
577 arch="$(etc/ci/find-arch.sh dist/fiat_crypto "unknown")"
578 tag="$(git describe --tags HEAD)"
579 fname="Fiat-Cryptography_${tag}_Linux_docker_dev_${arch}"
580 echo "$fname"
581 mv dist/fiat_crypto "dist/$fname"
582 find dist
583 # - name: Upload artifacts to GitHub Release
584 # env:
585 # GITHUB_TOKEN: ${{ github.token }}
586 # # Upload to GitHub Release using the `gh` CLI.
587 # # `dist/` contains the built packages
588 # run: >-
589 # gh release upload
590 # '${{ github.ref_name }}' dist/**
591 # --repo '${{ github.repository }}'
592 # if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}
593
594 docker-check-all:
595 runs-on: ubuntu-latest
596 needs: [build, validate, build-js-of-ocaml, build-wasm-of-ocaml, deploy-js-wasm-of-ocaml, generated-files, standalone-haskell, test-amd64, test-standalone, publish-standalone-dry-run]
597 if: always()
598 steps:
599 - run: echo 'build passed'
600 if: ${{ needs.build.result == 'success' }}
601 - run: echo 'validate passed'
602 if: ${{ needs.validate.result == 'success' }}
603 - run: echo 'build-js-of-ocaml passed'
604 if: ${{ needs.build-js-of-ocaml.result == 'success' }}
605 - run: echo 'build-wasm-of-ocaml passed'
606 if: ${{ needs.build-wasm-of-ocaml.result == 'success' }}
607 - run: echo 'deploy-js-wasm-of-ocaml passed'
608 if: ${{ needs.deploy-js-wasm-of-ocaml.result == 'success' }}
609 - run: echo 'generated-files passed'
610 if: ${{ needs.generated-files.result == 'success' }}
611 - run: echo 'standalone-haskell passed'
612 if: ${{ needs.standalone-haskell.result == 'success' }}
613 - run: echo 'test-amd64 passed'
614 if: ${{ needs.test-amd64.result == 'success' }}
615 - run: echo 'test-standalone passed'
616 if: ${{ needs.test-standalone.result == 'success' }}
617 - run: echo 'publish-standalone-dry-run passed'
618 if: ${{ needs.publish-standalone-dry-run.result == 'success' }}
619 - run: echo 'build failed' && false
620 if: ${{ needs.build.result != 'success' }}
621 - run: echo 'validate failed' && false
622 if: ${{ needs.validate.result != 'success' }}
623 - run: echo 'build-js-of-ocaml failed' && false
624 if: ${{ needs.build-js-of-ocaml.result != 'success' }}
625 - run: echo 'build-wasm-of-ocaml failed' && false
626 if: ${{ needs.build-wasm-of-ocaml.result != 'success' }}
627 - run: echo 'deploy-js-wasm-of-ocaml failed' && false
628 if: ${{ needs.deploy-js-wasm-of-ocaml.result != 'success' }}
629 - run: echo 'generated-files failed' && false
630 if: ${{ needs.generated-files.result != 'success' }}
631 - run: echo 'standalone-haskell failed' && false
632 if: ${{ needs.standalone-haskell.result != 'success' }}
633 - run: echo 'test-amd64 failed' && false
634 if: ${{ needs.test-amd64.result != 'success' }}
635 - run: echo 'test-standalone failed' && false
636 if: ${{ needs.test-standalone.result != 'success' }}
637 - run: echo 'publish-standalone-dry-run failed' && false
638 if: ${{ needs.publish-standalone-dry-run.result != 'success' }}