Skip to content

Commit

Permalink
set rustflags for msrv with a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jan 9, 2024
1 parent 60fc721 commit 85b34db
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
merge_group:

env:
RUSTFLAGS: -Dwarnings -Dclippy::all -Dclippy::pedantic
CARGO_HACK_ARGS: --feature-powerset --exclude-features default --group-features base64,serde,arbitrary,hex

jobs:
Expand Down Expand Up @@ -65,9 +64,11 @@ jobs:
msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')"
rustup override set $msrv
rustup component add clippy --toolchain $msrv
- name: Disable warnings and clippy checks on latest
if: matrix.rust == 'latest'
run: echo RUSTFLAGS= >> $GITHUB_ENV
- name: Error on warnings and clippy checks
# Only error on warnings and checks for the msrv, because new versions of
# Rust will frequently add new warnings and checks.
if: matrix.rust == 'msrv'
run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- run: cargo version
Expand Down Expand Up @@ -99,9 +100,11 @@ jobs:
run: |
msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')"
rustup override set $msrv
- name: Disable warnings and clippy checks on latest
if: matrix.rust == 'latest'
run: echo RUSTFLAGS= >> $GITHUB_ENV
- name: Error on warnings and clippy checks
# Only error on warnings and checks for the msrv, because new versions of
# Rust will frequently add new warnings and checks.
if: matrix.rust == 'msrv'
run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- run: cargo version
Expand Down

0 comments on commit 85b34db

Please sign in to comment.