Skip to content

Commit b8a84c2

Browse files
committed
Make RUN_CHECK_WITH_PARALLEL_QUERIES the last thing to run
This takes a long time and rarely fails. It also interferes with `retry make prepare`, the retry is unhelpful since `make prepare` turns into a no-op
1 parent c99f1b7 commit b8a84c2

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

src/bootstrap/config.rs

+1
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ define_config! {
638638
dist_stage: Option<u32> = "dist-stage",
639639
bench_stage: Option<u32> = "bench-stage",
640640
patch_binaries_for_nix: Option<bool> = "patch-binaries-for-nix",
641+
// NOTE: only parsed by bootstrap.py, `--feature build-metrics` enables metrics unconditionally
641642
metrics: Option<bool> = "metrics",
642643
}
643644
}

src/ci/run.sh

+18-7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ fi
5656
if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch try-perf; then
5757
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"
5858
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.metrics"
59+
HAS_METRICS=1
5960
fi
6061

6162
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"
@@ -157,13 +158,6 @@ trap datecheck EXIT
157158
# sccache server at the start of the build, but no need to worry if this fails.
158159
SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true
159160

160-
if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
161-
$SRC/configure --set rust.parallel-compiler
162-
CARGO_INCREMENTAL=0 $PYTHON ../x.py check
163-
rm -f config.toml
164-
rm -rf build
165-
fi
166-
167161
$SRC/configure $RUST_CONFIGURE_ARGS
168162

169163
retry make prepare
@@ -193,4 +187,21 @@ else
193187
do_make "$RUST_CHECK_TARGET"
194188
fi
195189

190+
if [ "$RUN_CHECK_WITH_PARALLEL_QUERIES" != "" ]; then
191+
rm -f config.toml
192+
$SRC/configure --set rust.parallel-compiler
193+
194+
# Save the build metrics before we wipe the directory
195+
if [ $HAS_METRICS = 1 ]; then
196+
mv build/metrics.json .
197+
fi
198+
rm -rf build
199+
if [ $HAS_METRICS = 1 ]; then
200+
mkdir build
201+
mv metrics.json build
202+
fi
203+
204+
CARGO_INCREMENTAL=0 $PYTHON ../x.py check
205+
fi
206+
196207
sccache --show-stats || true

0 commit comments

Comments
 (0)