diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-04-06 10:31:43 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2025-04-06 10:39:49 +0200 |
| commit | 7812f55eebe5c287fb52c95efdc2ebc92822465a (patch) | |
| tree | e6aac510fff3c67612ef69d5537d81dd368bbc80 | |
| parent | 56cf54f03f025d034e2f3686a1521f2ee76c9152 (diff) | |
| download | rust-7812f55eebe5c287fb52c95efdc2ebc92822465a.tar.gz rust-7812f55eebe5c287fb52c95efdc2ebc92822465a.zip | |
chore: Set up a proper job matrix for rust-cross
| -rw-r--r-- | src/tools/rust-analyzer/.github/workflows/ci.yaml | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml index 8935c5f57b6..fa08fc26e35 100644 --- a/src/tools/rust-analyzer/.github/workflows/ci.yaml +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -188,12 +188,16 @@ jobs: name: Rust Cross runs-on: ubuntu-latest + strategy: + matrix: + target: [powerpc-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-unknown] + include: + # The rust-analyzer binary is not expected to compile on WASM, but the IDE + # crate should + - target: wasm32-unknown-unknown + ide-only: true env: - targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl" - # The rust-analyzer binary is not expected to compile on WASM, but the IDE - # crate should - targets_ide: "wasm32-unknown-unknown" - RUSTFLAGS: "-D warnings" + RUSTFLAGS: "-Dwarnings" steps: - name: Checkout repository @@ -202,19 +206,15 @@ jobs: - name: Install Rust toolchain run: | rustup update --no-self-update stable - rustup target add ${{ env.targets }} ${{ env.targets_ide }} + rustup target add ${{ matrix.target }} # - name: Cache Dependencies # uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 - - name: Check - run: | - for target in ${{ env.targets }}; do - cargo check --target=$target --all-targets - done - for target in ${{ env.targets_ide }}; do - cargo check -p ide --target=$target --all-targets - done + - run: cargo check --target=${{ matrix.target }} --all-targets -p ide + if: ${{ matrix.ide-only }} + - run: cargo check --target=${{ matrix.target }} --all-targets + if: ${{ !matrix.ide-only }} typescript: needs: changes |
