mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-10 00:47:45 +00:00
Auto merge of #95050 - ehuss:fix-cmake-build, r=Mark-Simulacrum
Fix cmake build. This is an attempt to fix the cmake build. For some reason, it has recently started failing with a permission denied trying to overwrite `/tmp/build.log`. This file exists from the `build-toolchains.sh` step, which is owned by the rustbuild user. I think there is some behavior where a sticky `/tmp` directory doesn't allow overwriting files owned by other users even when running as root. I do not know why this has suddenly started, and I can't reproduce locally with my own docker setup. However, this fix seems to work on CI.
This commit is contained in:
commit
58f11791af
@ -5,16 +5,16 @@ hide_output() {
|
|||||||
set +x
|
set +x
|
||||||
on_err="
|
on_err="
|
||||||
echo ERROR: An error was encountered with the build.
|
echo ERROR: An error was encountered with the build.
|
||||||
cat /tmp/build.log
|
cat /tmp/cmake_build.log
|
||||||
exit 1
|
exit 1
|
||||||
"
|
"
|
||||||
trap "$on_err" ERR
|
trap "$on_err" ERR
|
||||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||||
PING_LOOP_PID=$!
|
PING_LOOP_PID=$!
|
||||||
"$@" &> /tmp/build.log
|
"$@" &> /tmp/cmake_build.log
|
||||||
trap - ERR
|
trap - ERR
|
||||||
kill $PING_LOOP_PID
|
kill $PING_LOOP_PID
|
||||||
rm /tmp/build.log
|
rm /tmp/cmake_build.log
|
||||||
set -x
|
set -x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user