Skip to content

Commit fac577d

Browse files
author
MarcoFalke
committed
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)
1 parent fa908a4 commit fac577d

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

ci/test/00_setup_env_android.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,20 @@
66

77
export LC_ALL=C.UTF-8
88

9-
export CONTAINER_NAME=ci_android
9+
export HOST=aarch64-linux-android
1010
export PACKAGES="clang llvm unzip openjdk-8-jdk gradle"
11+
export CONTAINER_NAME=ci_android
12+
export DOCKER_NAME_TAG="ubuntu:bionic"
13+
14+
export RUN_UNIT_TESTS=false
15+
export RUN_FUNCTIONAL_TESTS=false
1116

1217
export ANDROID_API_LEVEL=28
1318
export ANDROID_BUILD_TOOLS_VERSION=28.0.3
1419
export ANDROID_NDK_VERSION=21.1.6352462
1520
export ANDROID_TOOLS_URL=https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
21+
export ANDROID_HOME="${DEPENDS_DIR}/SDKs/android"
22+
export ANDROID_NDK_HOME="${ANDROID_HOME}/ndk/${ANDROID_NDK_VERSION}"
23+
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/"
1624

17-
export BITCOIN_CONFIG="--disable-ccache"
25+
export BITCOIN_CONFIG="--disable-ccache"

ci/test/05_before_script.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,11 @@ fi
2424

2525
if [ -n "$ANDROID_TOOLS_URL" ]; then
2626
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}
2927

3028
DOCKER_EXEC curl --location --fail "${ANDROID_TOOLS_URL}" -o "$ANDROID_TOOLS_PATH"
3129
DOCKER_EXEC mkdir -p "${ANDROID_HOME}/cmdline-tools"
3230
DOCKER_EXEC unzip -o "$ANDROID_TOOLS_PATH" -d "${ANDROID_HOME}/cmdline-tools"
3331
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
3732
fi
3833

3934
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then

0 commit comments

Comments
 (0)