name: Rust
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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'
- name: Run format check
run: cargo fmt --check --all
- name: Build
run: cargo build --verbose
- name: Run Clippy
run: cargo clippy --all-targets --all-features
- name: Run tests
run: cargo test --verbose