From 45272f9285170d33b212549cec4a30e0f82b9799 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 01:31:45 +0900 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66fffbf..9998336 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,17 +66,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 --all - - run: cargo build --all --no-default-features + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: cargo hack build --all --rust-version + - run: cargo hack build --all --no-default-features --rust-version clippy: runs-on: ubuntu-latest