diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml index 4d3ef92..745bdbc 100644 --- a/.github/workflows/firmware.yml +++ b/.github/workflows/firmware.yml @@ -81,10 +81,13 @@ jobs: - name: Setup Rust toolchain run: rustup show + - run: cargo install cargo-make + - run: | - cargo clippy -p b1display -- --deny=warnings - cargo clippy -p c1minimal -- --deny=warnings - cargo clippy -p ledmatrix -- --deny=warnings + sudo apt-get install -y libudev-dev + cargo make clippy --cwd b1display + cargo make clippy --cwd c1minimal + cargo make clippy --cwd ledmatrix # fl16-inputmodules/src/serialnum.rs # is currently used by all firmwares to show their firmware version. @@ -107,4 +110,8 @@ jobs: - name: Setup Rust toolchain run: rustup show - - run: cargo fmt --all -- --check + - run: | + cargo fmt -p b1display -- --check + cargo fmt -p c1minimal -- --check + cargo fmt -p ledmatrix -- --check + cargo fmt -p fl16-inputmodules -- --check diff --git a/.github/workflows/software.yml b/.github/workflows/software.yml index 151d19f..642fbbd 100644 --- a/.github/workflows/software.yml +++ b/.github/workflows/software.yml @@ -129,8 +129,10 @@ jobs: - name: Setup Rust toolchain run: rustup show + - run: cargo install cargo-make + - name: Run cargo fmt run: cargo fmt -p inputmodule-control -- --check - name: Run cargo clippy - run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings + run: cargo make clippy --cwd inputmodule-control diff --git a/.github/workflows/traditional-cargo.yml b/.github/workflows/traditional-cargo.yml index c7f8480..76f2822 100644 --- a/.github/workflows/traditional-cargo.yml +++ b/.github/workflows/traditional-cargo.yml @@ -91,6 +91,7 @@ jobs: cargo clippy -p b1display -- --deny=warnings cargo clippy -p c1minimal -- --deny=warnings cargo clippy -p ledmatrix -- --deny=warnings + cargo clippy -p fl16-inputmodules -- --deny=warnings - name: Software clippy run: cargo clippy --target x86_64-unknown-linux-gnu -p inputmodule-control -- -D warnings diff --git a/inputmodule-control/Makefile.toml b/inputmodule-control/Makefile.toml index 3b26456..4cd6f69 100644 --- a/inputmodule-control/Makefile.toml +++ b/inputmodule-control/Makefile.toml @@ -4,6 +4,10 @@ extend = "../Makefile.toml" [env] TARGET_TRIPLE = "${CARGO_MAKE_RUST_TARGET_TRIPLE}" +# Seems clippy doesn't respect TARGET_TRIPLE +[tasks.clippy] +args = ["clippy", "--target", "${CARGO_MAKE_RUST_TARGET_TRIPLE}", "--", "-Dwarnings"] + [tasks.run] command = "cargo" args = [