From a2c52f10e7ed13a0f2d570e06e998f2b8dcbaf4d Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 13 Jan 2025 15:59:22 +0200 Subject: [PATCH] ci: Remove some things from `env` (#2336) * 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. * Set `RUST_BACKTRACE: 1` on test steps --- .github/workflows/bench.yml | 2 -- .github/workflows/check.yml | 4 +--- .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 | 3 +-- 7 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 40bab8d59d..d5dd5d6d47 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 efe963b7e0..178c30c093 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 }} @@ -84,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/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 262f3a48ac..84f3c694c4 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: @@ -62,6 +60,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-22.04" ]; then sudo apt-get install -y --no-install-recommends llvm