Skip to content

Commit

Permalink
force download-rustc=if-unchanged for x86_64-gnu-tools runner
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Oct 8, 2024
1 parent abac4dc commit 4082f9f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,12 @@ fn ci_rustc_if_unchanged_logic() {
let compiler_path = build.src.join("compiler");
let library_path = build.src.join("compiler");

let commit = get_closest_merge_commit(
Some(&builder.config.src),
&builder.config.git_config(),
&[compiler_path.clone(), library_path.clone()],
)
.unwrap();
let commit =
get_closest_merge_commit(Some(&builder.config.src), &builder.config.git_config(), &[
compiler_path.clone(),
library_path.clone(),
])
.unwrap();

let has_changes = !helpers::git(Some(&builder.src))
.args(["diff-index", "--quiet", &commit])
Expand Down
9 changes: 4 additions & 5 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2736,11 +2736,10 @@ impl Config {

// Look for a version to compare to based on the current commit.
// Only commits merged by bors will have CI artifacts.
let commit = get_closest_merge_commit(
Some(&self.src),
&self.git_config(),
&[self.src.join("compiler"), self.src.join("library")],
)
let commit = get_closest_merge_commit(Some(&self.src), &self.git_config(), &[
self.src.join("compiler"),
self.src.join("library"),
])
.unwrap();
if commit.is_empty() {
println!("ERROR: could not find commit hash for downloading rustc");
Expand Down
1 change: 1 addition & 0 deletions src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ENV RUST_CONFIGURE_ARGS \
--enable-new-symbol-mangling

ENV HOST_TARGET x86_64-unknown-linux-gnu
ENV FORCE_CI_RUSTC 1

COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
Expand Down
1 change: 1 addition & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ fi
# If runner uses an incompatible option and `FORCE_CI_RUSTC` is not defined,
# switch to in-tree rustc.
if [ "$FORCE_CI_RUSTC" == "" ]; then
echo "debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured."
DISABLE_CI_RUSTC_IF_INCOMPATIBLE=1
fi

Expand Down

0 comments on commit 4082f9f

Please sign in to comment.