-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[libc++][Android] Fix Dockerfile #154856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc++][Android] Fix Dockerfile #154856
Conversation
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). (This Docker image doesn't actually exist at ghcr.io (yet), but it is the name produced by the Docker compose file.)
@llvm/pr-subscribers-github-workflow @llvm/pr-subscribers-libcxx Author: Ryan Prichard (rprichard) ChangesIn 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). (This Docker image doesn't actually exist at ghcr.io (yet), but it is the name produced by the Docker compose file.) Full diff: https://github.com/llvm/llvm-project/pull/154856.diff 2 Files Affected:
diff --git a/libcxx/utils/ci/docker-compose.yml b/libcxx/utils/ci/docker-compose.yml
index ccaee8c896ded..44f9e6354ff51 100644
--- a/libcxx/utils/ci/docker-compose.yml
+++ b/libcxx/utils/ci/docker-compose.yml
@@ -37,4 +37,4 @@ services:
ANDROID_CLANG_VERSION: r563880
ANDROID_CLANG_PREBUILTS_COMMIT: 6ae4184bb8706f9731569b9a0a82be3fcdcb951c
ANDROID_SYSROOT_COMMIT: f8b85cc5262c6e5cbc9a92c1bab2b18b32a4c63f
- <<: *compiler_versions
+ <<: [*image_versions, *compiler_versions]
diff --git a/libcxx/utils/ci/vendor/android/run-buildbot-container b/libcxx/utils/ci/vendor/android/run-buildbot-container
index 7b5d9a4cc3fe7..81c719b1f8b96 100755
--- a/libcxx/utils/ci/vendor/android/run-buildbot-container
+++ b/libcxx/utils/ci/vendor/android/run-buildbot-container
@@ -27,5 +27,5 @@ if [ -S /var/run/docker.sock ]; then
DOCKER_OPTIONS+=(--volume /var/run/docker.sock:/var/run/docker.sock)
fi
-docker run "${DOCKER_OPTIONS[@]}" ghcr.io/libcxx/android-buildkite-builder \
+docker run "${DOCKER_OPTIONS[@]}" ghcr.io/llvm/libcxx-android-builder \
bash -c 'git config --global --add safe.directory /llvm; (/opt/android/container-setup.sh && exec bash)'
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling the android libcxx builder in CI is disabled (
# - name: Build the Android builder image |
Okay, I re-enabled the build of the main Android Docker image. Currently the GCE VMs for Android use three Docker image paths that aren't public (the main image, and two images that each contain the Android Emulator and an Android system image). Once we have a public Docker image with the Android Clang + sysroot, I can switch the GCE VM over to using it, so that updating the Dockerfile will automatically update what the Android GCE VMs are using. I think that's an improvement. Maybe we could also build the two emulator images, as well? Currently I've been building them by hand (libcxx/utils/ci/vendor/android/build-emulator-images.sh) and pushing them to the private Artifact Registry path that the VMs use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the CI container build you'll need to configure docker daemon to use the space in /mnt
rather than the default location.
https://evodify.com/change-docker-storage-location/ should have info.
Not sure why GHA hosted runners have disk space bifurcated between the main drive and /mnt
, but it is the way it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please wait for one of the libc++ maintainers to review before merging this though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
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.