Skip to content

Add CI: lake build + field-file generator-reproduction checks - #3

Merged
daira merged 1 commit into
mainfrom
add-ci
Jun 27, 2026
Merged

Add CI: lake build + field-file generator-reproduction checks#3
daira merged 1 commit into
mainfrom
add-ci

Conversation

@daira

@daira daira commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Adds .github/workflows/ci.yml — the repo had no CI.

Two independent jobs, so they surface as two separate status checks:

  • Build (lake)leanprover/lean-action@v1 installs the toolchain from lean-toolchain, fetches the Mathlib cache, and runs lake build. That also exercises the in-file native_decide sanity checks (curve points, scalar-mult witnesses, etc.).
  • Field-file generators reproduce — installs PARI/GP, re-runs scripts/gen_pasta.py / scripts/gen_jubjub.py over their committed outputs and git diff --exit-codes CompElliptic/Fields/Pasta.lean / Jubjub.lean. This catches a hand-edit to a generated field file silently drifting from its generator (which had happened to Fields/Pasta.lean).

Triggers on push to main and on all PRs.

🤖 Generated with Claude Code

…nned actions)

Add .github/workflows/ci.yml with two independent jobs (hence two status checks):

- **Build (lake)** — `leanprover/lean-action` installs the toolchain from
  `lean-toolchain`, fetches the Mathlib cache, and runs `lake build` (which also
  runs the in-file `native_decide` sanity checks).
- **Field-file generators reproduce** — installs PARI/GP, re-runs
  `scripts/gen_pasta.py` / `scripts/gen_jubjub.py` over their committed outputs
  and `git diff --exit-code`s `Fields/Pasta.lean` / `Fields/Jubjub.lean`, so a
  hand-edit can no longer silently drift from its generator.

Separate jobs so branch protection can require the build while leaving the
PARI/GP-dependent generator check advisory.

All actions are SHA-pinned (with `# vX.Y.Z` comments) and checkouts use
`persist-credentials: false`. Add .github/workflows/zizmor.yml
(`zizmorcore/zizmor-action`, `min-severity: informational`) to audit the
workflows for unpinned uses, credential persistence, template injection, and
other GitHub-Actions issues — matching `zcash/ironwood`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@daira daira left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-ACK

@daira
daira merged commit 82cf4bc into main Jun 27, 2026
3 checks passed
@daira
daira deleted the add-ci branch June 27, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant