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 36
36
37
37
- name : Build the Linux builder image
38
38
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
40
42
env :
41
43
TAG : ${{ github.sha }}
42
44
57
59
if : github.event_name == 'push'
58
60
working-directory : libcxx/utils/ci
59
61
run : |
62
+ docker compose push builder-base
60
63
docker compose push actions-builder
61
64
env :
62
65
TAG : ${{ github.sha }}
Original file line number Diff line number Diff line change 38
38
# If you're only looking to run the Docker image locally for debugging a
39
39
# build bot, see the `run-buildbot-container` script located in this directory.
40
40
41
+ ARG ACTIONS_BASE_IMAGE
41
42
42
43
# HACK: We set the base image in the docker-compose file depending on the final target (buildkite vs github actions).
43
44
# 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
310
311
#
311
312
# IMAGE: ghcr.io/libcxx/actions-builder.
312
313
#
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
3
3
LLVM_HEAD_VERSION : 21
4
4
5
5
services :
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
+
6
16
actions-builder :
7
17
image : ghcr.io/llvm/libcxx-linux-builder:${TAG}
8
18
build :
9
19
context : .
10
20
dockerfile : Dockerfile
11
21
target : actions-builder
12
22
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"
14
26
<< : *compiler_versions
15
27
16
28
android-buildkite-builder :
You can’t perform that action at this time.
0 commit comments