1 # Linux Build Configuration for Travis
9 # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
13 # Use the default Xcode environment for Xcode.
16 # Each line is a set of environment variables set before a build.
17 # Thus each line represents a different build configuration.
28 # Additional build using Android NDK with android-cmake
29 - env: BUILD_ANDROID_CMAKE=ON
30 # Additional build using Android NDK with Android.mk
31 - env: BUILD_ANDROID_MK=ON
33 # Skip GCC builds on macOS.
48 - if [[ "$BUILD_ANDROID_CMAKE" == "ON" ]] || [[ "$BUILD_ANDROID_MK" == "ON" ]]; then
49 git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
50 export ANDROID_NDK=$HOME/android-ndk;
51 git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
52 export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
56 - git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
57 - git clone --depth=1 https://github.com/google/googletest external/googletest
60 # Due to the limitation of Travis platform, we cannot start too many concurrent jobs.
61 # Otherwise GCC will panic with internal error, possibility because of memory issues.
62 # ctest with the current tests doesn't profit from using more than 4 threads.
64 - mkdir build && cd build;
65 - if [[ "$BUILD_ANDROID_MK" == "ON" ]]; then
66 export BUILD_DIR=$(pwd);
67 mkdir ${BUILD_DIR}/libs;
68 mkdir ${BUILD_DIR}/app;
69 $ANDROID_NDK/ndk-build -C ../android_test NDK_PROJECT_PATH=.
70 NDK_LIBS_OUT=${BUILD_DIR}/libs
71 NDK_APP_OUT=${BUILD_DIR}/app -j${NPROC};
72 elif [[ "$BUILD_ANDROID_CMAKE" == "ON" ]]; then
73 cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
74 -DANDROID_NATIVE_API_LEVEL=android-9
75 -DCMAKE_BUILD_TYPE=Release
76 -DANDROID_ABI="armeabi-v7a with NEON"
77 -DSPIRV_BUILD_COMPRESSION=ON
78 -DSPIRV_SKIP_TESTS=ON ..;
81 cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DSPIRV_BUILD_COMPRESSION=ON ..;
83 ctest -j${NPROC} --output-on-failure --timeout 300;
91 - antiagainst@google.com
92 - awoloszyn@google.com