diff options
author | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-02 20:18:08 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@ifm.com> | 2022-08-02 20:18:08 +0200 |
commit | 06b14b97b2c9b9cb92754dc2aae75909164a41ff (patch) | |
tree | e3569d2b1e175b0dbcbd08b208fbc186a1805509 | |
parent | f798106c1df4495fec9edebe93415d9883cdaafd (diff) |
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 <rina.fujino@softwareag.com>
Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rw-r--r-- | .github/workflows/pull-request-checks.yml | 11 |
1 files changed, 10 insertions, 1 deletions
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: |