ci: shard windows rust tests across 2 parallel jobs via nextest partitioning - #366
Open
Ziinc wants to merge 3 commits into
Open
ci: shard windows rust tests across 2 parallel jobs via nextest partitioning#366Ziinc wants to merge 3 commits into
Ziinc wants to merge 3 commits into
Conversation
…tioning The windows-latest rust test step alone takes ~16 of the job's ~22 minutes, dominated by jj/git subprocess spawn overhead rather than compute. Splitting into two nextest partitions running in parallel should roughly halve that wall time for the same total CPU cost.
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.
Summary
windows-latest / rust / testjob'scargo nextest runstep alone reports937.090s(~15.6 min) of actual test execution out of the job's ~22 minute total — the tests are dominated by jj/git subprocess spawn overhead (individual tests taking 15-49s each), not CPU-bound work.cargo nextest run --partition count:N/2, so each shard runs roughly half the tests concurrently instead of serially in one job.rust / test / windows-latest (1/2).timeout-minutesfrom 45 to 30 per shard to reflect the expected halved runtime, while leaving headroom.Why this approach
cargo nextest's built-in partitioning (--partition count:N/M) deterministically splits the test binary's test list across shards without needing to hand-maintain a test allowlist per shard, and it composes cleanly with the existingSwatinem/rust-cachestep (both shards share the same cache key since they compile identical test binaries — only which tests run differs).Test plan
rust / test / windows-latest (1/2)andrust / test / windows-latest (2/2)jobs pass in this PR's CI run.Generated by Claude Code