From d5e4f06eecfd36059117142bbb1d73ba3ac517c1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 12 Jan 2017 14:15:36 -0500 Subject: [PATCH] Update Travis CI configuration. * Stop updating brew. * Shadow clone of dependencies. * Fix `nproc` on macOS. --- .travis.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 67091ac2e..9a14b8745 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ os: - 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. @@ -28,7 +28,7 @@ matrix: # 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 @@ -45,8 +45,8 @@ addons: - 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; @@ -55,8 +55,8 @@ before_install: 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 @@ -71,7 +71,12 @@ script: 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: