Bots print output from timed out tests
[platform/upstream/SPIRV-Tools.git] / .travis.yml
1 # Linux Build Configuration for Travis
2
3 language: cpp
4
5 os:
6   - linux
7   - osx
8
9 # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
10 dist: trusty
11 sudo: required
12
13 # Use the default Xcode environment for Xcode.
14
15 env:
16   # Each line is a set of environment variables set before a build.
17   # Thus each line represents a different build configuration.
18   - BUILD_TYPE=Release
19   - BUILD_TYPE=Debug
20
21 compiler:
22   - clang
23   - gcc
24
25 matrix:
26   fast_finish: true
27   include:
28     # Additional build using Android NDK
29     - env: BUILD_NDK=ON
30   exclude:
31     # Skip GCC builds on macOS.
32     - os: osx
33       compiler: gcc
34
35 cache:
36   apt: true
37
38 branches:
39   only:
40     - master
41
42 addons:
43   apt:
44     packages:
45       - ninja-build
46
47 before_install:
48   # Install cmake & ninja on macOS.
49   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi
50   - if [[ "$BUILD_NDK" == "ON" ]]; then
51       git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
52       export ANDROID_NDK=$HOME/android-ndk;
53       git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
54       export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
55     fi
56
57 before_script:
58   - git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
59   - git clone --depth=1 https://github.com/google/googletest          external/googletest
60
61 script:
62   - mkdir build && cd build
63   - if [[ "$BUILD_NDK" == "ON" ]]; then
64       cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
65             -DANDROID_NATIVE_API_LEVEL=android-9
66             -DCMAKE_BUILD_TYPE=Release
67             -DANDROID_ABI="armeabi-v7a with NEON"
68             -DSPIRV_SKIP_TESTS=ON
69             -GNinja ..;
70     else
71       cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
72     fi
73   - ninja
74   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
75       export NPROC=`nproc`;
76     else
77       export NPROC=`sysctl -n hw.ncpu`;
78     fi
79   - if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j${NPROC} --output-on-failure --timeout 300; fi
80
81
82 notifications:
83   email:
84     recipients:
85       - antiagainst@google.com
86       - awoloszyn@google.com
87       - dneto@google.com
88       - ehsann@google.com
89       - qining@google.com
90     on_success: change
91     on_failure: always