ci: disable incremental compilation and debug info in CI#9
Open
huth-stacks wants to merge 1 commit into
Open
Conversation
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.
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
Disable incremental compilation and debug info generation in the CI test cache build.
Why
Two env var defaults hurt CI performance:
CARGO_INCREMENTAL (default: 1 in dev profile): Incremental compilation adds tracking
overhead (~10%) to clean builds and bloats the target directory, making cache save/restore
slower. CI builds are almost always clean — there's no prior state to be incremental against.
Every major Rust CI optimization guide recommends
CARGO_INCREMENTAL=0.CARGO_PROFILE_DEV_DEBUG (default: 2): Full debug info increases binary size, link time,
and cache size. CI runners don't need debug symbols for interactive debugging.
The Change
In
.github/workflows/create-cache.yml, add two env vars:2 lines added in 1 file.
Metrics to Track
Security Checklist
Part of CI Optimization Series
PR 8. Quick-win env var optimizations.