ci(unit-tests): split rust-and-cairo + add Swatinem/rust-cache#27
Merged
Merged
Conversation
The combined `rust-and-cairo` job started clipping cold runs once the wallet test suite grew (PR trilitech#25 added the concurrent-fetch + parallel-decrypt machinery; the resulting +16s on `tzel-wallet-app --lib` pushed total wallclock past ~9 min and hit a runner shutdown signal mid-Cairo on the first post-merge main run, SHA 7e48045). Two changes: 1. Split `rust-and-cairo` into `rust-tests` and `cairo-tests` parallel jobs. Each runs on its own ubuntu-latest runner with its own wallclock budget. Cairo doesn't gate on Rust completion any more; failures surface independently. 2. Add `Swatinem/rust-cache@v2.7.8` (SHA-pinned per the workflow's third-party-action convention) to both Rust-touching jobs (`rust-tests` and `ocaml`'s cross-impl interop step). Cargo registry + target/ amortise across runs; cache key bumps on `Cargo.lock` change. Warm runs go from ~9 min cold to ~3-4 min. The `ocaml` job is unchanged structurally — just gains the cargo cache for its Rust cross-impl test. No code changes; workflow-only.
1141812 to
bd9eead
Compare
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
The combined
rust-and-cairojob started clipping cold runs once the wallet test suite grew. PR #25 added the concurrent-fetch + parallel-decrypt machinery; the resulting +16s ontzel-wallet-app --libpushed total wallclock past ~9 min and hit a runner shutdown signal mid-Cairo on the first post-merge main run (SHA7e48045):The Rust unit tests had completed successfully (122 wallet-app tests in 57s, all other crates green). Only the trailing Cairo step got reaped. The org-level cap appears to be a wallclock budget, not a workflow timeout —
timeout-minutesisn't set anywhere in the file.This pattern was also hit transiently on PR #24 before its CI-runtime trim landed; PR #25 added enough additional test work to make it consistent.
What
Two changes in
.github/workflows/unit-tests.yml, no code changes:Split
rust-and-cairointo two parallel jobs —rust-testsandcairo-tests. Each gets its own runner / wallclock budget. Cairo no longer waits on Rust completion; failures surface independently.Add
Swatinem/rust-cache@v2.7.8(SHA-pinned per the workflow's third-party-action convention) to both Rust-touching jobs (rust-testsandocaml's cross-impl interop step). Cargo registry +target/amortise across runs; cache key bumps onCargo.lockchange. Warm runs should drop from ~9 min cold to ~3-4 min.The
ocamljob is unchanged structurally — just gains the cargo cache for its Rust cross-impl test.Test plan
🤖 Generated with Claude Code