@@ -188,12 +188,16 @@ jobs:
188188 name : Rust Cross
189189 runs-on : ubuntu-latest
190190
191+ strategy :
192+ matrix :
193+ target : [powerpc-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-unknown]
194+ include :
195+ # The rust-analyzer binary is not expected to compile on WASM, but the IDE
196+ # crate should
197+ - target : wasm32-unknown-unknown
198+ ide-only : true
191199 env :
192- targets : " powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
193- # The rust-analyzer binary is not expected to compile on WASM, but the IDE
194- # crate should
195- targets_ide : " wasm32-unknown-unknown"
196- RUSTFLAGS : " -D warnings"
200+ RUSTFLAGS : " -Dwarnings"
197201
198202 steps :
199203 - name : Checkout repository
@@ -202,19 +206,15 @@ jobs:
202206 - name : Install Rust toolchain
203207 run : |
204208 rustup update --no-self-update stable
205- rustup target add ${{ env.targets }} ${{ env.targets_ide }}
209+ rustup target add ${{ matrix.target }}
206210
207211 # - name: Cache Dependencies
208212 # uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
209213
210- - name : Check
211- run : |
212- for target in ${{ env.targets }}; do
213- cargo check --target=$target --all-targets
214- done
215- for target in ${{ env.targets_ide }}; do
216- cargo check -p ide --target=$target --all-targets
217- done
214+ - run : cargo check --target=${{ matrix.target }} --all-targets -p ide
215+ if : ${{ matrix.ide-only }}
216+ - run : cargo check --target=${{ matrix.target }} --all-targets
217+ if : ${{ !matrix.ide-only }}
218218
219219 typescript :
220220 needs : changes
0 commit comments