Skip to content

Commit 9b726bc

Browse files
authored
Enable debug assertions in CI. (#20832)
## Which issue does this PR close? - Closes #20831. ## Rationale for this change CI uses release profiles to allow tests to run more quickly (and potentially also to provide more coverage for the most realistic case for end users of the system). But debug assertions can expose real bugs / mistaken assumptions, and so they should be covered in CI as well. ## What changes are included in this PR? Adjust the Rust build profiles which are used in CI to enable debug assertions. ## Are these changes tested? Yes, by CI. ## Are there any user-facing changes? No.
1 parent 6e0dde0 commit 9b726bc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@ unused_qualifications = "deny"
239239
# - ci: derived from `dev` but disables incremental builds and strips dependency
240240
# symbols to keep CI artifacts small and reproducible.
241241
# Run: cargo run --profile ci
242+
# - ci-optimized: derived from `release` but enables debug assertions, and uses
243+
# lighter optimizations. Used for long-running CI tasks.
244+
# Run: cargo run --profile ci-release
242245
#
243246
# If you want to optimize compilation, the `compile_profile` benchmark can be useful.
244247
# See `benchmarks/README.md` for more details.
@@ -260,6 +263,7 @@ strip = false # Retain debug info for flamegraphs
260263

261264
[profile.ci-optimized]
262265
inherits = "release"
266+
debug-assertions = true
263267
codegen-units = 16
264268
lto = "thin"
265269
strip = true
@@ -268,6 +272,7 @@ strip = true
268272
debug = false
269273
inherits = "dev"
270274
incremental = false
275+
debug-assertions = true
271276

272277
# This rule applies to every package except workspace members (dependencies
273278
# such as `arrow` and `tokio`). It disables debug info and related features on

0 commit comments

Comments
 (0)