From f189a3c159f4b91f50bdf0e9001dd84dc24bf5d9 Mon Sep 17 00:00:00 2001 From: Michael Oultram Date: Tue, 4 Jun 2024 15:25:16 +0100 Subject: [PATCH 1/2] CI: add job to run tests under minimum supported rust version (msrv) --- .github/workflows/ci.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5c8845cb59ca1..166f4d253f9d8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -212,6 +212,38 @@ jobs: - name: "Build" run: cargo build --release --locked + cargo-build-msrv: + name: "cargo build (msrv)" + runs-on: ubuntu-latest + needs: determine_changes + if: ${{ needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main' }} + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - uses: SebRollen/toml-action@v1.2.0 + id: msrv + with: + file: "Cargo.toml" + field: "workspace.package.rust-version" + - name: "Install Rust toolchain" + run: rustup default ${{ steps.msrv.outputs.value }} + - name: "Install mold" + uses: rui314/setup-mold@v1 + - name: "Install cargo nextest" + uses: taiki-e/install-action@v2 + with: + tool: cargo-nextest + - name: "Install cargo insta" + uses: taiki-e/install-action@v2 + with: + tool: cargo-insta + - uses: Swatinem/rust-cache@v2 + - name: "Run tests" + shell: bash + env: + NEXTEST_PROFILE: "ci" + run: cargo +${{ steps.msrv.outputs.value }} insta test --all-features --unreferenced reject --test-runner nextest + cargo-fuzz: name: "cargo fuzz" runs-on: ubuntu-latest From e953b756405c2525171b2d9f9d13dfe432e7ebe7 Mon Sep 17 00:00:00 2001 From: Michael Oultram Date: Tue, 4 Jun 2024 15:34:54 +0100 Subject: [PATCH 2/2] Bump msrv to 1.74 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e8bf342ce83e8..a0b74a5efbd42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] edition = "2021" -rust-version = "1.71" +rust-version = "1.74" homepage = "https://docs.astral.sh/ruff" documentation = "https://docs.astral.sh/ruff" repository = "https://github.com/astral-sh/ruff"