diff options
Diffstat (limited to '.github/workflows/rust.yml')
| -rw-r--r-- | .github/workflows/rust.yml | 9 |
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 |
