Skip to content

Commit e114788

Browse files
committed
Auto merge of rust-lang#131531 - onur-ozkan:move-dummy-commit, r=Kobzol
move dummy commit logic into x86_64-gnu-llvm-18 Doing the dummy commit logic in a runner that uses CI-LLVM breaks in merge CI. This should be properly fixed by rust-lang#131358 (see the [actual problem](rust-lang#131448 (comment))). Since we can also fix it by moving the dummy commit into the runner where we use in-tree LLVM, so why not do that as well?
2 parents ce697f9 + c25d732 commit e114788

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/ci/docker/host-x86_64/mingw-check/Dockerfile

-12
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,6 @@ ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
4747
# We disable optimized compiler built-ins because that requires a C toolchain for the target.
4848
# We also skip the x86_64-unknown-linux-gnu target as it is well-tested by other jobs.
4949
ENV SCRIPT \
50-
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test covers the `rust.download-rustc=if-unchanged` logic.
51-
# Here we are adding a dummy commit on compiler and running that test to ensure when there is a change on the compiler,
52-
# we never download ci rustc with `rust.download-rustc=if-unchanged` option.
53-
echo \"\" >> ../compiler/rustc/src/main.rs && \
54-
git config --global user.email \"dummy@dummy.com\" && \
55-
git config --global user.name \"dummy\" && \
56-
git add ../compiler/rustc/src/main.rs && \
57-
git commit -m \"test commit for rust.download-rustc=if-unchanged logic\" && \
58-
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 python3 ../x.py test bootstrap -- core::builder::tests::ci_rustc_if_unchanged_logic && \
59-
# Revert the dummy commit
60-
git reset --hard HEAD~1 && \
61-
6250
python3 ../x.py check --stage 0 --set build.optimized-compiler-builtins=false core alloc std --target=aarch64-unknown-linux-gnu,i686-pc-windows-msvc,i686-unknown-linux-gnu,x86_64-apple-darwin,x86_64-pc-windows-gnu,x86_64-pc-windows-msvc && \
6351
/scripts/check-default-config-profiles.sh && \
6452
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \

src/ci/docker/scripts/x86_64-gnu-llvm.sh

+14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
set -ex
44

5+
# `core::builder::tests::ci_rustc_if_unchanged_logic` bootstrap test ensures that
6+
# "download-rustc=if-unchanged" logic don't use CI rustc while there are changes on
7+
# compiler and/or library. Here we are adding a dummy commit on compiler and running
8+
# that test to make sure we never download CI rustc with a change on the compiler tree.
9+
echo "" >> ../compiler/rustc/src/main.rs
10+
git config --global user.email "dummy@dummy.com"
11+
git config --global user.name "dummy"
12+
git add ../compiler/rustc/src/main.rs
13+
git commit -m "test commit for rust.download-rustc=if-unchanged logic"
14+
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=0 ../x.py test bootstrap \
15+
-- core::builder::tests::ci_rustc_if_unchanged_logic
16+
# Revert the dummy commit
17+
git reset --hard HEAD~1
18+
519
# Only run the stage 1 tests on merges, not on PR CI jobs.
620
if [[ -z "${PR_CI_JOB}" ]]; then
721
../x.py --stage 1 test --skip src/tools/tidy

src/ci/github-actions/jobs.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,15 @@ envs:
8585
# it in each job definition.
8686
pr:
8787
- image: mingw-check
88-
env:
89-
# We are adding (temporarily) a dummy commit on the compiler
90-
READ_ONLY_SRC: "0"
9188
<<: *job-linux-4c
9289
- image: mingw-check-tidy
9390
continue_on_error: true
9491
<<: *job-linux-4c
9592
- image: x86_64-gnu-llvm-18
9693
env:
9794
ENABLE_GCC_CODEGEN: "1"
95+
# We are adding (temporarily) a dummy commit on the compiler
96+
READ_ONLY_SRC: "0"
9897
<<: *job-linux-16c
9998
- image: x86_64-gnu-tools
10099
<<: *job-linux-16c
@@ -210,8 +209,6 @@ auto:
210209
<<: *job-linux-8c
211210

212211
- image: mingw-check
213-
env:
214-
READ_ONLY_SRC: 0
215212
<<: *job-linux-4c
216213

217214
- image: test-various
@@ -264,6 +261,7 @@ auto:
264261
- image: x86_64-gnu-llvm-18
265262
env:
266263
RUST_BACKTRACE: 1
264+
READ_ONLY_SRC: "0"
267265
<<: *job-linux-8c
268266

269267
- image: x86_64-gnu-nopt

0 commit comments

Comments
 (0)