Repository navigation
ci: build without debug data on CI, where nothing reads it - #14347
Merged
Merged
Conversation
Signed-off-by: Carlos Villela <[email protected]>
Collaborator
Author
Authoring session — opening
|
cv
enabled auto-merge (squash)
November 10, 2026 05:39
Contributor
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.
CI builds of the workspace and its tests no longer generate debug data, which roughly halves the test archives that each contract, integration, and live job downloads. Local
cargo ciruns keep the developer's profile.Problem
Workspace crates build with
debug = 1, and debug sections are more than half of each test executable: in a hostedlinux_arm64contract archive, the largest test binary is 132 MiB, of which about 94 MiB is debug data. Nothing in CI reads it. No workflow or nextest profile setsRUST_BACKTRACE, and panic messages take their file and line from the panic location, not from debug data.Change
CIorGITHUB_ACTIONSis set,cargo cipassesCARGO_PROFILE_DEV_DEBUG=0to the Cargo commands it runs, unless the caller sets that variable. CI backtraces then name functions without line numbers.cargo cisets the variable only for its own Cargo processes, not in a workflow's environment or in.cargo/config.toml, because the Rust cache key hashes both: setting it there would start fresh dependency caches, and setting it in one workflow would separate that workflow's cache key from the live jobs'. Third-party crates already build without debug data, so their cached artifacts stay valid.Beyond CI
Locally on
linux_arm64,cargo ci archivewithCI=truewrote a 112 MiB contract archive, a 33 MiB integration archive, and an 85 MiB live archive, against 214, 73, and 152 MiB with debug data. Switching the variable rebuilt only workspace crates.