From fac577d42330e57c17540cabdb8be43c90b715d9 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 28 Mar 2021 14:04:50 +0200 Subject: ci: Build depends only once for Android build Depends is currently built twice for the Android build. For example, the same task building it twice: * https://cirrus-ci.com/task/6673185279049728?logs=ci#L3418 (aarch64-linux-android) * https://cirrus-ci.com/task/6673185279049728?logs=ci#L3422 (x86_64-pc-linux-gnu, 4 lines later) --- ci/test/00_setup_env_android.sh | 12 ++++++++++-- ci/test/05_before_script.sh | 5 ----- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'ci') diff --git a/ci/test/00_setup_env_android.sh b/ci/test/00_setup_env_android.sh index 8b872faec5..f4239b4ef3 100644 --- a/ci/test/00_setup_env_android.sh +++ b/ci/test/00_setup_env_android.sh @@ -6,12 +6,20 @@ export LC_ALL=C.UTF-8 -export CONTAINER_NAME=ci_android +export HOST=aarch64-linux-android export PACKAGES="clang llvm unzip openjdk-8-jdk gradle" +export CONTAINER_NAME=ci_android +export DOCKER_NAME_TAG="ubuntu:bionic" + +export RUN_UNIT_TESTS=false +export RUN_FUNCTIONAL_TESTS=false export ANDROID_API_LEVEL=28 export ANDROID_BUILD_TOOLS_VERSION=28.0.3 export ANDROID_NDK_VERSION=21.1.6352462 export ANDROID_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip +export ANDROID_HOME="${DEPENDS_DIR}/SDKs/android" +export ANDROID_NDK_HOME="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}" +export DEP_OPTS="ANDROID_SDK=${ANDROID_HOME} ANDROID_NDK=${ANDROID_NDK_HOME} ANDROID_API_LEVEL=${ANDROID_API_LEVEL} ANDROID_TOOLCHAIN_BIN=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/" -export BITCOIN_CONFIG="--disable-ccache" \ No newline at end of file +export BITCOIN_CONFIG="--disable-ccache" diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh index 3bfeb2d67f..8dd489d7f8 100755 --- a/ci/test/05_before_script.sh +++ b/ci/test/05_before_script.sh @@ -24,16 +24,11 @@ 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 -- cgit v1.2.3