2016-05-04 15:29:21 +00:00
|
|
|
# Linux and Mac Build Configuration for Travis
|
|
|
|
|
|
|
|
language: cpp
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
|
|
|
|
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
2017-05-13 18:26:30 +00:00
|
|
|
sudo: false
|
2016-05-04 15:29:21 +00:00
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
env:
|
|
|
|
- GLSLANG_BUILD_TYPE=Release
|
|
|
|
- GLSLANG_BUILD_TYPE=Debug
|
|
|
|
|
|
|
|
compiler:
|
|
|
|
- clang
|
|
|
|
- gcc
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true # Show final status immediately if a test fails.
|
|
|
|
exclude:
|
|
|
|
# Skip GCC builds on Mac OS X.
|
|
|
|
- os: osx
|
|
|
|
compiler: gcc
|
2017-05-13 18:26:30 +00:00
|
|
|
include:
|
|
|
|
# Additional build using Android NDK.
|
|
|
|
- env: BUILD_NDK=ON
|
2016-05-04 15:29:21 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
apt: true
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-3.6
|
|
|
|
|
|
|
|
install:
|
2017-05-13 18:26:30 +00:00
|
|
|
# Make sure that clang-3.6 is selected on Linux.
|
2016-05-04 15:29:21 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
|
|
|
|
export CC=clang-3.6 CXX=clang++-3.6;
|
|
|
|
fi
|
2017-05-13 18:26:30 +00:00
|
|
|
# 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
|
2016-05-04 15:29:21 +00:00
|
|
|
|
|
|
|
before_script:
|
2017-09-25 18:04:20 +00:00
|
|
|
- git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
2017-09-22 21:30:10 +00:00
|
|
|
- ./update_glslang_sources.py
|
2016-05-04 15:29:21 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir build && cd build
|
2017-05-13 18:26:30 +00:00
|
|
|
# For Android, do release building using NDK without testing.
|
|
|
|
# For Linux and macOS, do debug/release building with testing.
|
|
|
|
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
|
|
|
|
-DANDROID_NATIVE_API_LEVEL=android-12
|
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
-DANDROID_ABI="armeabi-v7a with NEON"
|
2017-09-25 18:04:20 +00:00
|
|
|
-DBUILD_TESTING=OFF ..;
|
|
|
|
make -j4;
|
2017-05-13 18:26:30 +00:00
|
|
|
else
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
|
2017-09-25 18:04:20 +00:00
|
|
|
-DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
|
|
|
|
make -j4 install;
|
2017-05-13 18:26:30 +00:00
|
|
|
ctest --output-on-failure &&
|
|
|
|
cd ../Test && ./runtests;
|
|
|
|
fi
|