Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download, rather than sccache-cache, LLVM in CI #99967

Merged
merged 4 commits into from
Aug 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add global safe.directory for CI
  • Loading branch information
Mark-Simulacrum committed Aug 20, 2022
commit d7b91c31207a1440732b01d357181c68e7e72a97
2 changes: 2 additions & 0 deletions src/ci/docker/host-x86_64/armhf-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ RUN curl -O https://ci-mirrors.rust-lang.org/rustc/vexpress-v2p-ca15-tc1.dtb
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY static/gitconfig /etc/gitconfig

ENV RUST_CONFIGURE_ARGS --qemu-armhf-rootfs=/tmp/rootfs
ENV SCRIPT python3 ../x.py --stage 2 test --host='' --target arm-unknown-linux-gnueabihf

Expand Down
2 changes: 2 additions & 0 deletions src/ci/docker/host-x86_64/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ ENV TARGETS=wasm32-unknown-emscripten
# Use -O1 optimizations in the link step to reduce time spent optimizing.
ENV EMCC_CFLAGS=-O1

COPY static/gitconfig /etc/gitconfig

# Emscripten installation is user-specific
ENV NO_CHANGE_USER=1

Expand Down
2 changes: 2 additions & 0 deletions src/ci/docker/static/gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[safe]
directory = *
10 changes: 10 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down