summaryrefslogtreecommitdiffstats
path: root/src/ci/run.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:03 +0000
commit64d98f8ee037282c35007b64c2649055c56af1db (patch)
tree5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /src/ci/run.sh
parentAdding debian version 1.67.1+dfsg1-1. (diff)
downloadrustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz
rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ci/run.sh')
-rwxr-xr-xsrc/ci/run.sh33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 7de06ec35..0db9c993e 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -45,17 +45,10 @@ fi
ci_dir=`cd $(dirname $0) && pwd`
source "$ci_dir/shared.sh"
-if command -v python > /dev/null; then
- PYTHON="python"
-elif command -v python3 > /dev/null; then
- PYTHON="python3"
-else
- PYTHON="python2"
-fi
-
if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch try-perf; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.metrics"
+ HAS_METRICS=1
fi
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"
@@ -157,13 +150,6 @@ trap datecheck EXIT
# sccache server at the start of the build, but no need to worry if this fails.
SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true
-if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
- $SRC/configure --set rust.parallel-compiler
- CARGO_INCREMENTAL=0 $PYTHON ../x.py check
- rm -f config.toml
- rm -rf build
-fi
-
$SRC/configure $RUST_CONFIGURE_ARGS
retry make prepare
@@ -193,4 +179,21 @@ else
do_make "$RUST_CHECK_TARGET"
fi
+if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
+ rm -f config.toml
+ $SRC/configure --set rust.parallel-compiler
+
+ # Save the build metrics before we wipe the directory
+ if [ "$HAS_METRICS" = 1 ]; then
+ mv build/metrics.json .
+ fi
+ rm -rf build
+ if [ "$HAS_METRICS" = 1 ]; then
+ mkdir build
+ mv metrics.json build
+ fi
+
+ CARGO_INCREMENTAL=0 ../x check
+fi
+
sccache --show-stats || true