Calldwell and integration tests cleanup #150
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
name: Rust | |
on: | |
push: | |
branches: | |
- 'main' | |
- '**' | |
pull_request: | |
branches: | |
- 'main' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
rustfmt: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
targets: x86_64-unknown-linux-gnu | |
- name: run format | |
run: ./scripts/check_fmt.sh | |
shell: bash | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
targets: x86_64-unknown-linux-gnu | |
- name: check code | |
run: ./scripts/check_code.sh | |
shell: bash | |
build: | |
name: Build | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- TARGET: thumbv7em-none-eabihf | |
FEATURES: use-aerugo-cortex-m | |
- TARGET: x86_64-unknown-linux-gnu | |
FEATURES: use-aerugo-x86 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: ${{ matrix.TARGET }} | |
- name: cargo build | |
run: cargo build -p aerugo --features ${{ matrix.FEATURES }} | |
build-hal-tests: | |
name: Build HAL integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: thumbv7em-none-eabihf | |
- name: cargo build (HAL tests) | |
run: ./scripts/build_hal_tests.sh | |
shell: bash | |
tests: | |
name: Run tests | |
runs-on: ubuntu-latest | |
needs: [rustfmt, clippy, build] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: thumbv7em-none-eabihf, x86_64-unknown-linux-gnu | |
- name: run tests | |
run: ./scripts/run_tests.sh | |
shell: bash | |
examples: | |
name: Build examples | |
runs-on: ubuntu-latest | |
needs: [rustfmt, clippy, build] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: thumbv7em-none-eabihf, x86_64-unknown-linux-gnu | |
- name: build examples | |
run: ./scripts/build_examples.sh | |
shell: bash | |
docs: | |
name: Generate docs | |
runs-on: ubuntu-latest | |
needs: [rustfmt, clippy, build] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
targets: thumbv7em-none-eabihf | |
- name: generate docs | |
run: ./scripts/generate_docs.sh | |
shell: bash |