Skip to content

Commit b21949b

Browse files
committed
make an explicit change on compiler then run bootstrap test
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent bfcd001 commit b21949b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,20 @@ ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
4646
# Check library crates on all tier 1 targets.
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.
49-
ENV SCRIPT 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 && \
49+
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+
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+
62+
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 && \
5063
/scripts/check-default-config-profiles.sh && \
5164
python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu && \
5265
python3 ../x.py clippy bootstrap -Dwarnings && \

src/ci/github-actions/jobs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ 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"
8891
<<: *job-linux-4c
8992
- image: mingw-check-tidy
9093
continue_on_error: true

0 commit comments

Comments
 (0)