From 37f00793b5f3b17e755086cedea0cc00d663c8bf Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Thu, 9 Jan 2025 17:23:17 +0200 Subject: [PATCH 1/2] ci: Remove some things from `env` 1. `CARGO_TERM_COLOR: always` is always set by `dtolnay/rust-toolchain` 2. `RUST_BACKTRACE` is better set where needed, rather than everywhere. --- .github/workflows/bench.yml | 2 -- .github/workflows/check.yml | 3 --- .github/workflows/clippy.yml | 3 --- .github/workflows/fuzz-bench.yml | 3 --- .github/workflows/machete.yml | 3 --- .github/workflows/rustfmt.yml | 3 --- .github/workflows/sanitize.yml | 2 -- 7 files changed, 19 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index a2c6794a1b..8929764ccd 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -8,8 +8,6 @@ on: env: CARGO_PROFILE_BENCH_BUILD_OVERRIDE_DEBUG: true CARGO_PROFILE_RELEASE_DEBUG: true - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 TOOLCHAIN: stable RUSTFLAGS: -C link-arg=-fuse-ld=lld -C link-arg=-Wl,--no-rosegment, -C force-frame-pointers=yes PERF_OPT: record -F997 --call-graph fp -g diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 34e45fbc94..0e1e1bcc84 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -14,9 +14,6 @@ on: type: boolean required: false default: false -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 84eaded3f7..acd99dfdff 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -8,9 +8,6 @@ on: paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: workflow_dispatch: -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} diff --git a/.github/workflows/fuzz-bench.yml b/.github/workflows/fuzz-bench.yml index 8ef9323207..32c5036365 100644 --- a/.github/workflows/fuzz-bench.yml +++ b/.github/workflows/fuzz-bench.yml @@ -5,9 +5,6 @@ on: branches: ["main"] paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} diff --git a/.github/workflows/machete.yml b/.github/workflows/machete.yml index b1f5c82333..facd9b42d3 100644 --- a/.github/workflows/machete.yml +++ b/.github/workflows/machete.yml @@ -5,9 +5,6 @@ on: branches: ["main"] paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 9c2147d54c..0a6fa7363d 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -8,9 +8,6 @@ on: paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: workflow_dispatch: -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml index 567c137f4f..42beb2d6dc 100644 --- a/.github/workflows/sanitize.yml +++ b/.github/workflows/sanitize.yml @@ -9,8 +9,6 @@ on: merge_group: workflow_dispatch: env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 DUMP_SIMULATION_SEEDS: /tmp/simulation-seeds concurrency: From d8012480e2c15d251101ef36aca9afc4875675eb Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 10 Jan 2025 11:52:19 +0200 Subject: [PATCH 2/2] Set `RUST_BACKTRACE: 1` on test steps --- .github/workflows/check.yml | 1 + .github/workflows/sanitize.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0a1b961bd7..b422fb996b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -81,6 +81,7 @@ jobs: - name: Run tests and determine coverage env: RUST_LOG: trace + RUST_BACKTRACE: 1 run: | DUMP_SIMULATION_SEEDS="$(pwd)/simulation-seeds" export DUMP_SIMULATION_SEEDS diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml index 42beb2d6dc..eaf4269290 100644 --- a/.github/workflows/sanitize.yml +++ b/.github/workflows/sanitize.yml @@ -59,6 +59,7 @@ jobs: RUSTFLAGS: "-Z sanitizer=${{ matrix.sanitizer }}" RUSTDOCFLAGS: "-Z sanitizer=${{ matrix.sanitizer }}" ASAN_OPTIONS: detect_leaks=1:detect_stack_use_after_return=1 + RUST_BACKTRACE: 1 run: | if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then sudo apt-get install -y --no-install-recommends llvm