From 9f06e2f1a5ca8f54644ef24e8dc4249ac259c765 Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Tue, 27 Oct 2020 13:03:12 +0200 Subject: [PATCH] Add clippy features matrix Run clippy on all available feature combos. --- .github/workflows/build.yml | 10 +++++++++- nucleus/Makefile.toml | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85c4962..916d193 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -112,6 +112,14 @@ jobs: clippy: name: "Clippy" + strategy: + matrix: + features: [ + "", + "noserial", + "qemu", + "noserial,qemu", + ] runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -119,4 +127,4 @@ jobs: - run: rustup toolchain install nightly --profile minimal --component clippy - run: rustup component add rust-src llvm-tools-preview - run: cargo install cargo-make - - run: cargo make clippy + - run: env CLIPPY_FEATURES=${{ matrix.features }} cargo make clippy diff --git a/nucleus/Makefile.toml b/nucleus/Makefile.toml index 132dd20..1162cac 100644 --- a/nucleus/Makefile.toml +++ b/nucleus/Makefile.toml @@ -68,8 +68,9 @@ command = "diskutil" args = ["unmount", "/Volumes/BOOT/"] [tasks.clippy] +env = { "TARGET_FEATURES" = { value = "--features=${CLIPPY_FEATURES}", condition = { env_set = ["CLIPPY_FEATURES"] } } } command = "cargo" -args = ["clippy", "${BUILD_STD}", "--target=${TARGET_JSON}", "--", "-D", "warnings"] +args = ["clippy", "${BUILD_STD}", "--target=${TARGET_JSON}", "@@remove-empty(TARGET_FEATURES)", "--", "-D", "warnings"] [tasks.hopper] dependencies = ["build", "kernel-binary"]