CI: fix minimal-versions resolution (#593)

To avoid nightly regressions breaking the build, the CI configuration
has been updated to *only* use nightly for resolving Cargo.lock by using
`cargo update -Z minimal-versions`.

Previously, it was running `cargo check` which would attempt to compile
all of the dependencies and the code, which is why the diagnostic bug
was triggered. By avoiding any kind of code compilation using nightly we
can avoid such regressions in the future.

Additionally, the clippy job has been changed to run on the latest
stable release (1.73.0) rather than nightly, which will prevent future
clippy lints from breaking the build. Instead, they can be addressed
when clippy is updated.
This commit is contained in:
Tony Arcieri 2023-10-31 10:04:34 -06:00 committed by GitHub
parent 78a86f1c49
commit 3c85f778b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 10 deletions

View File

@ -134,10 +134,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# First run `cargo +nightly -Z minimal-verisons check` in order to get a # Re-resolve Cargo.lock with minimal versions
# Cargo.lock with the oldest possible deps
- uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/rust-toolchain@nightly
- run: cargo -Z minimal-versions check --no-default-features --features serde - run: cargo update -Z minimal-versions
# Now check that `cargo build` works with respect to the oldest possible # Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV # deps and the stated MSRV
- uses: dtolnay/rust-toolchain@1.60.0 - uses: dtolnay/rust-toolchain@1.60.0

View File

@ -24,10 +24,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Now run `cargo +nightly -Z minimal-verisons check` in order to get a # Re-resolve Cargo.lock with minimal versions
# Cargo.lock with the oldest possible deps
- uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/rust-toolchain@nightly
- run: cargo -Z minimal-versions check --no-default-features --features serde - run: cargo update -Z minimal-versions
# Now check that `cargo build` works with respect to the oldest possible # Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV # deps and the stated MSRV
- uses: dtolnay/rust-toolchain@1.60.0 - uses: dtolnay/rust-toolchain@1.60.0

View File

@ -85,7 +85,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/rust-toolchain@1.73.0
with: with:
components: clippy components: clippy
- run: cargo clippy --target x86_64-unknown-linux-gnu --all-features - run: cargo clippy --target x86_64-unknown-linux-gnu --all-features

View File

@ -24,10 +24,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Now run `cargo +nightly -Z minimal-verisons check` in order to get a # Re-resolve Cargo.lock with minimal versions
# Cargo.lock with the oldest possible deps
- uses: dtolnay/rust-toolchain@nightly - uses: dtolnay/rust-toolchain@nightly
- run: cargo -Z minimal-versions check --no-default-features --features serde - run: cargo update -Z minimal-versions
# Now check that `cargo build` works with respect to the oldest possible # Now check that `cargo build` works with respect to the oldest possible
# deps and the stated MSRV # deps and the stated MSRV
- uses: dtolnay/rust-toolchain@1.60.0 - uses: dtolnay/rust-toolchain@1.60.0