ci: Refactor jobs to reduce runtime - #535
Merged
Merged
Conversation
Replace the single serial lean-test job with a `build` producer that compiles Ix (and lints every target under --wfail) once and caches the `.lake`, plus a two-suite `test` matrix that restores it: - core: CLI + Aiur tests - tc: Ix.Tc verification, the ~13-min Ix.Tc.Verify proof elaboration, and the production parity/scale run The tc suite keeps its own `lake-tc-*` cache so the proof build persists across commits (Lake's per-module traces guarantee a stale restore only forces a rebuild, never a wrong olean); core restores the base build read-only. This overlaps the proof elaboration with the core suite instead of serializing it, and reuses it on runs that don't touch the typechecker. Required status checks change: `lean-test` is replaced by `Build Ix`, `CLI and Aiur tests`, and `Ix.Tc verification and parity`.
The zkvm-fixture job rebuilt `ix` from scratch just to compile the ~40-constant nataddcomm.ixe closure — duplicating the build job's `ix` compile every run. Move the fixture compile + upload into `build`, and point sp1-build/zisk-build at `needs: build`. Tradeoff: the zkVM execution gates now gate on the full build (Ix + all-targets lint) succeeding, not just `ix` compiling as before. Since `needs` gates on job success regardless, that independence can't be kept while keying the gates off `build`.
Replace the test matrix with two flat jobs — the suites shared only checkout/toolchain setup, so the matrix body was almost entirely `if: matrix.suite` guards. test-core (CLI + Aiur) and test-tc (verification + parity) both `needs: build` and restore the cached base. Replace the Perl source-token sorry audit with a Lean check (Ix.Tc.Verify.Audit.SorryFrontier): it asks the compiler which declarations use `sorryAx` rather than re-lexing Lean source, filters by source module via `getModuleIdxFor?` so macro-emitted names are still caught, and excludes upstream Lean4Lean sorries by namespace. It runs as a `run_cmd` at elaboration (not an executable) so it never links the blake3 and ix_ffi Rust archives, which clash on the Rust allocator.
Move the typechecker job out of ci.yml (which runs per-PR) into ignored.yml's Extended CI tests (push-to-main + workflow_dispatch), renamed test-tc -> tc-test. The ~13-min Ix.Tc.Verify proof elaboration and parity run no longer gate every PR; they run once per merge on main. The job keeps its own lake-tc cache (restore + save, falling back to ci.yml's base build) so the proof elaboration stays incremental across main commits — worthwhile at 1-4 merges/day. Note: the "Ix.Tc verification and parity" check no longer runs on PRs, so remove it from any required-PR-checks branch protection.
The shared zkVM system-deps install (install-zisk/install-sp1) sporadically fails on transient Ubuntu EC2 mirror errors — e.g. a 502 Bad Gateway fetching qemu-system — reding the whole zkVM job. Wrap update+install in a 3-attempt retry loop with backoff, add `-o Acquire::Retries=5` for single-download blips and `--fix-missing` to resume a partial fetch, and fail explicitly after the last attempt.
The .lake cache consumers (lean-test in ci.yml; ignored-test, valgrind-ffi, and tc-test in ignored.yml) restored with `path: .lake`, but lean-action saves under `path: ./.lake`. GitHub hashes the path into a cache entry's version, so the restore computed a different version and missed despite a byte-identical key — the entry existed but was never read, forcing a full rebuild. Align the consumers to ./.lake.
- tc-pins / tc-accel-diff compile their `.ixe` env on demand (Tests.Tc.ParityEnv) rather than silently skipping when IX_PINS_IXE is unset; add a `--exclude` test-runner flag so ignored-test and tc-test partition the ignored suites with no duplication. - report the CI build job's check as `lean-test` (matches branch protection). - correct the build/lint cache comments and the nix flake-check catch-all comment; tidy the SorryFrontier docstring. - shorten the zkVM apt-install retry backoff to 10s.
samuelburnham
marked this pull request as ready for review
August 4, 2026 23:34
arthurpaulino
approved these changes
Aug 5, 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.
push: mainnataddcomm.ixeinto onebuildjob which Lean tests, Zisk and SP1 builds rely on