0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00
libzmq/builds/android/ci_build.sh
Luca Boccassi 8be568916e Problem: Android CI script hardcodes ABI version
Solution: use a variable for easier maintenance, in sync with zproject
2016-06-07 23:18:21 +01:00

32 lines
780 B
Bash
Executable File

#!/usr/bin/env bash
NDK_VER=android-ndk-r10e
NDK_ABI_VER=4.9
if [ $TRAVIS_OS_NAME == "linux" ]
then
NDK_PLATFORM=linux-x86_64
elif [ $TRAVIS_OS_NAME == "osx" ]
then
NDK_PLATFORM=darwin-x86_64
else
echo "Unsupported platform $TRAVIS_OS_NAME"
exit 1
fi
export FILENAME=$NDK_VER-$NDK_PLATFORM.bin
(cd '/tmp' \
&& wget http://dl.google.com/android/ndk/$FILENAME \
&& chmod a+x $FILENAME \
&& ./$FILENAME &> /dev/null ) || exit 1
unset FILENAME
export ANDROID_NDK_ROOT="/tmp/$NDK_VER"
export TOOLCHAIN_PATH="$ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$NDK_ABI_VER/prebuilt/$NDK_PLATFORM/bin"
export TOOLCHAIN_NAME="arm-linux-androideabi-$NDK_ABI_VER"
export TOOLCHAIN_HOST="arm-linux-androideabi"
export TOOLCHAIN_ARCH="arm"
source ./build.sh