Skip to content

Commit 84afb6c

Browse files
boomanaiden154github-actions[bot]
authored andcommitted
Automerge: [libcxx] Enable installing new runner binary on existing container
This patch does some refactoring to enable installing a new GHA runner binary into an existing libcxx image. We achieve this by pushing the base image to the registry and enabling control over the base image used for building the actions image. This will always build and push both images even if an existing image is being used for the actions image, but this should not impact anything as the SHAs are pinned everywhere and space/build time is not a large concern. Reviewers: ldionne, EricWF, #reviewers-libcxx Reviewed By: ldionne Pull Request: llvm/llvm-project#148073
2 parents 9639372 + b33f9f6 commit 84afb6c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

libcxx/utils/ci/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
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.
@@ -309,7 +310,7 @@ CMD /opt/android/container-setup.sh && buildkite-agent start
309310
#
310311
# IMAGE: ghcr.io/libcxx/actions-builder.
311312
#
312-
FROM builder-base AS actions-builder
313+
FROM $ACTIONS_BASE_IMAGE AS actions-builder
313314

314315
ARG GITHUB_RUNNER_VERSION
315316

libcxx/utils/ci/docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ x-versions: &compiler_versions
33
LLVM_HEAD_VERSION: 21
44

55
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+
616
actions-builder:
717
image: ghcr.io/llvm/libcxx-linux-builder:${TAG}
818
build:
@@ -11,6 +21,7 @@ services:
1121
target: actions-builder
1222
args:
1323
BASE_IMAGE: ubuntu:jammy
24+
ACTIONS_BASE_IMAGE: builder-base
1425
GITHUB_RUNNER_VERSION: "2.326.0"
1526
<<: *compiler_versions
1627

0 commit comments

Comments
 (0)