Fix travis and appveyor calls to update_glslang_sources.py
[platform/upstream/glslang.git] / .travis.yml
1 # Linux and Mac 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 sudo: false
11 dist: trusty
12
13 env:
14   - GLSLANG_BUILD_TYPE=Release
15   - GLSLANG_BUILD_TYPE=Debug
16
17 compiler:
18   - clang
19   - gcc
20
21 matrix:
22   fast_finish: true # Show final status immediately if a test fails.
23   exclude:
24     # Skip GCC builds on Mac OS X.
25     - os: osx
26       compiler: gcc
27   include:
28     # Additional build using Android NDK.
29     - env: BUILD_NDK=ON
30
31 cache:
32   apt: true
33
34 branches:
35   only:
36     - master
37
38 addons:
39   apt:
40     packages:
41       - clang-3.6
42
43 install:
44   # Make sure that clang-3.6 is selected on Linux.
45   - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
46       export CC=clang-3.6 CXX=clang++-3.6;
47     fi
48   # Download Android NDK and Android CMake toolchain file.
49   - if [[ "$BUILD_NDK" == "ON" ]]; then
50       git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
51       export ANDROID_NDK=$HOME/android-ndk;
52       git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
53       export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
54     fi
55
56 before_script:
57   - git clone --depth=1 https://github.com/google/googletest.git External/googletest
58   - ./update_glslang_sources.py
59
60 script:
61   - mkdir build && cd build
62   # For Android, do release building using NDK without testing.
63   # For Linux and macOS, do debug/release building with testing.
64   - if [[ "$BUILD_NDK" == "ON" ]]; then
65       cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
66             -DANDROID_NATIVE_API_LEVEL=android-12
67             -DCMAKE_BUILD_TYPE=Release
68             -DANDROID_ABI="armeabi-v7a with NEON"
69             -DBUILD_TESTING=OFF ..;
70       make -j4;
71     else
72       cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
73             -DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
74       make -j4 install;
75       ctest --output-on-failure &&
76       cd ../Test && ./runtests;
77     fi