diff options
author | Igor Cota <igor@openbook.hr> | 2020-08-28 11:11:39 +0200 |
---|---|---|
committer | Igor Cota <igor@openbook.hr> | 2021-03-21 22:33:35 +0100 |
commit | 7563720e30a3052b7ee390f1b3d2874856fd073a (patch) | |
tree | 1a8c4eb4238a60450c86a51784064fc3b20464fd /ci/test/05_before_script.sh | |
parent | ebfb10cb75adb704418d08197681c1e742e63bd5 (diff) | |
download | bitcoin-7563720e30a3052b7ee390f1b3d2874856fd073a.tar.xz |
CI: add Android APK build script
Diffstat (limited to 'ci/test/05_before_script.sh')
-rwxr-xr-x | ci/test/05_before_script.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh index f69afd8a26..3bfeb2d67f 100755 --- a/ci/test/05_before_script.sh +++ b/ci/test/05_before_script.sh @@ -22,6 +22,20 @@ if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then DOCKER_EXEC curl --location --fail "${SDK_URL}/${OSX_SDK_BASENAME}" -o "$OSX_SDK_PATH" fi +if [ -n "$ANDROID_TOOLS_URL" ]; then + ANDROID_TOOLS_PATH=$DEPENDS_DIR/sdk-sources/android-tools.zip + ANDROID_HOME="$DEPENDS_DIR"/SDKs/android + ANDROID_NDK_HOME=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION} + + DOCKER_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH" + DOCKER_EXEC mkdir -p "${ANDROID_HOME}/cmdline-tools" + DOCKER_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "${ANDROID_HOME}/cmdline-tools" + DOCKER_EXEC "yes | ${ANDROID_HOME}/cmdline-tools/tools/bin/sdkmanager --install \"build-tools;${ANDROID_BUILD_TOOLS_VERSION}\" \"platform-tools\" \"platforms;android-${ANDROID_API_LEVEL}\" \"ndk;${ANDROID_NDK_VERSION}\"" + + MAKE_COMMAND="ANDROID_SDK=${ANDROID_HOME} ANDROID_NDK=${ANDROID_NDK_HOME} make $MAKEJOBS -C depends HOST=aarch64-linux-android ANDROID_API_LEVEL=${ANDROID_API_LEVEL} ANDROID_TOOLCHAIN_BIN=${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}/toolchains/llvm/prebuilt/linux-x86_64/bin/ $DEP_OPTS" + DOCKER_EXEC "$MAKE_COMMAND" HOST=aarch64-linux-android +fi + if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then # Use BDB compiled using install_db4.sh script to work around linking issue when using BDB # from depends. See https://github.com/bitcoin/bitcoin/pull/18288#discussion_r433189350 for |