aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-07-28 12:32:24 -0700
committerAkash Banerjee <Akash.Banerjee@amd.com>2025-07-28 20:39:52 +0100
commit02bd06438e3b445a8ef1b0e6e7d904b83d0c6a7d (patch)
tree7969ecf644ad8cc1ee83ea837bf490b118f85fda
parent9dded5ea5a1a4745735e4a325e5eff22d4ca616e (diff)
downloadllvm-02bd06438e3b445a8ef1b0e6e7d904b83d0c6a7d.zip
llvm-02bd06438e3b445a8ef1b0e6e7d904b83d0c6a7d.tar.gz
llvm-02bd06438e3b445a8ef1b0e6e7d904b83d0c6a7d.tar.bz2
[libcxx] Install runner last when building CI containers
This patch changes when we install the GHA runner in the CI containers. Instead of having it in the base image, we install it last. This will enable a follow up patch that will do some setup enabling building the full container image with an existing base image, thus enabling updating the GHA runner without modifying the important bits. Reviewers: EricWF, ldionne Reviewed By: ldionne Pull Request: https://github.com/llvm/llvm-project/pull/148072
-rw-r--r--libcxx/utils/ci/Dockerfile17
-rw-r--r--libcxx/utils/ci/docker-compose.yml3
2 files changed, 17 insertions, 3 deletions
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile
index 63cecea..cec4806 100644
--- a/libcxx/utils/ci/Dockerfile
+++ b/libcxx/utils/ci/Dockerfile
@@ -311,5 +311,18 @@ CMD /opt/android/container-setup.sh && buildkite-agent start
#
FROM builder-base AS actions-builder
-WORKDIR /home/runner
-USER runner
+ARG GITHUB_RUNNER_VERSION
+
+RUN useradd gha -u 1001 -m -s /bin/bash
+RUN adduser gha sudo
+RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+WORKDIR /home/gha
+USER gha
+
+ENV RUNNER_MANUALLY_TRAP_SIG=1
+ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1
+RUN mkdir actions-runner && \
+ cd actions-runner && \
+ curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
+ tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
+ rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz
diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml
index 4efc6d2..3b23aa2 100644
--- a/libcxx/utils/ci/docker-compose.yml
+++ b/libcxx/utils/ci/docker-compose.yml
@@ -10,7 +10,8 @@ services:
dockerfile: Dockerfile
target: actions-builder
args:
- BASE_IMAGE: ghcr.io/actions/actions-runner:2.326.0
+ BASE_IMAGE: ubuntu:jammy
+ GITHUB_RUNNER_VERSION: "2.326.0"
<<: *compiler_versions
android-buildkite-builder: