Skip to content
Snippets Groups Projects
Commit c70bbc83 authored by John Kessenich's avatar John Kessenich Committed by GitHub
Browse files

Merge pull request #889 from antiagainst/travis-android

Check Android build on Travis CI
parents ef7efb21 b21213e8
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ os: ...@@ -7,7 +7,7 @@ os:
- osx - osx
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment. # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
sudo: required sudo: false
dist: trusty dist: trusty
env: env:
...@@ -24,6 +24,9 @@ matrix: ...@@ -24,6 +24,9 @@ matrix:
# Skip GCC builds on Mac OS X. # Skip GCC builds on Mac OS X.
- os: osx - os: osx
compiler: gcc compiler: gcc
include:
# Additional build using Android NDK.
- env: BUILD_NDK=ON
cache: cache:
apt: true apt: true
...@@ -41,20 +44,38 @@ addons: ...@@ -41,20 +44,38 @@ addons:
install: install:
# Install ninja on Mac OS X. # Install ninja on Mac OS X.
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
# Make sure that clang-3.6 is selected. # Make sure that clang-3.6 is selected on Linux.
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
export CC=clang-3.6 CXX=clang++-3.6; export CC=clang-3.6 CXX=clang++-3.6;
fi fi
# Download Android NDK and Android CMake toolchain file.
- 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: before_script:
- git clone https://github.com/google/googletest.git External/googletest - git clone https://github.com/google/googletest.git External/googletest
script: script:
- mkdir build && cd build - mkdir build && cd build
# We need to install the compiled binaries so the paths in the runtests script can resolve correctly. # For Android, do release building using NDK without testing.
- cmake -GNinja -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=`pwd`/install .. # For Linux and macOS, do debug/release building with testing.
- ninja install - if [[ "$BUILD_NDK" == "ON" ]]; then
# Run Google-Test-based tests. cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
- ctest --output-on-failure -DANDROID_NATIVE_API_LEVEL=android-12
# Run runtests-based tests. -DCMAKE_BUILD_TYPE=Release
- cd ../Test && ./runtests -DANDROID_ABI="armeabi-v7a with NEON"
-DBUILD_TESTING=OFF
-GNinja ..;
ninja;
else
cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX=`pwd`/install
-GNinja ..;
ninja install;
ctest --output-on-failure &&
cd ../Test && ./runtests;
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment