From fb47ab163ac4db80f641f94fb7f06a7a9010f8b1 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 04:09:44 +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 d78460f..633b691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,17 +59,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.59'] steps: - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} - - run: cargo build - - run: cargo build --no-default-features + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: cargo hack build --rust-version + - run: cargo hack build --no-default-features --rust-version clippy: runs-on: ubuntu-latest