Address clippy warnings #248
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: All Checks | |
on: [push, pull_request] | |
jobs: | |
gen-ral: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install a stable Rust toolchain with rustfmt | |
run: rustup toolchain install stable --no-self-update --profile minimal --component rustfmt | |
- name: Install svdtools | |
run: cargo install svdtools --version=0.2.8 | |
- name: Remove generated RAL sources, then regenerate the RAL | |
run: rm -rf src/imxrt* src/blocks && make ci | |
- name: Ensure RAL is consistent with checked-in code | |
run: git update-index --refresh && git diff-index --quiet HEAD | |
- name: Check format for RAL | |
run: cargo fmt --all -- --check | |
lints: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal --component clippy | |
- name: Lint raltool | |
run: cargo clippy --package=raltool | |
- name: Lint imxrt-ral | |
run: cargo clippy --package=imxrt-ral --features=imxrt1062,rt | |
build-ral-core: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal | |
- name: Test imxrt-ral for core features | |
run: cargo test --tests --lib | |
build-ral: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
feature: | |
# Individual chips | |
- "imxrt1011,rt" | |
- "imxrt1015,rt" | |
- "imxrt1021,rt" | |
- "imxrt1051,rt" | |
- "imxrt1052,rt" | |
- "imxrt1061,rt" | |
- "imxrt1062,rt" | |
- "imxrt1064,rt" | |
- "imxrt1176_cm4,rt" | |
- "imxrt1176_cm7,rt" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf | |
- name: Build for ${{ matrix.feature }} RAL | |
run: cargo build --verbose --features ${{ matrix.feature }} --target thumbv7em-none-eabihf | |
# Run documentation tests | |
# | |
# Doctests might not work for all features. | |
doctest-ral: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
feature: | |
- "imxrt1062,rt" | |
- "imxrt1021,rt" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal | |
- name: Run doctests for (${{ matrix.feature }}) RAL | |
run: cargo test --doc --verbose --features ${{ matrix.feature }} | |
# Run unit, integration tests | |
test-ral: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
feature: | |
- "imxrt1011" | |
- "imxrt1021" | |
- "imxrt1062,rt" | |
- "imxrt1176_cm4" | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal | |
- name: Run unit, integration tests for ${{ matrix.feature }} | |
run: cargo test --tests --lib --verbose --features ${{ matrix.feature }} | |
examples-teensy4: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain install stable --no-self-update --profile minimal --target thumbv7em-none-eabihf | |
- name: Build examples/teensy4 | |
run: cargo build --package=imxrt-ral-examples-teensy4 --target thumbv7em-none-eabihf |