Running no_std_fixed CI exclusively with nightly toolchain. #10
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: Build | |
on: [push] | |
# Stops the running workflow of previous pushes | |
concurrency: | |
# cancel per workflow | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Lint, test and build rust-${{ matrix.toolchain }} ${{ matrix.target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- stable | |
- beta | |
- nightly | |
target: | |
- thumbv7em-none-eabi | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Rust setup | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: ${{ matrix.target }} | |
components: clippy, rustfmt | |
- id: cache-rust | |
uses: Swatinem/rust-cache@v2 | |
- name: Lint - rustfmt | |
run: cargo fmt --all -- --check | |
- name: Lint - clippy | |
run: cargo clippy --all --no-deps -- -D warnings | |
- name: Check | |
run: cargo check | |
- name: Test | |
run: cargo test --verbose --lib --bins --tests --benches --example angle | |
- name: Build docs with --all-features | |
env: | |
RUSTDOCFLAGS: -D warnings --cfg docsrs | |
run: cargo +nightly doc --no-deps --all-features | |
test-no_std_fixed: | |
name: Test no_std_fixed rust-${{ matrix.toolchain }} ${{ matrix.target }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- nightly | |
target: | |
- thumbv7em-none-eabi | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: ${{ matrix.target }} | |
- run: cargo test --verbose --example no_std_fixed | |