Fiono11's OLAF #172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ '**' ] | |
pull_request: | |
branches: [ '**' ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test | |
build-nostd: | |
name: Build on no_std target (thumbv7em-none-eabi) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
targets: thumbv7em-none-eabi | |
- uses: taiki-e/install-action@cargo-hack | |
# No default features build | |
- name: no_std / no feat | |
run: cargo build --target thumbv7em-none-eabi --release --no-default-features | |
# cargo hack ensures all no_std features all built-checked | |
- name: no_std / cargo hack features | |
run: cargo hack build --target thumbv7em-none-eabi --release --each-feature --exclude-features default,std,getrandom | |
clippy: | |
name: Check that clippy is happy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- run: cargo clippy --target x86_64-unknown-linux-gnu | |
bench: | |
name: Check that benchmarks compile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo build --benches |