Skip to content

Commit b871f6c

Browse files
committed
Fix running rustc tests in CI
1 parent 0ad8260 commit b871f6c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

scripts/setup_rust_fork.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,27 @@ index a656927b1f6..44fc5546fac 100644
8181
// If download-ci-llvm=true we also want to check that CI llvm is available
8282
b && llvm::is_ci_llvm_available_for_target(&dwn_ctx.host_target, asserts)
8383
}
84+
diff --git a/src/build_helper/src/git.rs b/src/build_helper/src/git.rs
85+
index 330fb465de..a4593ed96f 100644
86+
--- a/src/build_helper/src/git.rs
87+
+++ b/src/build_helper/src/git.rs
88+
@@ -218,15 +218,7 @@ pub fn get_closest_upstream_commit(
89+
config: &GitConfig<'_>,
90+
env: CiEnv,
91+
) -> Result<Option<String>, String> {
92+
- let base = match env {
93+
- CiEnv::None => "HEAD",
94+
- CiEnv::GitHubActions => {
95+
- // On CI, we should always have a non-upstream merge commit at the tip,
96+
- // and our first parent should be the most recently merged upstream commit.
97+
- // We thus simply return our first parent.
98+
- return resolve_commit_sha(git_dir, "HEAD^1").map(Some);
99+
- }
100+
- };
101+
+ let base = "HEAD";
102+
103+
let mut git = Command::new("git");
104+
84105
EOF
85106

86107
popd

0 commit comments

Comments
 (0)