From a99599110d16df79c1329fa3717ace9f685bbf2d Mon Sep 17 00:00:00 2001 From: Melfely Date: Tue, 22 Sep 2026 15:07:01 -0500 Subject: [PATCH] ci: Added linting file. --- .gitea/workflows/lint.yml | 67 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .gitea/workflows/lint.yml diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..436373a --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -0,0 +1,67 @@ + +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 + + + + +