Skip to content

Commit

Permalink
Test minimal versions in CI (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Feb 11, 2024
1 parent b0ba4a6 commit 895c70a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 654 deletions.
23 changes: 7 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ jobs:
rust: ["1.61.0", stable, beta, nightly]
steps:
- uses: actions/checkout@v2

- uses: dtolnay/rust-toolchain@nightly
if: ${{ matrix.rust == '1.61.0' }}
- name: Generate Cargo.lock with minimal-version dependencies
if: ${{ matrix.rust == '1.61.0' }}
run: cargo -Zminimal-versions generate-lockfile

- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Cache Cargo Dependencies
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install MSRV Cargo.lock
if: ${{ matrix.rust == '1.61.0' }}
run: mv Cargo.lock.msrv Cargo.lock
- name: build
run: cargo build -v
- name: test
Expand All @@ -46,16 +50,3 @@ jobs:
with:
components: clippy
- run: cargo clippy --all-features # TODO: enable "-- -D warnings" once all outstanding clippy lints are fixed

verify_msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install or use cached `cargo-msrv`
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-msrv
- name: Install MSRV Cargo.lock
run: mv Cargo.lock.msrv Cargo.lock
- name: Verify Minimum Rust Version
run: cargo-msrv verify
Loading

0 comments on commit 895c70a

Please sign in to comment.