File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Copyright (c) 2019-2020 The Bitcoin Core developers
4+ # Distributed under the MIT software license, see the accompanying
5+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
6+
7+ export LC_ALL=C.UTF-8
8+
9+ export CONTAINER_NAME=ci_android
10+ export PACKAGES=" clang llvm unzip openjdk-8-jdk gradle"
11+
12+ export ANDROID_API_LEVEL=28
13+ export ANDROID_BUILD_TOOLS_VERSION=28.0.3
14+ export ANDROID_NDK_VERSION=21.1.6352462
15+ export ANDROID_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
16+
17+ export BITCOIN_CONFIG=" --disable-ccache"
Original file line number Diff line number Diff line change @@ -22,6 +22,20 @@ if [ -n "$XCODE_VERSION" ] && [ ! -f "$OSX_SDK_PATH" ]; then
2222 DOCKER_EXEC curl --location --fail " ${SDK_URL} /${OSX_SDK_BASENAME} " -o " $OSX_SDK_PATH "
2323fi
2424
25+ if [ -n " $ANDROID_TOOLS_URL " ]; then
26+ ANDROID_TOOLS_PATH=$DEPENDS_DIR /sdk-sources/android-tools.zip
27+ ANDROID_HOME=" $DEPENDS_DIR " /SDKs/android
28+ ANDROID_NDK_HOME=${ANDROID_HOME} /ndk/${ANDROID_NDK_VERSION}
29+
30+ DOCKER_EXEC curl --location --fail " ${ANDROID_TOOLS_URL} " -o " $ANDROID_TOOLS_PATH "
31+ DOCKER_EXEC mkdir -p " ${ANDROID_HOME} /cmdline-tools"
32+ DOCKER_EXEC unzip -o " $ANDROID_TOOLS_PATH " -d " ${ANDROID_HOME} /cmdline-tools"
33+ 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} \" "
34+
35+ 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 "
36+ DOCKER_EXEC " $MAKE_COMMAND " HOST=aarch64-linux-android
37+ fi
38+
2539if [[ ${USE_MEMORY_SANITIZER} == " true" ]]; then
2640 # Use BDB compiled using install_db4.sh script to work around linking issue when using BDB
2741 # from depends. See https://github.com/bitcoin/bitcoin/pull/18288#discussion_r433189350 for
Original file line number Diff line number Diff line change 66
77export LC_ALL=C.UTF-8
88
9+ if [ -n " $ANDROID_TOOLS_URL " ]; then
10+ DOCKER_EXEC make distclean || true
11+ DOCKER_EXEC ./autogen.sh
12+ DOCKER_EXEC ./configure $BITCOIN_CONFIG --prefix=$DEPENDS_DIR /aarch64-linux-android || ( (DOCKER_EXEC cat config.log) && false)
13+ DOCKER_EXEC " cd src/qt && make $MAKEJOBS && ANDROID_HOME=${ANDROID_HOME} ANDROID_NDK_HOME=${ANDROID_NDK_HOME} make apk"
14+ exit 0
15+ fi
16+
917BITCOIN_CONFIG_ALL=" --enable-suppress-external-warnings --disable-dependency-tracking --prefix=$DEPENDS_DIR /$HOST --bindir=$BASE_OUTDIR /bin --libdir=$BASE_OUTDIR /lib"
1018if [ -z " $NO_WERROR " ]; then
1119 BITCOIN_CONFIG_ALL=" ${BITCOIN_CONFIG_ALL} --enable-werror"
You can’t perform that action at this time.
0 commit comments