Prepare 0.5.1 release #292
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: Code Checks | |
on: | |
push: | |
branches: [ master, trying ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable toolchain with rustfmt | |
run: rustup toolchain install stable --no-self-update --profile minimal --component rustfmt | |
- name: Check versions | |
run: cargo --version | |
- name: Check formatting of BSP and BSP examples | |
run: cargo fmt --verbose --all -- --check | |
clippy: | |
needs: format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable toolchain with clippy, target support | |
run: rustup toolchain install stable --no-self-update --profile minimal --component clippy --target thumbv7em-none-eabihf | |
- name: Lint all packages and examples | |
run: cargo clippy --verbose --workspace --examples --target thumbv7em-none-eabihf --all-features -- -D warnings | |
- name: Lint host-side tools | |
run: cargo clippy --verbose --package=tools --all-features -- -D warnings | |
test: | |
needs: format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nightly toolchain | |
run: rustup toolchain install nightly --no-self-update --profile minimal | |
- name: Set nightly toolchain as default | |
run: rustup default nightly && cargo --version | |
- name: Run teensy4-bsp unit and documentation tests | |
run: cargo test --package teensy4-bsp | |
- name: Run teensy4-pins unit and documentation tests | |
run: cargo test --package teensy4-pins | |
- name: Run teensy4-panic documentation tests | |
run: cargo test --package teensy4-panic --no-default-features | |
xplat: | |
needs: [ clippy, test ] | |
strategy: | |
matrix: | |
host: [ macos-latest, ubuntu-latest, windows-latest ] | |
runs-on: ${{ matrix.host }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf | |
- name: Build examples for ${{ matrix.host }} | |
run: cargo build --examples --target thumbv7em-none-eabihf --all-features | |
# Ensures that documentation links are valid | |
doclinks: | |
needs: format | |
runs-on: ubuntu-latest | |
env: | |
RUSTDOCFLAGS: -D warnings | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf | |
- name: Check teensy4-fcb doclinks | |
run: cargo rustdoc --package teensy4-fcb --target thumbv7em-none-eabihf | |
- name: Check teensy4-pins doclinks | |
run: cargo rustdoc --package teensy4-pins --target thumbv7em-none-eabihf | |
- name: Check teensy4-bsp doclinks | |
run: cargo rustdoc --package teensy4-bsp --all-features --target thumbv7em-none-eabihf |