Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev quality-of-life improvements (better test backtraces in CI and locally; faster test builds; RUST_BACKTRACE=1 by default) #1603

Merged
merged 5 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
RUST_BACKTRACE = "1"
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ jobs:
- name: Run tests
run: >
cargo test
--release
--workspace
${{ steps.prepare.outputs.feature-flags }}
- name: Run slow tests
run: >
cargo test
--release
--workspace
${{ steps.prepare.outputs.feature-flags }}
--features expensive-tests
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
target
.cargo
66 changes: 0 additions & 66 deletions .gitlab-ci.yml

This file was deleted.

17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,5 +162,22 @@ lto = true
panic = 'abort'
codegen-units = 1

[profile.test]
# Since we have many computationally expensive tests, this changes the test profile to
# compile with optimizations by default, but keep full debug info.
#
# This differs from the release profile in the following ways:
# - it does not set `lto = true`, which increases compile times without substantially
# speeding up tests;
# - it does not set `codegen-units = 1`, which increases compile times and is only
# useful to improve determinism of release builds;
# - it does not set `panic = 'abort'`, which is in any case ignored for tests.
#
# To get results as close as possible to a release build, use `cargo test --release`.
# To speed up compilation and avoid optimizations potentially resulting in lower-quality
# debug info, use `cargo test --profile=dev`.
opt-level = 3
debug = true

[workspace.lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(zcash_unstable, values("zfuture"))'] }
Loading