diff --git a/ci/run.sh b/ci/run.sh index 4de8087699e24..b93529cb4c692 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -109,11 +109,18 @@ if [ "$TARGET" = "s390x-unknown-linux-gnu" ]; then sleep 1 done else + # rm -rf target is executed before each build to ensure there are no leftover + # caches from previous builds. This happened at least in the FreeBSD CI, + # where the build script didn't re-execute across builds. + + rm -rf target cargo test --no-default-features --manifest-path libc-test/Cargo.toml \ --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"} + rm -rf target cargo test --manifest-path libc-test/Cargo.toml --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"} + rm -rf target RUST_BACKTRACE=1 cargo test --features extra_traits --manifest-path libc-test/Cargo.toml \ --target "${TARGET}" ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"} fi