name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test (x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Check formatting
run: cargo fmt --check
- name: Run clippy
run: cargo clippy --all-targets --all-features
- name: Run unit & integration tests (default features)
run: cargo test --all-targets --all-features
- name: Run tests (no-default-features + libm + full)
run: cargo test --no-default-features --features full,libm
no-std-targets:
name: Build no_std Targets
runs-on: ubuntu-latest
strategy:
matrix:
target:
- thumbv6m-none-eabi - thumbv7em-none-eabi - thumbv7em-none-eabihf - riscv32imc-unknown-none-elf - wasm32-unknown-unknown steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Check build for ${{ matrix.target }} (libm, full)
run: cargo check --target ${{ matrix.target }} --no-default-features --features full,libm
- name: Check build for ${{ matrix.target }} with cortex-m-dsp (if ARM)
if: startsWith(matrix.target, 'thumbv7em')
run: cargo check --target ${{ matrix.target }} --no-default-features --features full,libm,cortex-m-dsp