summaryrefslogtreecommitdiffstats
path: root/src/ci/run.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
commit2ff14448863ac1a1dd9533461708e29aae170c2d (patch)
tree85b9fea2bbfe3f06473cfa381eed11f273b57c5c /src/ci/run.sh
parentAdding debian version 1.64.0+dfsg1-1. (diff)
downloadrustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz
rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/ci/run.sh')
-rwxr-xr-xsrc/ci/run.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 6545475d9..9a247fb60 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -11,6 +11,16 @@ if [ "$NO_CHANGE_USER" = "" ]; then
useradd --shell /bin/bash -u $LOCAL_USER_ID -o -c "" -m user
export HOME=/home/user
unset LOCAL_USER_ID
+
+ # Ensure that runners are able to execute git commands in the worktree,
+ # overriding the typical git protections. In our docker container we're running
+ # as root, while the user owning the checkout is not root.
+ # This is only necessary when we change the user, otherwise we should
+ # already be running with the right user.
+ #
+ # For NO_CHANGE_USER done in the small number of Dockerfiles affected.
+ echo -e '[safe]\n\tdirectory = *' > /home/user/gitconfig
+
exec su --preserve-environment -c "env PATH=$PATH \"$0\"" user
fi
fi
@@ -102,6 +112,18 @@ else
fi
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
+
+ # We enable this for non-dist builders, since those aren't trying to produce
+ # fresh binaries. We currently don't entirely support distributing a fresh
+ # copy of the compiler (including llvm tools, etc.) if we haven't actually
+ # built LLVM, since not everything necessary is copied into the
+ # local-usage-only LLVM artifacts. If that changes, this could maybe be made
+ # true for all builds. In practice it's probably a good idea to keep building
+ # LLVM continuously on at least some builders to ensure it works, though.
+ # (And PGO is its own can of worms).
+ if [ "$NO_DOWNLOAD_CI_LLVM" = "" ]; then
+ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.download-ci-llvm=if-available"
+ fi
fi
if [ "$RUST_RELEASE_CHANNEL" = "nightly" ] || [ "$DIST_REQUIRE_ALL_TOOLS" = "" ]; then