@@ -188,12 +188,17 @@ 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"
201
+ PACKAGE_FILTER : " ${{ matrix.ide-only == 'true' && '-p ide' || '' }}"
197
202
198
203
steps :
199
204
- name : Checkout repository
@@ -202,19 +207,12 @@ jobs:
202
207
- name : Install Rust toolchain
203
208
run : |
204
209
rustup update --no-self-update stable
205
- rustup target add ${{ env.targets }} ${{ env.targets_ide }}
210
+ rustup target add ${{ matrix.target }}
206
211
207
212
# - name: Cache Dependencies
208
213
# uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
209
214
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
215
+ - run : cargo check --target=${{ matrix.target }} --all-targets ${{ env.PACKAGE_FILTER }}
218
216
219
217
typescript :
220
218
needs : changes
0 commit comments