From f2f8442bc90ff60b7baeaa0b608c9a4dfcee2bf8 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 16 Apr 2024 10:09:56 -0500 Subject: [PATCH] matrix --- .github/workflows/clippy.yml | 11 ++++++++++- crates/tools/yml/src/main.rs | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 9c94648a5e..faf9795fa1 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -15,11 +15,20 @@ jobs: cargo_clippy: name: Check runs-on: windows-2019 + + strategy: + matrix: + include: + - version: nightly + target: x86_64-pc-windows-msvc + steps: - name: Checkout uses: actions/checkout@v4 - name: Update toolchain - run: rustup update --no-self-update nightly && rustup default nightly-x86_64-pc-windows-msvc + run: rustup update --no-self-update ${{ matrix.version }} && rustup default ${{ matrix.version }}-${{ matrix.target }} + - name: Add toolchain target + run: rustup target add ${{ matrix.target }} - name: Install clippy run: rustup component add clippy - name: Fix environment diff --git a/crates/tools/yml/src/main.rs b/crates/tools/yml/src/main.rs index 5f265a8a9b..e606a79db1 100644 --- a/crates/tools/yml/src/main.rs +++ b/crates/tools/yml/src/main.rs @@ -86,7 +86,7 @@ jobs: } fn clippy_yml() { - let mut yml = r#"name: clippy + let mut yml = r"name: clippy on: pull_request: @@ -103,15 +103,24 @@ jobs: cargo_clippy: name: Check runs-on: windows-2019 + + strategy: + matrix: + include: + - version: nightly + target: x86_64-pc-windows-msvc + steps: - name: Checkout uses: actions/checkout@v4 - name: Update toolchain - run: rustup update --no-self-update nightly && rustup default nightly-x86_64-pc-windows-msvc + run: rustup update --no-self-update ${{ matrix.version }} && rustup default ${{ matrix.version }}-${{ matrix.target }} + - name: Add toolchain target + run: rustup target add ${{ matrix.target }} - name: Install clippy run: rustup component add clippy - name: Fix environment - uses: ./.github/actions/fix-environment"# + uses: ./.github/actions/fix-environment" .to_string(); // This unrolling is required since "cargo clippy --all" consumes too much memory for the GitHub hosted runners.