ci: all CI pipeline optimizations combined (P0-P7)#8
Open
huth-stacks wants to merge 19 commits into
Open
Conversation
Fixed logical operator in tenure-start block validation to correctly reject blocks where either the coinbase or tenure-change transaction is in the wrong position, not only when both are wrong
Wait for state machine updates before proposing block to avoid the signer rejecting the proposal immediately.
d283796 to
314f520
Compare
3 tasks
314f520 to
ca1ee69
Compare
…-in-signer fix: `continue` instead of `return` on unknown signer
fix: logic error in `is_wellformed_tenure_start_block`
…igner-tests test: fix flakiness in `signer_waits_for_validation_before_signing`
ca1ee69 to
e30f2d5
Compare
The unit-tests job had continue-on-error: true and the check-tests job did not depend on unit-tests, causing test failures to be silently swallowed. Remove continue-on-error and add unit-tests to the check-tests needs array.
The paths-ignore block excluded **.yml files, which meant pushes to master/develop/next containing only workflow file changes would silently skip CI. Remove this exclusion so workflow changes are always validated.
The create-cache workflow waited for rustfmt, changelog-check, and check-release before starting the 15-minute nextest archive build. These gates are independent from compilation. Test workflows already depend on both create-cache and the format checks independently, so format failures still block test results.
Switch nextest-archive, cargo-hack native-targets, and constants-check to ubuntu-latest-m (4 vCPU, 16GB RAM) for faster compilation. The release workflow already uses these runners. Expected ~30-50% faster compilation with negligible cost difference.
Add a Python script that reads JUnit XML timing data from previous CI runs and uses greedy bin-packing to distribute tests into time-balanced partitions. Falls back to hash-based partitioning when no timing data is available (first run, or data expired). New files: .github/scripts/split-tests-by-timing.py - bin-packing script .config/nextest.toml - enables JUnit XML output for CI profile Each partition uploads its JUnit XML as an artifact (90-day retention). On subsequent runs, all partitions download this timing data and the script assigns tests to minimize the slowest partition's duration. POC: inlines the nextest command to test this approach. Production implementation should integrate with stacks-network/actions.
Instead of compiling stacks-inspect from scratch (4+ minutes), the nextest-archive job now generates the constants JSON and uploads it as an artifact. The constants-check job downloads and diffs it, reducing the check from 4 minutes to ~10 seconds. Also adds create-cache to constants-check's needs in ci.yml so the artifact is available before the download step runs.
The clippy workflow explicitly disabled caching, causing full recompilation on every PR. Enable the built-in cargo/target caching from actions-rust-lang/setup-rust-toolchain.
Set CARGO_INCREMENTAL=0 and CARGO_PROFILE_DEV_DEBUG=0 for the test cache build. Incremental compilation adds ~10% overhead on clean CI builds and bloats the target directory. Debug info level 2 (default) increases binary size and link time without benefit in CI where we don't debug interactively.
Remove -Cinstrument-coverage from RUSTFLAGS in create-cache.yml. This eliminates ~15% compilation overhead, ~56% binary size bloat, and per-test .profraw I/O from every PR run. Coverage data is no longer collected per-PR. The coverage report job will skip gracefully. Standard practice for large Rust projects — coverage on merge, not per-PR. Can be restored by reverting this one-line change.
Remove pull_request from cargo-hack-check's trigger condition. Feature combination checks still run on merge queue, releases, and manual dispatch — catching issues before they reach develop. PRs skip this 13-minute job for faster feedback.
e30f2d5 to
a97066b
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.
What
Combined branch with all 7 CI optimization PRs applied together. This measures the aggregate impact.
Individual PRs
Expected Aggregate Impact
Total Lines Changed
~30 lines across 7 files. Each change is independently revertable.
Security Checklist