File tree Expand file tree Collapse file tree 3 files changed +35
-6
lines changed
Expand file tree Collapse file tree 3 files changed +35
-6
lines changed Original file line number Diff line number Diff line change 3636
3737 - name : Build the Linux builder image
3838 working-directory : libcxx/utils/ci
39- run : docker compose build actions-builder
39+ run : |
40+ docker compose build builder-base
41+ docker compose build actions-builder
4042 env :
4143 TAG : ${{ github.sha }}
4244
5759 if : github.event_name == 'push'
5860 working-directory : libcxx/utils/ci
5961 run : |
62+ docker compose push builder-base
6063 docker compose push actions-builder
6164 env :
6265 TAG : ${{ github.sha }}
Original file line number Diff line number Diff line change 3838# If you're only looking to run the Docker image locally for debugging a
3939# build bot, see the `run-buildbot-container` script located in this directory.
4040
41+ ARG ACTIONS_BASE_IMAGE
4142
4243# HACK: We set the base image in the docker-compose file depending on the final target (buildkite vs github actions).
4344# This means we have a much slower container build, but we can use the same Dockerfile for both targets.
@@ -310,7 +311,20 @@ CMD /opt/android/container-setup.sh && buildkite-agent start
310311#
311312# IMAGE: ghcr.io/libcxx/actions-builder.
312313#
313- FROM builder-base AS actions-builder
314-
315- WORKDIR /home/runner
316- USER runner
314+ FROM $ACTIONS_BASE_IMAGE AS actions-builder
315+
316+ ARG GITHUB_RUNNER_VERSION
317+
318+ RUN useradd gha -u 1001 -m -s /bin/bash
319+ RUN adduser gha sudo
320+ RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
321+ WORKDIR /home/gha
322+ USER gha
323+
324+ ENV RUNNER_MANUALLY_TRAP_SIG=1
325+ ENV ACTIONS_RUNNER_PRINT_LOG_TO_STDOUT=1
326+ RUN mkdir actions-runner && \
327+ cd actions-runner && \
328+ curl -O -L https://github.com/actions/runner/releases/download/v$GITHUB_RUNNER_VERSION/actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
329+ tar xzf ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz && \
330+ rm ./actions-runner-linux-x64-$GITHUB_RUNNER_VERSION.tar.gz
Original file line number Diff line number Diff line change @@ -3,14 +3,26 @@ x-versions: &compiler_versions
33 LLVM_HEAD_VERSION : 21
44
55services :
6+ builder-base :
7+ image : ghcr.io/llvm/libcxx-linux-builder-base:${TAG}
8+ build :
9+ context : .
10+ dockerfile : Dockerfile
11+ target : builder-base
12+ args :
13+ BASE_IMAGE : ubuntu:jammy
14+ << : *compiler_versions
15+
616 actions-builder :
717 image : ghcr.io/llvm/libcxx-linux-builder:${TAG}
818 build :
919 context : .
1020 dockerfile : Dockerfile
1121 target : actions-builder
1222 args :
13- BASE_IMAGE : ghcr.io/actions/actions-runner:2.326.0
23+ BASE_IMAGE : ubuntu:jammy
24+ ACTIONS_BASE_IMAGE : builder-base
25+ GITHUB_RUNNER_VERSION : " 2.326.0"
1426 << : *compiler_versions
1527
1628 android-buildkite-builder :
You can’t perform that action at this time.
0 commit comments