Skip to content

clippy: fixes

clippy: fixes #102

Workflow file for this run

name: Build
# Triggers the workflow on push or pull request events (for any branch in a repository)
on: [ push, pull_request, merge_group ]
env:
CARGO_TERM_COLOR: always
jobs:
build_library_msrv:
strategy:
matrix:
runs-on:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.63.0 # MSRV
- uses: Swatinem/rust-cache@v2
- run: cargo build
- run: rustup target add thumbv7em-none-eabihf
- run: cargo build --target thumbv7em-none-eabihf
build_all_targets:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Install required Linux packages for "audio-visualizer"/cpal/minifb
run: sudo apt update && sudo apt -y install libasound2-dev libxkbcommon-dev
- run: cargo build --all-targets
- run: cargo test --all-targets
# run benchmark: right now, there is no reporting or so from the results
- run: cargo bench
- run: rustup target add thumbv7em-none-eabihf
- run: cargo build --target thumbv7em-none-eabihf
- run: cargo run --release --example mp3-samples
style_checks:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Install required Linux packages for "audio-visualizer"/cpal/minifb
run: sudo apt update && sudo apt -y install libasound2-dev libxkbcommon-dev
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets
- name: Rustdoc
run: cargo doc --document-private-items --no-deps