From 4c3dba5a69a188ba50ffd5f2636a13ec911e1b51 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 17 Mar 2025 13:13:34 -0700 Subject: [PATCH] ci: use the MSRV-aware resolver (cherry picked from commit 1875672749c7c5c3fdaa6323d3002bc2a2aa978b) --- .github/workflows/ci.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d8827c..6fa26e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Lock MSRV-compatible dependencies + if: matrix.rust == '1.68.0' + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback + # Note that this uses the runner's pre-installed stable cargo + run: cargo generate-lockfile - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -67,6 +73,12 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Lock MSRV-compatible dependencies + if: matrix.rust == '1.68.0' + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback + # Note that this uses the runner's pre-installed stable cargo + run: cargo generate-lockfile - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} @@ -108,7 +120,10 @@ jobs: - uses: taiki-e/install-action@v2 with: tool: cargo-hack - - run: cargo +nightly hack generate-lockfile --remove-dev-deps -Z direct-minimal-versions + - name: Lock minimal direct dependencies + run: cargo +nightly hack generate-lockfile --remove-dev-deps -Z direct-minimal-versions + env: + CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback - name: Build (nightly) run: cargo +nightly build --verbose --all-features - name: Build (MSRV)