Skip to content

Workflow file for this run

name: Build
on: [push]
# Stops the running workflow of previous pushes
concurrency:
# cancel per workflow
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Lint, test and build rust-${{ matrix.toolchain }} ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- beta
- nightly
target:
- thumbv7em-none-eabi
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- run: rustup component add rustfmt
- id: cache-rust
uses: Swatinem/rust-cache@v2
- name: Lint - rustfmt
run: cargo fmt --all -- --check
- name: Lint - clippy
run: cargo clippy --all --no-deps -- -D warnings
- name: Check
run: cargo check
- name: Test
run: cargo test --verbose --lib --bins --tests --benches --example angle
- name: Build docs with --all-features
env:
RUSTDOCFLAGS: -D warnings --cfg docsrs
run: cargo doc --no-deps --all-features
test-no_std_fixed:
name: Test no_std_fixed rust-${{ matrix.toolchain }} ${{ matrix.target }}
strategy:
fail-fast: false
matrix:
toolchain:
- nightly
target:
- thumbv7em-none-eabi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
targets: ${{ matrix.target }}
- run: cargo test --verbose --example no_std_fixed