1 # Linux and Mac Build Configuration for Travis
9 # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
15 - secure: aGFrgzyKp+84hKrGkxVWg8cHV61uqrKEHT38gfSQK6+WS4GfLOyH83p7WnsEBb7AMhzU7LMNFdvOFr6+NaMpVnqRvc40CEG1Q+lNg9Pq9mhIZLowvDrfqTL9kQ+8Nbw5Q6/dg6CTvY7fvRfpfCEmKIUZBRkoKUuHeuM1uy3IupFcdNuL5bSYn3Beo+apSJginh9DI4BLDXFUgBzTRSLLyCX5g3cpaeGGOCr8quJlYx75W6HRck5g9SZuLtUoH9GFEV3l+ZEWB8noErW+J56L03bwNwFuuAh321evw++oQk5KFa8rlDvar3SJ3b1RHB8u/eq5DBYMyaK/fS8+Q7QbGr8diF/wDe68bKO7U9IhpNfExXmczCpExjHomW5TQv4rYdGhygPMfW97aIsPRYyNKcl4fkmb7NDrM8w0Jscdq2g5c2Kz0ItyZoBri/NXLwFQQjaVCs7Pf97TjuMA7mK0GJmDTRzi6SrDYlWMt5BQL3y0CCojyfLIRcTh0CQjQI29s97bLfQrYAxt9GNNFR+HTXRLLrkaAlJkPGEPwUywlSfEThnvHLesNxYqemolAYpQT4ithoL4GehGIHmaxsW295aKVhuRf8K9eBODNqrfblvM42UHhjntT+92ZnQ/Gkq80GqaMxnxi4PO5FyPIxt0r981b54YBkWi8YA4P7w5pNI=
17 - GLSLANG_BUILD_TYPE=Release
18 - GLSLANG_BUILD_TYPE=Debug
25 fast_finish: true # Show final status immediately if a test fails.
27 # Skip GCC builds on Mac OS X.
31 # Additional build using Android NDK.
47 # Make sure that clang-3.6 is selected on Linux.
48 - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
49 export CC=clang-3.6 CXX=clang++-3.6;
51 # Download a recent Android NDK and use its android.toolchain.cmake file.
52 - if [[ "$BUILD_NDK" == "ON" ]]; then
53 export ANDROID_NDK=$HOME/android-ndk;
54 git init $ANDROID_NDK;
56 git remote add dneto0 https://github.com/dneto0/android-ndk.git;
57 git fetch --depth=1 dneto0 r17b-strip;
58 git checkout FETCH_HEAD;
60 export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake;
64 # check out pre-breakage version of googletest; can be deleted when
66 # git clone --depth=1 https://github.com/google/googletest.git External/googletest
67 - mkdir -p External/googletest
68 - cd External/googletest
70 - git remote add origin https://github.com/google/googletest.git
71 - git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
72 - git reset --hard FETCH_HEAD
74 # get spirv-tools and spirv-headers
75 - ./update_glslang_sources.py
78 - mkdir build && cd build
79 # For Android, do release building using NDK without testing.
80 # Use android-14, the oldest native API level supporeted by NDK r17b.
81 # We can use newer API levels if we want.
82 # For Linux and macOS, do debug/release building with testing.
83 - if [[ "$BUILD_NDK" == "ON" ]]; then
84 cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
85 -DANDROID_NATIVE_API_LEVEL=android-14
86 -DCMAKE_BUILD_TYPE=Release
87 -DANDROID_ABI="armeabi-v7a with NEON"
88 -DBUILD_TESTING=OFF ..;
91 cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
92 -DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
94 ctest --output-on-failure &&
95 cd ../Test && ./runtests;
99 # For debug build, the generated dll has a postfix "d" in its name.
100 - if [[ "${GLSLANG_BUILD_TYPE}" == "Debug" ]]; then
105 # Create tarball for deployment
106 - if [[ ${CC} == clang* && "${BUILD_NDK}" != "ON" ]]; then
108 export TARBALL=glslang-master-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
112 lib/libGenericCodeGen${SUFFIX}.a
113 lib/libglslang${SUFFIX}.a
114 lib/libglslang-default-resource-limits${SUFFIX}.a
115 lib/libHLSL${SUFFIX}.a
116 lib/libMachineIndependent${SUFFIX}.a
117 lib/libOGLCompiler${SUFFIX}.a
118 lib/libOSDependent${SUFFIX}.a
119 lib/libSPIRV${SUFFIX}.a
120 lib/libSPVRemapper${SUFFIX}.a
121 lib/libSPIRV-Tools${SUFFIX}.a
122 lib/libSPIRV-Tools-opt${SUFFIX}.a;
126 # Tag the current top of the tree as "master-tot".
127 # Travis CI replies on the tag name to properly push to GitHub Releases.
128 - git config --global user.name "Travis CI"
129 - git config --global user.email "builds@travis-ci.org"
130 - git tag -f master-tot
131 - git push -q -f https://${glslangtoken}@github.com/KhronosGroup/glslang --tags
135 api_key: ${glslangtoken}
138 condition: ${CC} == clang* && ${BUILD_NDK} != ON