Add prebuilt Rocq toolchain image for run-experiment's rocq-image#57
Merged
Conversation
run-experiment.yml's `rocq-image` input makes the job run inside a prebuilt container to skip the ~30-min from-source Coq/QuickChick build, but nothing ever built that image — experiment repos pointing `rocq-image` at ghcr.io/<owner>/etna-quickchick:programmable-pbt died with `manifest unknown`. This adds the missing half: * docker/rocq.Dockerfile — reproduces the from-source path exactly: an AFL-instrumented OCaml 5.2.1 switch + Coq (Rocq 9.1.1) + QuickChick (alpaylan/QuickChick#programmable-pbt) + the deps its opam file declares (mathcomp-ssreflect, simple-io, ext-lib, ...). The opam switch paths are baked into the image ENV so each GitHub Actions step's non-login shell finds coqc/dune without `opam env`. Needs libgmp-dev in the apt layer because a bare container has no setup-ocaml to auto-install opam depexts (Coq's zarith -> conf-gmp). etna is not baked in — run-experiment.yml installs it fresh per run, so a copy here would only go stale. * .github/workflows/build-rocq-image.yml — workflow_dispatch (+ push on Dockerfile change) that builds and pushes the image to ghcr.io/<owner>/etna-quickchick. * run-experiment.yml — gate the "Setup OCaml for Coq" and "Install Coq + QuickChick + ExtLib" steps on `inputs.rocq-image == ''`, so supplying an image actually uses it instead of rebuilding the toolchain inside it. Validated by building the image locally and confirming `coqc` loads both QuickChick and mathcomp.ssreflect in a fresh non-login shell. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
run-experiment.yml'srocq-imageinput runs the job inside a prebuilt container to skip the ~30‑min from‑source Coq/QuickChick build — but nothing ever built that image. Experiment repos defaultingrocq-imagetoghcr.io/alpaylan/etna-quickchick:programmable-pbtfail immediately withmanifest unknown(example run). This PR adds the missing half.What
docker/rocq.Dockerfile— reproduces the from‑source path exactly: AFL‑instrumented OCaml 5.2.1 switch (ocaml-variants.5.2.1+options+ocaml-option-afl) + Coq (Rocq 9.1.1) + QuickChick (alpaylan/QuickChick#programmable-pbt) + the deps its opam file declares (mathcomp‑ssreflect, simple‑io, ext‑lib, …). The opam switch paths are baked into the imageENVso each Actions step's non‑login shell findscoqc/dunewithoutopam env.libgmp-devin the apt layer: a bare container has nosetup-ocamlto auto‑install opam depexts, so Coq'szarith→conf-gmp→libgmp-devmust be present (this was the first thing the local build caught).run-experiment.ymlinstalls it fresh per run (latest release), so a copy here would only go stale and tie the image to etna's release‑arch matrix..github/workflows/build-rocq-image.yml—workflow_dispatch(+ push on Dockerfile change) that builds and pushes toghcr.io/<owner>/etna-quickchick.run-experiment.yml— gate the "Setup OCaml for Coq" and "Install Coq + QuickChick + ExtLib" steps oninputs.rocq-image == '', so supplying an image actually uses it instead of rebuilding the toolchain inside it.Validation
Built the image locally (arm64) and confirmed in a fresh non‑login shell:
```
$ docker run --rm etna-quickchick:local-test sh -c 'coqc /tmp/t.v' # imports QuickChick + mathcomp.ssreflect
=== QUICKCHICK + SSREFLECT LOAD OK ===
```
After merge (one‑time)
etna-quickchickpackage visibility to Public so experiment repos under the same owner can pull it.🤖 Generated with Claude Code