@@ -169,12 +169,14 @@ jobs:
169169 if : startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios')
170170 run : sudo apt-get install llvm
171171 - name : Download macOS SDK
172+ working-directory : ${{ runner.temp }}
172173 if : startsWith(matrix.build, 'cross-macos')
173174 run : |
174175 wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz
175176 tar -xf MacOSX11.3.sdk.tar.xz
176177 echo "SDKROOT=$(pwd)/MacOSX11.3.sdk" >> $GITHUB_ENV
177178 - name : Download iOS SDK
179+ working-directory : ${{ runner.temp }}
178180 if : startsWith(matrix.build, 'cross-ios')
179181 run : |
180182 wget https://github.com/xybp888/iOS-SDKs/releases/download/iOS18.1-SDKs/iPhoneOS18.1.sdk.zip
@@ -196,6 +198,9 @@ jobs:
196198 - run : cargo update
197199 - uses : Swatinem/rust-cache@v2
198200 - 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
199204
200205 # This is separate from the matrix above because there is no prebuilt rust-std component for these targets.
201206 check-build-std :
@@ -234,6 +239,9 @@ jobs:
234239 - run : cargo test -Z build-std=std --no-run --workspace --target ${{ matrix.target }}
235240 - run : cargo test -Z build-std=std --no-run --workspace --target ${{ matrix.target }} --release
236241 - 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
237245
238246 check-wasm :
239247 name : Test wasm
@@ -252,6 +260,9 @@ jobs:
252260 - run : cargo test --no-run --target ${{ matrix.target }}
253261 - run : cargo test --no-run --target ${{ matrix.target }} --release
254262 - 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
255266
256267 test-wasm32-wasip1-thread :
257268 name : Test wasm32-wasip1-thread
@@ -274,7 +285,7 @@ jobs:
274285 echo "WASI_TOOLCHAIN_VERSION=$VERSION" >> "$GITHUB_ENV"
275286
276287 - name : Install wasi-sdk
277- working-directory : /tmp
288+ working-directory : ${{ runner.temp }}
278289 env :
279290 REPO : WebAssembly/wasi-sdk
280291 run : |
@@ -297,12 +308,17 @@ jobs:
297308 - name : Run tests
298309 run : cargo +nightly build -p $TARGET-test --target $TARGET
299310
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+
300315 cuda :
301316 name : Test CUDA support
302317 runs-on : ubuntu-22.04
303318 steps :
304319 - uses : actions/checkout@v4
305320 - name : Install cuda-minimal-build-11-8
321+ working-directory : ${{ runner.temp }}
306322 shell : bash
307323 run : |
308324 # 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:
317333 run : |
318334 PATH="/usr/local/cuda/bin:$PATH" cargo test --manifest-path dev-tools/cc-test/Cargo.toml --features test_cuda
319335 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
320339
321340 msrv :
322341 name : MSRV
@@ -353,6 +372,9 @@ jobs:
353372 shell : bash
354373 - uses : Swatinem/rust-cache@v2
355374 - 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
356378
357379 rustfmt :
358380 name : Rustfmt
0 commit comments