.travis.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. language: cpp
  2. dist: trusty
  3. sudo: false
  4. env:
  5. global:
  6. - SCONS_CACHE=$HOME/.scons_cache
  7. - SCONS_CACHE_LIMIT=1024
  8. - OPTIONS="verbose=yes progress=no"
  9. cache:
  10. directories:
  11. - $SCONS_CACHE
  12. matrix:
  13. include:
  14. - env: STATIC_CHECKS=yes
  15. os: linux
  16. compiler: gcc
  17. - env: GODOT_TARGET=x11 TOOLS=yes CACHE_NAME=${GODOT_TARGET}-gcc-tools
  18. os: linux
  19. compiler: gcc
  20. - env: GODOT_TARGET=x11 TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
  21. os: linux
  22. compiler: clang
  23. - env: GODOT_TARGET=android TOOLS=no CACHE_NAME=${GODOT_TARGET}-gcc
  24. os: linux
  25. compiler: gcc
  26. - env: GODOT_TARGET=osx TOOLS=yes CACHE_NAME=${GODOT_TARGET}-clang-tools
  27. os: osx
  28. osx_image: xcode11.6
  29. compiler: clang
  30. - env: GODOT_TARGET=iphone TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
  31. os: osx
  32. osx_image: xcode11.6
  33. compiler: clang
  34. - env: GODOT_TARGET=server TOOLS=no CACHE_NAME=${GODOT_TARGET}-clang
  35. os: linux
  36. compiler: clang
  37. addons:
  38. apt:
  39. sources:
  40. - ubuntu-toolchain-r-test
  41. - llvm-toolchain-trusty-8
  42. packages:
  43. - build-essential
  44. - scons
  45. - pkg-config
  46. - libx11-dev
  47. - libxcursor-dev
  48. - libxi-dev
  49. - libxinerama-dev
  50. - libxrandr-dev
  51. - libgl1-mesa-dev
  52. - libglu1-mesa-dev
  53. - libasound2-dev
  54. - libfreetype6-dev
  55. - libssl-dev
  56. # For style checks.
  57. - clang-format-8
  58. before_install:
  59. - if [ "$STATIC_CHECKS" = "yes" ]; then
  60. unset SCONS_CACHE;
  61. fi
  62. install:
  63. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GODOT_TARGET" = "android" ]; then
  64. misc/travis/android-tools-linux.sh;
  65. fi
  66. - if [ "$TRAVIS_OS_NAME" = "osx" ]; then
  67. misc/travis/scons-local-osx.sh;
  68. fi
  69. - if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$GODOT_TARGET" = "android" ]; then
  70. misc/travis/android-tools-osx.sh;
  71. fi
  72. before_script:
  73. - if [ "$GODOT_TARGET" = "android" ]; then
  74. export ANDROID_HOME=$TRAVIS_BUILD_DIR/godot-dev/build-tools/android-sdk;
  75. export ANDROID_NDK_ROOT=$TRAVIS_BUILD_DIR/godot-dev/build-tools/android-ndk;
  76. fi
  77. script:
  78. - if [ "$STATIC_CHECKS" = "yes" ]; then
  79. sh ./misc/travis/clang-format.sh;
  80. else
  81. scons -j2 CC=$CC CXX=$CXX platform=$GODOT_TARGET tools=$TOOLS $OPTIONS;
  82. fi