From 06b14b97b2c9b9cb92754dc2aae75909164a41ff Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 2 Aug 2022 20:18:08 +0200 Subject: Move RUSTFLAGS from workflow to individual jobs We found that because the "udeps" job runs on nightly and we had "-D warnings" in the RUSTFLAGS, that meant that the nightly compiler failed with stuff that we did it not want to. The solution to this is to specify the "-D warnings" only on jobs where we actually want to deny warnings. That is "cargo-build" and "cargo-test"-jobs, but not linting such as cargo-deny. Suggested-by: Rina Fujino Signed-off-by: Matthias Beyer --- .github/workflows/pull-request-checks.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml index 151df0b9..49080505 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/pull-request-checks.yml @@ -6,7 +6,6 @@ on: env: CARGO_TERM_COLOR: always - RUSTFLAGS: -D warnings jobs: block-fixup: @@ -129,6 +128,8 @@ jobs: cargo-clippy: name: Run cargo clippy runs-on: Ubuntu-20.04 + env: + RUSTFLAGS: -D warnings needs: changes if: ${{ needs.changes.outputs.rust == 'true' || needs.changes.outputs.workflows == 'true' }} @@ -180,6 +181,8 @@ jobs: cargo-test: name: Run cargo test runs-on: Ubuntu-20.04 + env: + RUSTFLAGS: -D warnings needs: [cargo-fmt, cargo-clippy] steps: @@ -216,6 +219,8 @@ jobs: cargo-build: name: Run cargo build runs-on: Ubuntu-20.04 + env: + RUSTFLAGS: -D warnings needs: [cargo-fmt, cargo-clippy] steps: @@ -245,6 +250,8 @@ jobs: cargo_build_arm7_32bit: name: cargo build for armv7 32bit runs-on: Ubuntu-20.04 + env: + RUSTFLAGS: -D warnings needs: [cargo-fmt, cargo-clippy] steps: @@ -271,6 +278,8 @@ jobs: cargo_build_tests_arm7_32bit: name: cargo build tests for armv7 32bit runs-on: Ubuntu-20.04 + env: + RUSTFLAGS: -D warnings needs: [cargo-fmt, cargo-clippy] steps: -- cgit v1.2.3