ci: Use cargo-hack's --rust-version flag for msrv check

This respects rust-version field in Cargo.toml, so it removes the need
to manage MSRV in both the CI file and Cargo.toml.
This commit is contained in:
Taiki Endo 2024-01-07 04:40:04 +09:00
parent abb80b96b5
commit 51908bd069
1 changed files with 4 additions and 8 deletions

View File

@ -49,16 +49,12 @@ jobs:
msrv:
runs-on: ubuntu-latest
strategy:
matrix:
# When updating this, the reminder to update the minimum supported
# Rust version in Cargo.toml.
rust: ['1.61']
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
- run: cargo build
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
# memchr feature can have a higher MSRV.
- run: cargo hack build --feature-powerset --skip memchr --rust-version
clippy:
runs-on: ubuntu-latest