aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-07-05 02:33:29 +0200
committerDario Nieuwenhuis <[email protected]>2021-07-05 02:44:12 +0200
commite4145bf08bdeb1ad6894dac51d3ab2e0d952ee9c (patch)
tree72f60eed47c50a9b4d918f39f40bc9c7c8bca4e2
parentfd38e789572c044e7d26d26379fa00f2adefdb03 (diff)
Deny warnings in CI
-rw-r--r--.github/workflows/rust.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index f4105230d..fc836dfce 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -102,8 +102,15 @@ jobs:
102 with: 102 with:
103 path: target 103 path: target
104 key: ${{ runner.os }}-${{ matrix.target }} 104 key: ${{ runner.os }}-${{ matrix.target }}
105
106 # We have to append the "-D warnings" flag to .cargo/config rather than
107 # using the RUSTFLAGS environment variable because if we set RUSTFLAGS
108 # cargo will ignore the rustflags config in .cargo/config.
105 - name: Check 109 - name: Check
106 run: cd ${{ matrix.package }} && cargo check --features=${{ matrix.features }} --target=${{ matrix.target }} 110 run: |
111 mkdir -p .cargo
112 echo -e '[target."cfg(all())"]\nrustflags = ["-D", "warnings"]' >> .cargo/config
113 cd ${{ matrix.package }} && RUSTFLAGS=-Dwarnings cargo check --features=${{ matrix.features }} --target=${{ matrix.target }}
107 114
108 fmt: 115 fmt:
109 runs-on: ubuntu-latest 116 runs-on: ubuntu-latest