Skip to content

Commit 7c02307

Browse files
committed
[libc++] Add a Github action to build libc++'s Docker images
This patch adds a Github action that runs whenever changes to the libc++ Docker images are pushed to `main`. The action will rebuild the Docker images and push them to LLVM's container registry so that we can then point to those images from our CI nodes.
1 parent 394f59c commit 7c02307

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This file defines an action that builds the various Docker images used to run
2+
# libc++ CI whenever modifications to those Docker files are pushed to `main`.
3+
#
4+
# The images are pushed to the LLVM package registry at https://github.com/orgs/llvm/packages
5+
# and tagged appropriately. The selection of which Docker image version is used by the libc++
6+
# CI nodes at any given point is controlled by the libc++ maintainers using a mechanism that
7+
# is not publicly visible for safety purposes.
8+
9+
name: Build Docker images for libc++ CI
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
on:
16+
push:
17+
branches:
18+
- main
19+
paths:
20+
- 'libcxx/utils/ci/**'
21+
22+
jobs:
23+
build-and-push:
24+
runs-on: ubuntu-latest
25+
if: github.repository_owner == 'llvm'
26+
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Log in to GitHub Container Registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ghcr.io
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Build and push the Linux builder image
38+
working-directory: libcxx/utils/ci
39+
run:
40+
- docker compose build actions-builder
41+
- docker compose push actions-builder
42+
env:
43+
TAG: libcxx-linux-builder:${{ github.sha }}
44+
45+
- name: Build and push the Android builder image
46+
working-directory: libcxx/utils/ci
47+
run:
48+
- docker compose build android-buildkite-builder
49+
- docker compose push android-buildkite-builder
50+
env:
51+
TAG: libcxx-android-builder:${{ github.sha }}

0 commit comments

Comments
 (0)