name: Rust on: push: branches: [ main ] pull_request: branches: [ main ] env: CARGO_TERM_COLOR: always jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/cache@v4 with: path: | ~/.rustup/toolchains/stable-* ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-stable-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run clippy run: cargo clippy --all-features --verbose - name: Build run: cargo build --all-features --verbose - name: Run tests run: cargo test --all-features --verbose - name: Test no_std support run: | rustup target add thumbv6m-none-eabi cargo build --verbose --release --no-default-features --target thumbv6m-none-eabi