@@ -169,12 +169,14 @@ jobs:
169
169
if : startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios')
170
170
run : sudo apt-get install llvm
171
171
- name : Download macOS SDK
172
+ working-directory : ${{ runner.temp }}
172
173
if : startsWith(matrix.build, 'cross-macos')
173
174
run : |
174
175
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz
175
176
tar -xf MacOSX11.3.sdk.tar.xz
176
177
echo "SDKROOT=$(pwd)/MacOSX11.3.sdk" >> $GITHUB_ENV
177
178
- name : Download iOS SDK
179
+ working-directory : ${{ runner.temp }}
178
180
if : startsWith(matrix.build, 'cross-ios')
179
181
run : |
180
182
wget https://github.com/xybp888/iOS-SDKs/releases/download/iOS18.1-SDKs/iPhoneOS18.1.sdk.zip
@@ -196,6 +198,9 @@ jobs:
196
198
- run : cargo update
197
199
- uses : Swatinem/rust-cache@v2
198
200
- run : cargo test ${{ matrix.no_run }} --workspace --target ${{ matrix.target }} ${{ matrix.cargo_flags }}
201
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
202
+ - name : check clean Git workting tree
203
+ uses : ./.github/actions/check-clean-git-working-tree
199
204
200
205
# This is separate from the matrix above because there is no prebuilt rust-std component for these targets.
201
206
check-build-std :
@@ -234,6 +239,9 @@ jobs:
234
239
- run : cargo test -Z build-std=std --no-run --workspace --target ${{ matrix.target }}
235
240
- run : cargo test -Z build-std=std --no-run --workspace --target ${{ matrix.target }} --release
236
241
- run : cargo test -Z build-std=std --no-run --workspace --target ${{ matrix.target }} --features parallel
242
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
243
+ - name : check clean Git workting tree
244
+ uses : ./.github/actions/check-clean-git-working-tree
237
245
238
246
check-wasm :
239
247
name : Test wasm
@@ -252,6 +260,9 @@ jobs:
252
260
- run : cargo test --no-run --target ${{ matrix.target }}
253
261
- run : cargo test --no-run --target ${{ matrix.target }} --release
254
262
- run : cargo test --no-run --target ${{ matrix.target }} --features parallel
263
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
264
+ - name : check clean Git workting tree
265
+ uses : ./.github/actions/check-clean-git-working-tree
255
266
256
267
test-wasm32-wasip1-thread :
257
268
name : Test wasm32-wasip1-thread
@@ -274,7 +285,7 @@ jobs:
274
285
echo "WASI_TOOLCHAIN_VERSION=$VERSION" >> "$GITHUB_ENV"
275
286
276
287
- name : Install wasi-sdk
277
- working-directory : /tmp
288
+ working-directory : ${{ runner.temp }}
278
289
env :
279
290
REPO : WebAssembly/wasi-sdk
280
291
run : |
@@ -297,12 +308,17 @@ jobs:
297
308
- name : Run tests
298
309
run : cargo +nightly build -p $TARGET-test --target $TARGET
299
310
311
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
312
+ - name : check clean Git workting tree
313
+ uses : ./.github/actions/check-clean-git-working-tree
314
+
300
315
cuda :
301
316
name : Test CUDA support
302
317
runs-on : ubuntu-22.04
303
318
steps :
304
319
- uses : actions/checkout@v4
305
320
- name : Install cuda-minimal-build-11-8
321
+ working-directory : ${{ runner.temp }}
306
322
shell : bash
307
323
run : |
308
324
# https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network
@@ -317,6 +333,9 @@ jobs:
317
333
run : |
318
334
PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
319
335
PATH="/usr/local/cuda/bin:$PATH" CXX=clang++ cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
336
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
337
+ - name : check clean Git workting tree
338
+ uses : ./.github/actions/check-clean-git-working-tree
320
339
321
340
msrv :
322
341
name : MSRV
@@ -353,6 +372,9 @@ jobs:
353
372
shell : bash
354
373
- uses : Swatinem/rust-cache@v2
355
374
- run : cargo clippy --no-deps
375
+ # check that there are no uncommitted changes to prevent bugs like https://github.com/rust-lang/cc-rs/issues/1411
376
+ - name : check clean Git workting tree
377
+ uses : ./.github/actions/check-clean-git-working-tree
356
378
357
379
rustfmt :
358
380
name : Rustfmt
0 commit comments