Skip to content

Commit 4082f9f

Browse files
committed
force download-rustc=if-unchanged for x86_64-gnu-tools runner
Signed-off-by: onur-ozkan <[email protected]>
1 parent abac4dc commit 4082f9f

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

src/bootstrap/src/core/builder/tests.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,12 @@ fn ci_rustc_if_unchanged_logic() {
241241
let compiler_path = build.src.join("compiler");
242242
let library_path = build.src.join("compiler");
243243

244-
let commit = get_closest_merge_commit(
245-
Some(&builder.config.src),
246-
&builder.config.git_config(),
247-
&[compiler_path.clone(), library_path.clone()],
248-
)
249-
.unwrap();
244+
let commit =
245+
get_closest_merge_commit(Some(&builder.config.src), &builder.config.git_config(), &[
246+
compiler_path.clone(),
247+
library_path.clone(),
248+
])
249+
.unwrap();
250250

251251
let has_changes = !helpers::git(Some(&builder.src))
252252
.args(["diff-index", "--quiet", &commit])

src/bootstrap/src/core/config/config.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -2736,11 +2736,10 @@ impl Config {
27362736

27372737
// Look for a version to compare to based on the current commit.
27382738
// Only commits merged by bors will have CI artifacts.
2739-
let commit = get_closest_merge_commit(
2740-
Some(&self.src),
2741-
&self.git_config(),
2742-
&[self.src.join("compiler"), self.src.join("library")],
2743-
)
2739+
let commit = get_closest_merge_commit(Some(&self.src), &self.git_config(), &[
2740+
self.src.join("compiler"),
2741+
self.src.join("library"),
2742+
])
27442743
.unwrap();
27452744
if commit.is_empty() {
27462745
println!("ERROR: could not find commit hash for downloading rustc");

src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ ENV RUST_CONFIGURE_ARGS \
8484
--enable-new-symbol-mangling
8585

8686
ENV HOST_TARGET x86_64-unknown-linux-gnu
87+
ENV FORCE_CI_RUSTC 1
8788

8889
COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
8990
COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/

src/ci/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ fi
5555
# If runner uses an incompatible option and `FORCE_CI_RUSTC` is not defined,
5656
# switch to in-tree rustc.
5757
if [ "$FORCE_CI_RUSTC" == "" ]; then
58+
echo "debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured."
5859
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=1
5960
fi
6061

0 commit comments

Comments
 (0)