mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
863b329ccd
Seen when someone has to relaunch `ci_build.sh` manually, for troubleshooting, or experiment(s), ci_build.sh stops as libraries are already built. Solution: Clean more temporary/build folders before build. Note: To be reported in ZYRE/CZMQ via ZProject. When called from ZYRE/CZMQ, it's difficult to identify which build script is being executed Solution: Modify each `echo` trace to show the project name and Android architecture in progress. Note: To be reported in ZYRE/CZMQ via ZProject.
41 lines
769 B
Bash
Executable File
41 lines
769 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Exit if any step fails
|
|
set -e
|
|
|
|
export NDK_VERSION=android-ndk-r25
|
|
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
|
|
|
# Cleanup.
|
|
rm -rf /tmp/android_build/
|
|
rm -rf prefix/
|
|
rm -rf /tmp/tmp-deps
|
|
mkdir -p /tmp/tmp-deps
|
|
|
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
|
linux*)
|
|
HOST_PLATFORM=linux
|
|
;;
|
|
darwin*)
|
|
HOST_PLATFORM=darwin
|
|
;;
|
|
*)
|
|
echo "Unsupported platform"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if [ ! -d "${ANDROID_NDK_ROOT}" ]; then
|
|
export FILENAME=$NDK_VERSION-$HOST_PLATFORM.zip
|
|
|
|
(cd '/tmp' \
|
|
&& wget http://dl.google.com/android/repository/$FILENAME -O $FILENAME &> /dev/null \
|
|
&& unzip -q $FILENAME) || exit 1
|
|
unset FILENAME
|
|
fi
|
|
|
|
./build.sh "arm"
|
|
./build.sh "arm64"
|
|
./build.sh "x86"
|
|
./build.sh "x86_64"
|