ci: eliminate duplicate Rust builds - #480
Merged
Merged
Conversation
Contributor
Author
|
Experiment complete: bounding each Nix derivation to one core made the Linux job exceed its 90-minute timeout (baseline latest main: 57m10s). Closing because this change is decisively worse; findings will inform a compilation-sharing or job-partitioning follow-up. Posted on behalf of @schickling
|
agent-identity: dev3.direct.omp.uyt54www agent-persona: generalist agent-supervisor: unavailable agent-tool: OMP agent-tool-version: 18.1.7 agent-runtime: OMP 18.1.7 tooling-profile: dotfiles@39a19af
schickling-assistant
force-pushed
the
schickling/2026-09-06-ci
branch
from
September 6, 2026 14:04
78f75f2 to
72646b6
Compare
schickling-assistant
marked this pull request as ready for review
September 6, 2026 14:26
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.
Problem
The Linux Nix job regressed from 43 minutes at PR #389 to 57 minutes on recent
main, with a recent PR reaching 88m55s. The tests themselves take seconds. The time was spent compiling the same Rust workspace in isolatedbuildRustPackagederivations, including Wasmtime/Cranelift up to five times.Goal
Restore fast pull-request feedback without removing checks or adding build-system dependencies.
Decisions
target/.check-x86_64-linuxstatus through a small aggregation job.Rejected experiments:
--cores 1: exceeded the 90-minute timeout.Verification
Before:
main(33981691773)33981667111)After, rebased final commit:
Final run: https://github.com/compoundingtech/st2/actions/runs/34038038671
Additional checks:
nix flake check --no-build --system x86_64-linuxpassed.git diff --check origin/main...HEADpassed.cargo fmt --all --checkremains red on files already unformatted onmain; this PR changes no Rust source.nix flake check --no-build --all-systemsreaches the existing nixpkgs rejection of removedx86_64-darwinsupport. Linux and aarch64-darwin are green in the final CI run.This reduces current Linux wall time by 71% versus latest
main, and by 81% versus the recent tail.Complexity
No dependencies or files were added. The flake removes duplicate derivation definitions and adds one small helper for extra Cargo test invocations. The workflow adds a four-row matrix and one stable aggregation job.
Concerns
Linux runner usage increases because four hosted jobs run in parallel. The tradeoff is intentional: compilation sharing reduces duplicated work first, while sharding reduces review latency. The provider chain now sets the practical floor.
Friction & bottlenecks
The failed one-core experiment demonstrated that the job is compilation-work-bound, not test-bound. The bakeoff also exposed an existing flag interaction where
--libselected the st2 library tests inside the provider invocation; the final commands scope each package explicitly and avoid that repeated suite.Follow-ups
None required. A shared cross-job Cargo artifact cache could reduce runner-minutes further, but it would add global build complexity and is not justified by the 16m31s result.
References
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimetooling_profile