Travis CI: add build configuration for Android NDK with cmake.

This commit is contained in:
Lei Zhang 2016-08-17 10:34:53 -04:00
parent 0d4b73c3bf
commit e96a881b0b

View File

@ -25,6 +25,9 @@ compiler:
- gcc
matrix:
include:
# Additional build using Android NDK
- env: BUILD_NDK=ON
exclude:
# Skip GCC builds on Mac OS X.
- os: osx
@ -45,6 +48,12 @@ addons:
before_install:
# Install cmake & ninja on Mac OS X.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install cmake ninja; fi
- if [[ "$BUILD_NDK" == "ON" ]]; then
git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
export ANDROID_NDK=$HOME/android-ndk;
git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
fi
before_script:
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
@ -52,9 +61,18 @@ before_script:
script:
- mkdir build && cd build
- cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
- if [[ "$BUILD_NDK" == "ON" ]]; then
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
-DANDROID_NATIVE_API_LEVEL=android-9
-DCMAKE_BUILD_TYPE=Release
-DANDROID_ABI="armeabi-v7a with NEON"
-DSPIRV_SKIP_TESTS=ON
-GNinja ..;
else
cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
fi
- ninja
- ctest -j`nproc` --output_on_failure
- if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j`nproc` --output_on_failure; fi
notifications: