Skip to content

Commit

Permalink
Replace deprecated actions-rs/toolchain usage
Browse files Browse the repository at this point in the history
The actions-rs/toolchain GitHub action is no longer maintained. Switch
over to using dtolnay/rust-toolchain in its stead.
  • Loading branch information
d-e-s-o committed Jan 17, 2024
1 parent 05cbb33 commit 7a5053f
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,17 @@ env:

jobs:
test:
name: Compile and test Rust ${{ matrix.rust }}
name: Build and test [${{ matrix.rust }}]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.47.0, stable, beta, nightly]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- run: sudo apt-get install libhidapi-dev
- run: cargo build --workspace --bins --tests --verbose
- run: cargo build --workspace --bins --tests --verbose --release
Expand All @@ -41,12 +39,8 @@ jobs:
RUSTFLAGS: -Dwarnings
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.47.0
components: clippy
override: true
- run: cargo clippy --workspace --all-targets --all-features --verbose -- -A unknown_lints -D warnings
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --no-deps --all-targets --all-features -- -A unknown_lints -A deprecated -D warnings

reuse:
name: Check license annotations
Expand All @@ -60,13 +54,11 @@ jobs:
- run: reuse lint

rustfmt:
name: Verify code formatting
name: Check code formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: 1.47.0
components: rustfmt
override: true
- run: cargo fmt --all -- --check
- run: cargo +nightly fmt -- --check

0 comments on commit 7a5053f

Please sign in to comment.