2016-06-26 05:06:20 +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.
|
2018-06-02 07:26:43 +00:00
|
|
|
sudo: false
|
2016-06-26 05:06:20 +00:00
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
env:
|
2018-06-02 07:26:43 +00:00
|
|
|
global:
|
|
|
|
- secure: aGFrgzyKp+84hKrGkxVWg8cHV61uqrKEHT38gfSQK6+WS4GfLOyH83p7WnsEBb7AMhzU7LMNFdvOFr6+NaMpVnqRvc40CEG1Q+lNg9Pq9mhIZLowvDrfqTL9kQ+8Nbw5Q6/dg6CTvY7fvRfpfCEmKIUZBRkoKUuHeuM1uy3IupFcdNuL5bSYn3Beo+apSJginh9DI4BLDXFUgBzTRSLLyCX5g3cpaeGGOCr8quJlYx75W6HRck5g9SZuLtUoH9GFEV3l+ZEWB8noErW+J56L03bwNwFuuAh321evw++oQk5KFa8rlDvar3SJ3b1RHB8u/eq5DBYMyaK/fS8+Q7QbGr8diF/wDe68bKO7U9IhpNfExXmczCpExjHomW5TQv4rYdGhygPMfW97aIsPRYyNKcl4fkmb7NDrM8w0Jscdq2g5c2Kz0ItyZoBri/NXLwFQQjaVCs7Pf97TjuMA7mK0GJmDTRzi6SrDYlWMt5BQL3y0CCojyfLIRcTh0CQjQI29s97bLfQrYAxt9GNNFR+HTXRLLrkaAlJkPGEPwUywlSfEThnvHLesNxYqemolAYpQT4ithoL4GehGIHmaxsW295aKVhuRf8K9eBODNqrfblvM42UHhjntT+92ZnQ/Gkq80GqaMxnxi4PO5FyPIxt0r981b54YBkWi8YA4P7w5pNI=
|
|
|
|
matrix:
|
|
|
|
- GLSLANG_BUILD_TYPE=Release
|
|
|
|
- GLSLANG_BUILD_TYPE=Debug
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
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
|
2018-06-02 07:26:43 +00:00
|
|
|
include:
|
|
|
|
# Additional build using Android NDK.
|
|
|
|
- env: BUILD_NDK=ON
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
apt: true
|
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- clang-3.6
|
|
|
|
|
|
|
|
install:
|
2018-06-02 07:26:43 +00:00
|
|
|
# Make sure that clang-3.6 is selected on Linux.
|
2016-06-26 05:06:20 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then
|
|
|
|
export CC=clang-3.6 CXX=clang++-3.6;
|
|
|
|
fi
|
2022-04-30 05:37:59 +00:00
|
|
|
# Download a recent Android NDK and use its android.toolchain.cmake file.
|
2018-06-02 07:26:43 +00:00
|
|
|
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
|
|
|
export ANDROID_NDK=$HOME/android-ndk;
|
2022-04-30 05:37:59 +00:00
|
|
|
git init $ANDROID_NDK;
|
|
|
|
pushd $ANDROID_NDK;
|
|
|
|
git remote add dneto0 https://github.com/dneto0/android-ndk.git;
|
|
|
|
git fetch --depth=1 dneto0 r17b-strip;
|
|
|
|
git checkout FETCH_HEAD;
|
|
|
|
popd;
|
|
|
|
export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake;
|
2018-06-02 07:26:43 +00:00
|
|
|
fi
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
before_script:
|
2022-04-30 05:37:59 +00:00
|
|
|
# check out pre-breakage version of googletest; can be deleted when
|
|
|
|
# issue 3128 is fixed
|
|
|
|
# git clone --depth=1 https://github.com/google/googletest.git External/googletest
|
|
|
|
- mkdir -p External/googletest
|
|
|
|
- cd External/googletest
|
|
|
|
- git init
|
|
|
|
- git remote add origin https://github.com/google/googletest.git
|
|
|
|
- git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725
|
|
|
|
- git reset --hard FETCH_HEAD
|
|
|
|
- cd ../..
|
|
|
|
# get spirv-tools and spirv-headers
|
2018-06-02 07:26:43 +00:00
|
|
|
- ./update_glslang_sources.py
|
2016-06-26 05:06:20 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- mkdir build && cd build
|
2018-06-02 07:26:43 +00:00
|
|
|
# For Android, do release building using NDK without testing.
|
2022-04-30 05:37:59 +00:00
|
|
|
# Use android-14, the oldest native API level supporeted by NDK r17b.
|
|
|
|
# We can use newer API levels if we want.
|
2018-06-02 07:26:43 +00:00
|
|
|
# For Linux and macOS, do debug/release building with testing.
|
|
|
|
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
|
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
|
2022-04-30 05:37:59 +00:00
|
|
|
-DANDROID_NATIVE_API_LEVEL=android-14
|
2018-06-02 07:26:43 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
|
|
-DANDROID_ABI="armeabi-v7a with NEON"
|
|
|
|
-DBUILD_TESTING=OFF ..;
|
|
|
|
make -j4;
|
|
|
|
else
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=${GLSLANG_BUILD_TYPE}
|
|
|
|
-DCMAKE_INSTALL_PREFIX=`pwd`/install ..;
|
|
|
|
make -j4 install;
|
|
|
|
ctest --output-on-failure &&
|
|
|
|
cd ../Test && ./runtests;
|
|
|
|
fi
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
# For debug build, the generated dll has a postfix "d" in its name.
|
|
|
|
- if [[ "${GLSLANG_BUILD_TYPE}" == "Debug" ]]; then
|
|
|
|
export SUFFIX="d";
|
|
|
|
else
|
|
|
|
export SUFFIX="";
|
|
|
|
fi
|
|
|
|
# Create tarball for deployment
|
|
|
|
- if [[ ${CC} == clang* && "${BUILD_NDK}" != "ON" ]]; then
|
|
|
|
cd ../build/install;
|
|
|
|
export TARBALL=glslang-master-${TRAVIS_OS_NAME}-${GLSLANG_BUILD_TYPE}.zip;
|
|
|
|
zip ${TARBALL}
|
|
|
|
bin/glslangValidator
|
|
|
|
include/glslang/*
|
2022-04-30 05:37:59 +00:00
|
|
|
lib/libGenericCodeGen${SUFFIX}.a
|
2018-06-02 07:26:43 +00:00
|
|
|
lib/libglslang${SUFFIX}.a
|
2022-04-30 05:37:59 +00:00
|
|
|
lib/libglslang-default-resource-limits${SUFFIX}.a
|
2018-06-02 07:26:43 +00:00
|
|
|
lib/libHLSL${SUFFIX}.a
|
2022-04-30 05:37:59 +00:00
|
|
|
lib/libMachineIndependent${SUFFIX}.a
|
2018-06-02 07:26:43 +00:00
|
|
|
lib/libOGLCompiler${SUFFIX}.a
|
|
|
|
lib/libOSDependent${SUFFIX}.a
|
|
|
|
lib/libSPIRV${SUFFIX}.a
|
|
|
|
lib/libSPVRemapper${SUFFIX}.a
|
|
|
|
lib/libSPIRV-Tools${SUFFIX}.a
|
|
|
|
lib/libSPIRV-Tools-opt${SUFFIX}.a;
|
|
|
|
fi
|
|
|
|
|
|
|
|
before_deploy:
|
|
|
|
# Tag the current top of the tree as "master-tot".
|
|
|
|
# Travis CI replies on the tag name to properly push to GitHub Releases.
|
|
|
|
- git config --global user.name "Travis CI"
|
|
|
|
- git config --global user.email "builds@travis-ci.org"
|
|
|
|
- git tag -f master-tot
|
|
|
|
- git push -q -f https://${glslangtoken}@github.com/KhronosGroup/glslang --tags
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
|
|
|
api_key: ${glslangtoken}
|
|
|
|
on:
|
|
|
|
branch: master
|
|
|
|
condition: ${CC} == clang* && ${BUILD_NDK} != ON
|
|
|
|
file: ${TARBALL}
|
|
|
|
skip_cleanup: true
|
|
|
|
overwrite: true
|