name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
name: clippy (host)
- run: cargo clippy --all-targets --features fs -- -D warnings
name: clippy (fs)
- run: cargo clippy --target thumbv7em-none-eabihf -- -D warnings
name: clippy (no_std)
- run: cargo test
name: test (host)
- run: cargo test --features fs
name: test (fs)
- run: cargo doc --no-deps --features fs
name: doc (as docs.rs)
env:
RUSTDOCFLAGS: -D warnings
- run: cargo run --example std_fs --features fs
name: example (std, fs)
rtic-example:
runs-on: ubuntu-latest
defaults:
run:
working-directory: examples/rtic_nor
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv7em-none-eabihf
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: examples/rtic_nor
- run: cargo fmt --check
- run: cargo clippy --release -- -D warnings
name: clippy
- run: cargo build --release
name: build