Files
melfely 13e4e1c893
Lint & Build / Build (push) Successful in 1m17s
Lint & Build / Linting (push) Successful in 1m47s
ci: Setup Linting and Build Test for RP2350. (#2)
Reviewed-on: #2
Co-authored-by: Melfely <bug362@outlook.com>
2026-09-22 20:48:40 +00:00

68 lines
1.4 KiB
YAML

name: Lint & Build
on:
push:
branches: [ main, master ]
pull_request:
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv8m.main-none-eabihf
components: rustfmt, clippy
- name: Install cargo sort
uses: taiki-e/install-action@v2
with:
tool: cargo-sort
- name: Install cargo machete
uses: taiki-e/install-action@v2
with:
tool: cargo-machete
- name: Check formatting
run: cargo fmt --check
- name: Check import sorting
run: cargo sort --grouped --check --check-format
- name: Check for unused dependencies
run: cargo machete
- name: Clippy for RP2350 ARM Cores
run: |
cargo clippy --target thumbv8m.main-none-eabihf -- -D warnings
build:
name: Build
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout Project
uses: actions/checkout@v5
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: thumbv8m.main-none-eabihf
- name: Build for RP2350 ARM Cores
run: |
cargo build --target thumbv8m.main-none-eabihf --release --locked