name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '0 1 * * *'
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -Dwarnings
RUST_BACKTRACE: 1
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
channel: ['1.99', 'stable', 'beta', 'nightly']
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.channel }}
targets: thumbv7m-none-eabi
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --check
- run: cargo test
- run: cargo clippy --all-features
- run: cargo doc --all-features
- run: cargo build --target thumbv7m-none-eabi --no-default-features
working-directory: ci/ensure_no_std
readme:
name: check readme
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: cargo install cargo-readme
- run: '[ "$(< README.md)" = "$(cargo readme)" ]'