Add basic smoke test #119
Workflow file for this run
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
on: | |
pull_request: # Run CI for PRs on any branch | |
merge_group: # Run CI for the GitHub merge queue | |
workflow_dispatch: # Run CI when manually requested | |
name: Continuous integration | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
env: {"RUSTFLAGS": "-D warnings"} | |
strategy: | |
matrix: | |
target: | |
- thumbv6m-none-eabi | |
- thumbv7m-none-eabi | |
toolchain: | |
- stable | |
- nightly | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
targets: ${{ matrix.target }} | |
toolchain: ${{ matrix.toolchain }} | |
- run: cargo check --target=${{ matrix.target }} --example global_alloc | |
- if: ${{ matrix.toolchain == 'nightly' }} | |
run: cargo check --target=${{ matrix.target }} --examples --all-features | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
targets: thumbv7m-none-eabi | |
toolchain: nightly | |
- name: Install QEMU | |
run: | | |
sudo apt update | |
sudo apt install qemu-system-arm | |
- run: qemu-system-arm --version | |
- run: cargo run --target thumbv7m-none-eabi --example integration_test --all-features | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
toolchain: nightly | |
targets: thumbv6m-none-eabi | |
- run: cargo clippy --all-features --examples --target=thumbv6m-none-eabi -- --deny warnings | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt -- --check | |
rustdoc: | |
name: rustdoc | |
runs-on: ubuntu-latest | |
env: {"RUSTDOCFLAGS": "-D warnings"} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- name: rustdoc | |
run: cargo rustdoc --all-features |