Skip to content

ci(unit-tests): split rust-and-cairo + add Swatinem/rust-cache#27

Merged
saroupille merged 1 commit into
trilitech:mainfrom
saroupille:chore/ci-split-rust-cairo
May 10, 2026
Merged

ci(unit-tests): split rust-and-cairo + add Swatinem/rust-cache#27
saroupille merged 1 commit into
trilitech:mainfrom
saroupille:chore/ci-split-rust-cairo

Conversation

@saroupille
Copy link
Copy Markdown
Collaborator

Why

The combined rust-and-cairo job started clipping cold runs once the wallet test suite grew. PR #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):

##[error]The runner has received a shutdown signal. This can happen when 
the runner service is stopped, or a manually started runner is canceled.

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-minutes isn'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:

  1. Split rust-and-cairo into two parallel jobsrust-tests and cairo-tests. Each gets its own runner / wallclock budget. Cairo no longer waits on Rust completion; 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 should drop 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.

Test plan

  • This PR's own CI is the primary signal. First run is cold (no cache hit yet) — should still complete inside the per-job budget since Rust and Cairo aren't sequential anymore.
  • Subsequent main runs warm-cache: expect ~3-4 min wallclock per job vs ~9 min today.
  • No semantic test change. All existing tests still run, just split across two runners.

🤖 Generated with Claude Code

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.
@saroupille saroupille force-pushed the chore/ci-split-rust-cairo branch from 1141812 to bd9eead Compare May 10, 2026 17:29
@saroupille saroupille merged commit fed9743 into trilitech:main May 10, 2026
2 checks passed
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.

2 participants