- osx
# Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
-sudo: required
dist: trusty
+sudo: required
# Use the default Xcode environment for Xcode.
# Additional build using Android NDK
- env: BUILD_NDK=ON
exclude:
- # Skip GCC builds on Mac OS X.
+ # Skip GCC builds on macOS.
- os: osx
compiler: gcc
- ninja-build
before_install:
- # Install cmake & ninja on Mac OS X.
- - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update && brew install ninja; fi
+ # 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;
fi
before_script:
- - git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
- - git clone https://github.com/google/googletest.git external/googletest
+ - 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
cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
fi
- ninja
- - if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j`nproc` --output_on_failure; fi
+ - 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: