Skip to content

Commit f4cd3af

Browse files
Merge branch 'main' into docs/state-2026-07-29
2 parents 4e8f5cd + 7f6cb79 commit f4cd3af

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/coq-proof-gate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ jobs:
2828
coq-proofs:
2929
runs-on: ubuntu-latest
3030
timeout-minutes: 30
31+
# The image ships bash 5.2, but GitHub fell back to `sh -e {0}` (dash) on
32+
# the first run, which rejects `set -o pipefail` and the bash-only string
33+
# operations below. Declare the shell explicitly rather than depending on
34+
# the runner's detection.
35+
defaults:
36+
run:
37+
shell: bash
3138
container:
3239
# coqorg/coq:8.20 — pinned by digest. `formal/README.adoc` documents 8.18;
3340
# the corpus was verified to check clean on 8.20.1 (deprecation warnings
@@ -37,6 +44,23 @@ jobs:
3744
steps:
3845
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3946

47+
# The coqorg images install Coq into an opam switch owned by the `coq`
48+
# user and put it on PATH via an ENTRYPOINT wrapper. GitHub Actions
49+
# overrides the entrypoint for job containers, so that wrapper never
50+
# runs and `coqc` is not on PATH — the switch has to be added by hand.
51+
# Globbed rather than hard-coded so an image bump does not silently
52+
# break the gate; fails loudly if the switch cannot be located.
53+
- name: Put the image's opam switch on PATH
54+
run: |
55+
set -euo pipefail
56+
sw="$(ls -d /home/coq/.opam/*/bin 2>/dev/null | head -1 || true)"
57+
if [ -z "$sw" ] || [ ! -x "$sw/coqc" ]; then
58+
echo "::error::could not locate coqc in the image's opam switch"
59+
exit 1
60+
fi
61+
echo "$sw" >> "$GITHUB_PATH"
62+
echo "added $sw to PATH"
63+
4064
- name: Record prover version
4165
run: coqc --version
4266

0 commit comments

Comments
 (0)