mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-27 22:00:07 +00:00
d5e4f06eec
* Stop updating brew. * Shadow clone of dependencies. * Fix `nproc` on macOS.
92 lines
2.2 KiB
YAML
92 lines
2.2 KiB
YAML
# Linux Build Configuration for Travis
|
|
|
|
language: cpp
|
|
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
|
|
dist: trusty
|
|
sudo: required
|
|
|
|
# Use the default Xcode environment for Xcode.
|
|
|
|
env:
|
|
# Each line is a set of environment variables set before a build.
|
|
# Thus each line represents a different build configuration.
|
|
- BUILD_TYPE=Release
|
|
- BUILD_TYPE=Debug
|
|
|
|
compiler:
|
|
- clang
|
|
- gcc
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
# Additional build using Android NDK
|
|
- env: BUILD_NDK=ON
|
|
exclude:
|
|
# Skip GCC builds on macOS.
|
|
- os: osx
|
|
compiler: gcc
|
|
|
|
cache:
|
|
apt: true
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- ninja-build
|
|
|
|
before_install:
|
|
# Install cmake & ninja on macOS.
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ninja; fi
|
|
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
|
git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
|
|
export ANDROID_NDK=$HOME/android-ndk;
|
|
git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
|
|
export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
|
|
fi
|
|
|
|
before_script:
|
|
- git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
|
|
- git clone --depth=1 https://github.com/google/googletest external/googletest
|
|
|
|
script:
|
|
- mkdir build && cd build
|
|
- if [[ "$BUILD_NDK" == "ON" ]]; then
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
|
|
-DANDROID_NATIVE_API_LEVEL=android-9
|
|
-DCMAKE_BUILD_TYPE=Release
|
|
-DANDROID_ABI="armeabi-v7a with NEON"
|
|
-DSPIRV_SKIP_TESTS=ON
|
|
-GNinja ..;
|
|
else
|
|
cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
|
|
fi
|
|
- ninja
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
export NPROC=`nproc`;
|
|
else
|
|
export NPROC=`sysctl -n hw.ncpu`;
|
|
fi
|
|
- if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j${NPROC} --output_on_failure; fi
|
|
|
|
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- antiagainst@google.com
|
|
- awoloszyn@google.com
|
|
- dneto@google.com
|
|
- ehsann@google.com
|
|
- qining@google.com
|
|
on_success: change
|
|
on_failure: always
|