aboutsummaryrefslogtreecommitdiff
path: root/libcxx
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/utils/ci/Dockerfile22
-rw-r--r--libcxx/utils/ci/docker-compose.yml14
2 files changed, 31 insertions, 5 deletions
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile
index 63cecea..79e1156 100644
--- a/libcxx/utils/ci/Dockerfile
+++ b/libcxx/utils/ci/Dockerfile
@@ -38,6 +38,7 @@
# If you're only looking to run the Docker image locally for debugging a
# build bot, see the `run-buildbot-container` script located in this directory.
+ARG ACTIONS_BASE_IMAGE
# HACK: We set the base image in the docker-compose file depending on the final target (buildkite vs github actions).
# This means we have a much slower container build, but we can use the same Dockerfile for both targets.
@@ -309,7 +310,20 @@ CMD /opt/android/container-setup.sh && buildkite-agent start
#
# IMAGE: ghcr.io/libcxx/actions-builder.
#
-FROM builder-base AS actions-builder
-
-WORKDIR /home/runner
-USER runner
+FROM $ACTIONS_BASE_IMAGE AS actions-builder
+
+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..36b8dd7 100644
--- a/libcxx/utils/ci/docker-compose.yml
+++ b/libcxx/utils/ci/docker-compose.yml
@@ -3,6 +3,16 @@ x-versions: &compiler_versions
LLVM_HEAD_VERSION: 21
services:
+ builder-base:
+ image: ghcr.io/llvm/libcxx-linux-builder-base:${TAG}
+ build:
+ context: .
+ dockerfile: Dockerfile
+ target: builder-base
+ args:
+ BASE_IMAGE: ubuntu:jammy
+ <<: *compiler_versions
+
actions-builder:
image: ghcr.io/llvm/libcxx-linux-builder:${TAG}
build:
@@ -10,7 +20,9 @@ services:
dockerfile: Dockerfile
target: actions-builder
args:
- BASE_IMAGE: ghcr.io/actions/actions-runner:2.326.0
+ BASE_IMAGE: ubuntu:jammy
+ ACTIONS_BASE_IMAGE: builder-base
+ GITHUB_RUNNER_VERSION: "2.326.0"
<<: *compiler_versions
android-buildkite-builder: