2024-01-19 21:23:47 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ubuntu-latest-cargo-lint-${{ hashFiles('**/Cargo.toml') }}
|
|
|
|
- uses: dtolnay/rust-toolchain@master
|
|
|
|
with:
|
2024-03-04 21:16:31 +00:00
|
|
|
toolchain: 1.76.0
|
2024-01-19 21:23:47 +00:00
|
|
|
components: rustfmt, clippy
|
|
|
|
- name: Install alsa and udev
|
|
|
|
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
|
|
|
|
- name: Run clippy
|
|
|
|
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
|
|
|
|
- name: Check format
|
|
|
|
run: cargo fmt --all -- --check
|