Skip to content

Commit 6b45060

Browse files
authored
[libc++][Android] Fix Dockerfile (#154856)
In docker-compose.yml, add *image_versions arguments for the android-buildkite-builder service, so that ACTIONS_BASE_IMAGE is set (to builder-base). This will also set the BASE_IMAGE, which we don't really want, because this service uses ubuntu:noble instead of the ubuntu:jammy default, but that's OK because the setting is successfully overridden. In vendor/android/run-buildbot-container, use the correct ghcr.io Docker path (ghcr.io/llvm/libcxx-android-builder). Reenable the build-and-push of ghcr.io/llvm/libcxx-android-builder in the libcxx-build-containers.yml workflow.
1 parent a89a66e commit 6b45060

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.github/workflows/libcxx-build-containers.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3434

35+
# The default Docker storage location for GitHub Actions doesn't have
36+
# enough disk space, so change it to /mnt, which has more disk space.
37+
- name: Change Docker storage location
38+
run: |
39+
sudo mkdir /mnt/docker
40+
echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
41+
sudo systemctl restart docker
42+
3543
- name: Build the Linux builder image
3644
working-directory: libcxx/utils/ci
3745
run: |
@@ -40,11 +48,11 @@ jobs:
4048
env:
4149
TAG: ${{ github.sha }}
4250

43-
# - name: Build the Android builder image
44-
# working-directory: libcxx/utils/ci
45-
# run: docker compose build android-buildkite-builder
46-
# env:
47-
# TAG: ${{ github.sha }}
51+
- name: Build the Android builder image
52+
working-directory: libcxx/utils/ci
53+
run: docker compose build android-buildkite-builder
54+
env:
55+
TAG: ${{ github.sha }}
4856

4957
- name: Log in to GitHub Container Registry
5058
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
@@ -62,10 +70,10 @@ jobs:
6270
env:
6371
TAG: ${{ github.sha }}
6472

65-
# - name: Push the Android builder image
66-
# if: github.event_name == 'push'
67-
# working-directory: libcxx/utils/ci
68-
# run: |
69-
# docker compose push android-buildkite-builder
70-
# env:
71-
# TAG: ${{ github.sha }}
73+
- name: Push the Android builder image
74+
if: github.event_name == 'push'
75+
working-directory: libcxx/utils/ci
76+
run: |
77+
docker compose push android-buildkite-builder
78+
env:
79+
TAG: ${{ github.sha }}

libcxx/utils/ci/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ services:
3737
ANDROID_CLANG_VERSION: r563880
3838
ANDROID_CLANG_PREBUILTS_COMMIT: 6ae4184bb8706f9731569b9a0a82be3fcdcb951c
3939
ANDROID_SYSROOT_COMMIT: f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f
40-
<<: *compiler_versions
40+
<<: [*image_versions, *compiler_versions]

libcxx/utils/ci/vendor/android/run-buildbot-container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ if [ -S /var/run/docker.sock ]; then
2727
DOCKER_OPTIONS+=(--volume /var/run/docker.sock:/var/run/docker.sock)
2828
fi
2929

30-
docker run "${DOCKER_OPTIONS[@]}" ghcr.io/libcxx/android-buildkite-builder \
30+
docker run "${DOCKER_OPTIONS[@]}" ghcr.io/llvm/libcxx-android-builder \
3131
bash -c 'git config --global --add safe.directory /llvm; (/opt/android/container-setup.sh && exec bash)'

0 commit comments

Comments
 (0)