From 7d9ba87bd2204622d2a518f37289fdb9dd098f03 Mon Sep 17 00:00:00 2001 From: Brian Schwind Date: Sun, 12 Nov 2023 12:04:07 +0900 Subject: [PATCH] Use the firmware working directory for cargo (#52) * Use the firmware working directory for cargo * Fix an oopsie * Fix an oopsie * Fuck yaml * Use a more maintained actions-rs github actions repo * More CI fixes --- .github/workflows/clippy.yml | 19 ++++++++++--------- .github/workflows/rustfmt.yml | 17 ++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index d221d16..e082264 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -1,4 +1,8 @@ -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: name: Cargo Clippy @@ -7,15 +11,12 @@ jobs: name: Cargo Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@v1 with: - profile: minimal toolchain: stable - override: true components: clippy - run: rustup target install thumbv6m-none-eabi - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --manifest-path firmware/Cargo.toml --all-targets -- -D warnings + - name: Cache Rust Dependencies + uses: Swatinem/rust-cache@v2 + - run: cd firmware && cargo clippy -- -D warnings diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 7df4e2a..6d3a024 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -1,4 +1,8 @@ -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: name: Cargo Format @@ -7,14 +11,9 @@ jobs: name: Cargo Format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@v1 with: - profile: minimal toolchain: nightly - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path firmware/Cargo.toml --all -- --check + - run: cd firmware && cargo fmt --all -- --check