Use rust-toolchain Action to specify additional target #8
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: CI | |
on: | |
push: | |
branches: ["master"] | |
tags: ["v[0-9]+.[0-9]+.[0-9]+"] | |
pull_request: | |
branches: ["master"] | |
workflow_dispatch: | |
jobs: | |
ci: | |
strategy: | |
matrix: | |
rust: [stable, 1.38.0] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt | |
targets: thumbv7em-none-eabihf | |
- run: cargo fmt -- --check | |
- run: cargo test | |
- run: cargo build --target thumbv7em-none-eabihf # Ensure crate remains no_std compatible. |