Skip to content

Commit

Permalink
Use dtolnay's rust toolchain (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
harudagondi authored Dec 17, 2022
1 parent f0165b2 commit abbe0e4
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,53 +28,39 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: rustup toolchain install
uses: dtolnay/rust-toolchain@stable
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: runner.os == 'linux'
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features ${{ matrix.feature }}
- name: Build & run tests
run: cargo test --no-default-features --features ${{ matrix.feature }}

fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: rustup toolchain install
uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Check for correct formatting
run: cargo fmt --all -- --check

clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: rustup toolchain install
uses: dtolnay/rust-toolchain@stable
- run: rustup component add clippy
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run clippy
run: cargo clippy -- -D warnings

miri:
name: miri
Expand Down

0 comments on commit abbe0e4

Please sign in to comment.