Skip to content

Commit 37efc81

Browse files
committed
Auto merge of #105714 - jyn514:tidy-first, r=Mark-Simulacrum
Run `x test tidy` sooner in mingw-check It takes less time to run than the other tests and is more likely to fail. `expand-yaml-anchors` is still run first to make sure the CI files are internally consistent. Note that changing to `--stage 0` doesn't actually do anything since bootstrap tools are always built with the bootstrap compiler, this just makes it less confusing. cc 83bab41
2 parents 35a99ee + b8a84c2 commit 37efc81

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
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/docker/host-x86_64/mingw-check/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
4040

4141
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
4242
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
43+
python3 ../x.py test --stage 0 src/tools/tidy && \
4344
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu --all-targets && \
4445
python3 ../x.py build --stage 0 src/tools/build-manifest && \
4546
python3 ../x.py test --stage 0 src/tools/compiletest && \
46-
python3 ../x.py test --stage 2 src/tools/tidy && \
4747
python3 ../x.py test --stage 0 core alloc std test proc_macro && \
4848
# Build both public and internal documentation.
4949
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 library/test && \

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)