Skip to content

Commit 7fee5ff

Browse files
committed
1 parent ae612f2 commit 7fee5ff

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

swift-ci/sdks/android/build-docker

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
#
77
# ===----------------------------------------------------------------------===
88

9+
# default architectures to build for
10+
TARGET_ARCHS=${TARGET_ARCHS:-aarch64,x86_64,armv7}
11+
12+
ANDROID_NDK_VERSION=android-ndk-r27c
13+
ANDROID_API=28
14+
915
if [[ "$DOCKER" == "" ]]; then
1016
DOCKER=docker
1117
fi
@@ -26,15 +32,11 @@ esac
2632
HOST_OS=ubuntu24.04
2733
source ./scripts/toolchain-vars.sh
2834

29-
ANDROID_API=28
30-
ANDROID_NDK_VERSION=android-ndk-r27c
31-
3235
# Build the Docker image
3336
$DOCKER build --build-arg OS_ARCH_SUFFIX=$OS_ARCH_SUFFIX --build-arg SWIFT_TOOLCHAIN_URL=$SWIFT_TOOLCHAIN_URL --build-arg ANDROID_NDK_VERSION=$ANDROID_NDK_VERSION -t swift-android .
3437

35-
# Check-out the sources
38+
# Check-out and patch the sources
3639
./scripts/fetch-source.sh --source-dir source --swift-tag ${SWIFT_TAG}
37-
3840
./scripts/patch-sources.sh source
3941

4042
mkdir -p products

swift-ci/sdks/android/scripts/build.sh

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,11 +232,6 @@ function run() {
232232
}
233233

234234
for arch in $archs; do
235-
# enable short-circuiting the individual builds
236-
if [[ ! -z "$SWIFT_ANDROID_ARCHIVEONLY" ]]; then
237-
continue
238-
fi
239-
240235
case $arch in
241236
armv7) target_host="arm-linux-androideabi"; compiler_target_host="armv7a-linux-androideabi$android_api"; android_abi="armeabi-v7a" ;;
242237
aarch64) target_host="aarch64-linux-android"; compiler_target_host="$target_host$android_api"; android_abi="arm64-v8a" ;;
@@ -629,13 +624,11 @@ EOF
629624

630625
quiet_popd
631626

632-
if [[ -z "$SWIFT_ANDROID_ARCHIVEONLY" ]]; then
633-
header "Outputting compressed bundle"
627+
header "Outputting compressed bundle"
634628

635-
quiet_pushd "${build_dir}"
636-
mkdir -p "${products_dir}"
637-
tar czf "${products_dir}/${bundle}.tar.gz" "${bundle}"
638-
quiet_popd
639-
fi
629+
quiet_pushd "${build_dir}"
630+
mkdir -p "${products_dir}"
631+
tar czf "${products_dir}/${bundle}.tar.gz" "${bundle}"
632+
quiet_popd
640633

641634
groupend

0 commit comments

Comments
 (0)