Skip to content

Commit

Permalink
Merge pull request zcash#1603 from daira/ci-logs-should-have-backtraces
Browse files Browse the repository at this point in the history
Dev quality-of-life improvements (better test backtraces in CI and locally; faster test builds; `RUST_BACKTRACE=1` by default)
  • Loading branch information
daira authored Nov 2, 2024
2 parents 4b7f973 + 5672b30 commit c6db09b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 69 deletions.
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"))'] }

0 comments on commit c6db09b

Please sign in to comment.