Skip to content

Commit

Permalink
Auto merge of #105714 - jyn514:tidy-first, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Dec 18, 2022
2 parents 35a99ee + b8a84c2 commit 37efc81
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ define_config! {
dist_stage: Option<u32> = "dist-stage",
bench_stage: Option<u32> = "bench-stage",
patch_binaries_for_nix: Option<bool> = "patch-binaries-for-nix",
// NOTE: only parsed by bootstrap.py, `--feature build-metrics` enables metrics unconditionally
metrics: Option<bool> = "metrics",
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/mingw-check/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/

ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
ENV SCRIPT python3 ../x.py --stage 2 test src/tools/expand-yaml-anchors && \
python3 ../x.py test --stage 0 src/tools/tidy && \
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu --all-targets && \
python3 ../x.py build --stage 0 src/tools/build-manifest && \
python3 ../x.py test --stage 0 src/tools/compiletest && \
python3 ../x.py test --stage 2 src/tools/tidy && \
python3 ../x.py test --stage 0 core alloc std test proc_macro && \
# Build both public and internal documentation.
RUSTDOCFLAGS=\"--document-private-items --document-hidden-items\" python3 ../x.py doc --stage 0 library/test && \
Expand Down
25 changes: 18 additions & 7 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ 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"
Expand Down Expand Up @@ -157,13 +158,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
Expand Down Expand Up @@ -193,4 +187,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 $PYTHON ../x.py check
fi

sccache --show-stats || true

0 comments on commit 37efc81

Please sign in to comment.