aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-07-28 12:35:40 -0700
committerAkash Banerjee <Akash.Banerjee@amd.com>2025-07-28 20:39:52 +0100
commitc93083ac24fb9b7f65951c85c6e174a35da0914c (patch)
tree21cdf44a528cadfdbcc69c135999bdaae999fd32
parent02bd06438e3b445a8ef1b0e6e7d904b83d0c6a7d (diff)
downloadllvm-c93083ac24fb9b7f65951c85c6e174a35da0914c.zip
llvm-c93083ac24fb9b7f65951c85c6e174a35da0914c.tar.gz
llvm-c93083ac24fb9b7f65951c85c6e174a35da0914c.tar.bz2
[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: https://github.com/llvm/llvm-project/pull/148073
-rw-r--r--.github/workflows/libcxx-build-containers.yml5
-rw-r--r--libcxx/utils/ci/Dockerfile3
-rw-r--r--libcxx/utils/ci/docker-compose.yml11
3 files changed, 17 insertions, 2 deletions
diff --git a/.github/workflows/libcxx-build-containers.yml b/.github/workflows/libcxx-build-containers.yml
index f432e3d..43c446a 100644
--- a/.github/workflows/libcxx-build-containers.yml
+++ b/.github/workflows/libcxx-build-containers.yml
@@ -34,7 +34,9 @@ jobs:
- name: Build the Linux builder image
working-directory: libcxx/utils/ci
- run: docker compose build actions-builder
+ run: |
+ docker compose build builder-base
+ docker compose build actions-builder
env:
TAG: ${{ github.sha }}
@@ -55,6 +57,7 @@ jobs:
if: github.event_name == 'push'
working-directory: libcxx/utils/ci
run: |
+ docker compose push builder-base
docker compose push actions-builder
env:
TAG: ${{ github.sha }}
diff --git a/libcxx/utils/ci/Dockerfile b/libcxx/utils/ci/Dockerfile
index cec4806..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,7 @@ CMD /opt/android/container-setup.sh && buildkite-agent start
#
# IMAGE: ghcr.io/libcxx/actions-builder.
#
-FROM builder-base AS actions-builder
+FROM $ACTIONS_BASE_IMAGE AS actions-builder
ARG GITHUB_RUNNER_VERSION
diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml
index 3b23aa2..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:
@@ -11,6 +21,7 @@ services:
target: actions-builder
args:
BASE_IMAGE: ubuntu:jammy
+ ACTIONS_BASE_IMAGE: builder-base
GITHUB_RUNNER_VERSION: "2.326.0"
<<: *compiler_versions