name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: ๐ฅ Checkout code
uses: actions/checkout@v4
- name: ๐ฆ Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: ๐ฆ Install dependencies
run: |
cargo fetch
cargo install cargo-rdme
- name: ๐จ Check formatting
run: cargo fmt --check
- name: ๐ Run cargo check
run: cargo check --all-targets --all-features
- name: ๐งน Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings --allow clippy::precedence
- name: ๐ Check that README.md is up to date
run: cargo rdme --check
- name: โ
Run tests
run: cargo test --all-targets --all-features
- name: โ
Ensure no_std without alloc
run: |
rustup target add thumbv6m-none-eabi
cargo check --target thumbv6m-none-eabi --no-default-features