.travis.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Linux Build Configuration for Travis
  2. language: cpp
  3. os:
  4. - linux
  5. - osx
  6. # Use Ubuntu 14.04 LTS (Trusty) as the Linux testing environment.
  7. dist: trusty
  8. sudo: false
  9. # Use the default Xcode environment for Xcode.
  10. env:
  11. # Each line is a set of environment variables set before a build.
  12. # Thus each line represents a different build configuration.
  13. - BUILD_TYPE=Release
  14. - BUILD_TYPE=Debug
  15. compiler:
  16. - clang
  17. - gcc
  18. matrix:
  19. fast_finish: true
  20. include:
  21. # Additional build using Android NDK
  22. - env: BUILD_NDK=ON
  23. exclude:
  24. # Skip GCC builds on macOS.
  25. - os: osx
  26. compiler: gcc
  27. cache:
  28. apt: true
  29. git:
  30. depth: 1
  31. branches:
  32. only:
  33. - master
  34. before_install:
  35. - if [[ "$BUILD_NDK" == "ON" ]]; then
  36. git clone --depth=1 https://github.com/urho3d/android-ndk.git $HOME/android-ndk;
  37. export ANDROID_NDK=$HOME/android-ndk;
  38. git clone --depth=1 https://github.com/taka-no-me/android-cmake.git $HOME/android-cmake;
  39. export TOOLCHAIN_PATH=$HOME/android-cmake/android.toolchain.cmake;
  40. fi
  41. before_script:
  42. - git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
  43. - git clone --depth=1 https://github.com/google/googletest external/googletest
  44. script:
  45. - mkdir build && cd build
  46. - if [[ "$BUILD_NDK" == "ON" ]]; then
  47. cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH}
  48. -DANDROID_NATIVE_API_LEVEL=android-9
  49. -DCMAKE_BUILD_TYPE=Release
  50. -DANDROID_ABI="armeabi-v7a with NEON"
  51. -DSPIRV_SKIP_TESTS=ON ..;
  52. else
  53. cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..;
  54. fi
  55. # Due to the limitation of Travis platform, we cannot start too many concurrent jobs.
  56. # Otherwise GCC will panic with internal error, possibility because of memory issues.
  57. - make -j4
  58. - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
  59. export NPROC=`nproc`;
  60. else
  61. export NPROC=`sysctl -n hw.ncpu`;
  62. fi
  63. - if [[ "$BUILD_NDK" != "ON" ]]; then ctest -j${NPROC} --output-on-failure --timeout 300; fi
  64. notifications:
  65. email:
  66. recipients:
  67. - antiagainst@google.com
  68. - awoloszyn@google.com
  69. - dneto@google.com
  70. - ehsann@google.com
  71. - qining@google.com
  72. on_success: change
  73. on_failure: always