Add a Dockerfile for a new Docker image, libcxx-builder-android, that extends libcxx-builder with support for testing Android. The image includes these things: * An Android Clang compiler and sysroot. * The Android platform-tools (e.g. adb), so that an Android buildbot can run programs on an Android device. At container startup, copy these platform tools to an "android-platform-tools" Docker volume to share them with an emulator container. This copying ensures that the emulator and libcxx-builder containers avoid mismatched adb versions. * Docker, so that an Android buildbot can manage a sibling Docker container that runs the Android emulator. Add an Android-specific run-buildbot-container script for local development. Currently using this script requires building libcxx-build-android and an emulator image locally. Fixes: https://github.com/llvm/llvm-project/issues/69270 Differential Revision: https://reviews.llvm.org/D155271
20 lines
839 B
Bash
Executable File
20 lines
839 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#===----------------------------------------------------------------------===##
|
|
#
|
|
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
# See https://llvm.org/LICENSE.txt for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
#
|
|
#===----------------------------------------------------------------------===##
|
|
|
|
set -e
|
|
|
|
# Different versions of adb can sometimes be incompatible (i.e. "adb server
|
|
# version (nn) doesn't match this client (mm); killing..."). Ensure that the adb
|
|
# in the main builder image matches that in the emulator by sharing the
|
|
# platform-tools from the main image.
|
|
if [ -d /mnt/android-platform-tools ]; then
|
|
sudo rm -fr /mnt/android-platform-tools/platform-tools
|
|
sudo cp -r /opt/android/sdk/platform-tools /mnt/android-platform-tools
|
|
fi
|