From a76c880a5bbc1079f7995ad9d5767b2922f1df6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 20 Feb 2024 15:20:31 +0100 Subject: [PATCH] ci: run Clippy for macOS on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c57bc207..4cfa23a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,18 +82,28 @@ jobs: clippy: name: Clippy - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + include: + - os: ubuntu-latest + targets: x86_64-unknown-linux-gnu + flags: --target x86_64-unknown-linux-gnu + - os: macos-latest + targets: x86_64-apple-darwin, aarch64-apple-darwin + flags: --target x86_64-apple-darwin --target aarch64-apple-darwin + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - targets: x86_64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin + targets: ${{ matrix.targets }} components: clippy - uses: Swatinem/rust-cache@v2 with: save-if: ${{ github.ref == 'refs/heads/main' }} - name: Clippy - run: cargo clippy --all-targets --target x86_64-unknown-linux-gnu --target x86_64-apple-darwin --target aarch64-apple-darwin -- -D warnings + run: cargo clippy --all-targets ${{ matrix.flags }} -- -D warnings clippy-test-kernel: name: Clippy test-kernels