Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update edition and CI script, and add Cargo.lock.msrv #212

Merged
merged 4 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 37 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,53 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: ["1.61", stable, beta, nightly]
command: [build, test]
rust: ["1.61.0", stable, beta, nightly]
steps:
- uses: actions/checkout@v2
- run: rustup default ${{ matrix.rust }}
- 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 --verbose --no-default-features --features "$FEATURES"
run: cargo build -v
- name: test
run: >
cargo test --tests --benches --no-default-features --features "$FEATURES"
if: ${{ matrix.rust != '1.61' }}
env:
FEATURES: ${{ matrix.features }}
if: ${{ matrix.rust != '1.61.0' }}
run: cargo test -v && cargo doc -v

rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
components: rustfmt
- name: Run rustfmt check
uses: actions-rs/cargo@v1
run: cargo fmt -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
command: fmt
args: -- --check
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
Loading