@@ -188,12 +188,16 @@ jobs:
188
188
name : Rust Cross
189
189
runs-on : ubuntu-latest
190
190
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
191
199
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"
197
201
198
202
steps :
199
203
- name : Checkout repository
@@ -202,19 +206,15 @@ jobs:
202
206
- name : Install Rust toolchain
203
207
run : |
204
208
rustup update --no-self-update stable
205
- rustup target add ${{ env.targets }} ${{ env.targets_ide }}
209
+ rustup target add ${{ matrix.target }}
206
210
207
211
# - name: Cache Dependencies
208
212
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
209
213
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 }}
218
218
219
219
typescript :
220
220
needs : changes
0 commit comments