summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Grandin <grandinp@gmail.com>2017-08-30 16:56:00 -0700
committerPierre Grandin <grandinp@gmail.com>2017-08-30 16:56:00 -0700
commitbcf965e37f92a179e4584afc19123f88d6e787ab (patch)
treedbee7123a1094485d1db44e94257c1528c8eb758
parentc703ae1dd4e33243c907013212d1e4e83668b6a8 (diff)
downloadnavit-bcf965e37f92a179e4584afc19123f88d6e787ab.tar.gz
Updating android x86 scripts for ci v2
-rw-r--r--.circleci/config.yml9
-rw-r--r--ci/build_android.sh1
-rw-r--r--ci/build_android_x86.sh11
3 files changed, 16 insertions, 5 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index e73aa9e55..c113e126e 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -34,9 +34,16 @@ jobs:
steps:
- checkout
- run:
- name: Build for Android x86
+ name: Setup common requirements
command: |
bash ci/setup_common_requirements.sh
+ - run:
+ name: Prepare the Android build environment
+ command: |
+ bash ci/setup_android.sh
+ - run:
+ name: Build for Android X86
+ command: |
bash ci/build_android_x86.sh
build_win32:
<<: *defaults
diff --git a/ci/build_android.sh b/ci/build_android.sh
index f1265774a..2f3a2cb6d 100644
--- a/ci/build_android.sh
+++ b/ci/build_android.sh
@@ -27,7 +27,6 @@ pushd $BUILD_PATH
android list targets
cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain/arm-eabi.cmake -DCACHE_SIZE='(20*1024*1024)' -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 ../
-cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain/arm-eabi.cmake -DCACHE_SIZE='(20*1024*1024)' -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 ..
make -j $(nproc --all)
diff --git a/ci/build_android_x86.sh b/ci/build_android_x86.sh
index 92297104f..a9d4743e5 100644
--- a/ci/build_android_x86.sh
+++ b/ci/build_android_x86.sh
@@ -12,17 +12,22 @@ export ANDROID_NDK_BIN=$ANDROID_NDK"/toolchains/x86-4.9/prebuilt/linux-x86_64/bi
export ANDROID_SDK="/usr/local/android-sdk-linux/"
export ANDROID_SDK_PLATFORM_TOOLS=$ANDROID_SDK"/platform-tools"
export PATH=$ANDROID_NDK_BIN:$ANDROID_SDK_PLATFORM_TOOLS:$PATH
-export BUILD_PATH=$START_PATH"/android-${ARCH}"
+export BUILD_PATH=android-${ARCH}
+
+export ANDROID_SDK_HOME=/opt/android-sdk-linux
+export ANDROID_HOME=/opt/android-sdk-linux
+export PATH=${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools:/opt/tools
+
wget -nv -c http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
[ -d ~/android-ndk-r11c ] || unzip -q -d ~ android-ndk-r11c-linux-x86_64.zip
[ -d $BUILD_PATH ] || mkdir -p $BUILD_PATH
-cd $BUILD_PATH
+pushd $BUILD_PATH
android list targets
-cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_FILE -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 -DDISABLE_CXX=1 -DDISABLE_QT=1 $SOURCE_PATH
+cmake -DCMAKE_TOOLCHAIN_FILE=../Toolchain/arm-eabi.cmake -DAVOID_FLOAT=1 -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n -DANDROID_API_VERSION=25 -DANDROID_NDK_API_VERSION=19 -DDISABLE_CXX=1 -DDISABLE_QT=1 ..
make -j $(nproc --all)
if [[ "${CIRCLE_BRANCH}" == "master" ]]; then