This page is the recommended playbook for routine local validation.
For a routine Lean change, run:
lake buildOn a cold clone, fetch precompiled dependencies first:
lake exe cache get
lake buildlake exe cache get covers Mathlib and its dependencies, which is the expensive half.
It does not cover CompPoly's own modules; lake build compiles those. Downstream
projects that depend on CompPoly do get its prebuilt oleans automatically — see
build-cache.md.
lake buildlake build
lake test./scripts/update-lib.sh
./scripts/check-imports.sh
lake buildCompPoly.lean is generated from tracked CompPoly/**/*.lean files. If it changes,
commit the regenerated file with the source changes.
./scripts/lint-style.shThis is stricter than a plain build. It runs the repository style linter and the
global Lean-file checks in ../../scripts/README.md.
python3 ./scripts/check-docs-integrity.pyRun this when editing AGENTS.md, README.md, CONTRIBUTING.md, or files under
docs/.
lake build CompPolyBench
lake exe CompPolyBench --mediumCI runs a curated subset rather than the full suite, so a new benchmark group must
be added to BENCH_CI_GROUPS in
../../.github/workflows/lean_action_ci.yml
to be covered there. See ../../bench/README.md.
../../.github/workflows/lean_action_ci.ymlruns a warm (incremental)lake buildby default — reusing cached Lake oleans so only dirty modules rebuild — thenlake test, and posts a build-timing report. It also builds and runsCompPolyBench --mediumover the curatedBENCH_CI_GROUPSselection, then uploads benchmark reports as CI artifacts. A full cold rebuild (rm -rf .lake/build && lake build) runs automatically whenlean-toolchainorlake-manifest.jsondiffers from the comparison base (PR base, previous push tip, or merge-base withmainon manual dispatch). You can also force a clean via Actions → Lean Action CI → Run workflow with theclean_buildinput. Ordinary source-only PR/push runs stay warm. Two Actions caches feed the warm path:.lake/packageskeyed onlean-toolchainpluslake-manifest.json, and.lake/buildkeyed additionally per commit. A dependency-cache miss is not expensive, becauselean-actionrunslake exe cache getfor us, so Mathlib's oleans are downloaded rather than compiled.../../.github/workflows/linting.ymlruns the style linter on changed.leanfiles in PRs and push builds.../../.github/workflows/check_imports.ymlchecks thatCompPoly.leanmatches the tracked source tree.../../.github/workflows/docs-integrity.ymlchecks theCLAUDE.mdsymlink, local markdown links, and backticked file paths in the docs.
Four further workflows exist that are not part of the pass/fail gate:
../../.github/workflows/summary.ymlposts a PR summary on open and on every new commit. It runs underpull_request_targetand never builds or executes PR code — it reads the diff and committed source as data — which is what makes that safe for fork PRs.../../.github/workflows/review.ymlruns a PR review on demand only, triggered by a/reviewcomment from a repo member. It is deliberately not run on PR open, because the review path builds and elaborates the PR's Lean code with secrets in scope.../../.github/workflows/update_lean_project.ymlbumps the Lean toolchain and dependencies nightly, and can be dispatched manually.../../.github/workflows/lean_release_tag.ymladds a release tag whenlean-toolchainchanges onmain.
Use the direct scripts when debugging a specific failure:
./scripts/update-lib.sh
./scripts/check-imports.sh
./scripts/lint-style.sh
python3 ./scripts/check-docs-integrity.py
lake test
lake build CompPolyBenchFor more detail on the helper scripts, see
../../scripts/README.md.