.travis.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. dist: xenial
  2. language: c
  3. env:
  4. global:
  5. # Set "false" to force rebuild of third-party dependencies.
  6. - CACHE_ENABLE=true
  7. # Build directory for Neovim.
  8. - BUILD_DIR="$TRAVIS_BUILD_DIR/build"
  9. # Build directory for third-party dependencies.
  10. - DEPS_BUILD_DIR="$HOME/nvim-deps"
  11. # Directory where third-party dependency sources are downloaded to.
  12. - DEPS_DOWNLOAD_DIR="$TRAVIS_BUILD_DIR/deps-downloads"
  13. # Install directory for Neovim.
  14. - INSTALL_PREFIX="$HOME/nvim-install"
  15. # Log directory for Clang sanitizers and Valgrind.
  16. - LOG_DIR="$BUILD_DIR/log"
  17. # Nvim log file.
  18. - NVIM_LOG_FILE="$BUILD_DIR/.nvimlog"
  19. # Default CMake flags.
  20. - CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
  21. -DCMAKE_BUILD_TYPE=Debug
  22. -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
  23. -DBUSTED_OUTPUT_TYPE=nvim
  24. -DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
  25. -DMIN_LOG_LEVEL=3"
  26. - DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR -DUSE_BUNDLED_GPERF=OFF"
  27. # Additional CMake flags for 32-bit builds.
  28. - CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
  29. -DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib
  30. -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
  31. # Environment variables for Clang sanitizers.
  32. - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
  33. - TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
  34. - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
  35. - ASAN_SYMBOLIZE=asan_symbolize
  36. # Environment variables for Valgrind.
  37. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
  38. # If this file exists, the cache is valid (compile was successful).
  39. - CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
  40. # default target name for functional tests
  41. - FUNCTIONALTEST=functionaltest
  42. - CI_TARGET=tests
  43. # Environment variables for ccache
  44. - CCACHE_COMPRESS=1
  45. - CCACHE_SLOPPINESS=time_macros,file_macro
  46. - CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
  47. anchors:
  48. envs: &common-job-env
  49. # Do not fall back to cache for "master" for PR on "release" branch:
  50. # adds the target branch to the cache key.
  51. __FOR_TRAVIS_CACHE__=$TRAVIS_BRANCH
  52. jobs:
  53. include:
  54. - stage: normal builds
  55. name: clang-asan
  56. os: linux
  57. compiler: clang-4.0
  58. # Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
  59. env:
  60. - CLANG_SANITIZER=ASAN_UBSAN
  61. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  62. - ASAN_SYMBOLIZE=asan_symbolize-4.0
  63. - *common-job-env
  64. - name: gcc-functionaltest-lua
  65. os: linux
  66. compiler: gcc
  67. env:
  68. - FUNCTIONALTEST=functionaltest-lua
  69. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  70. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
  71. - *common-job-env
  72. - name: gcc-32bit
  73. os: linux
  74. # Travis creates a cache per compiler. Set a different value here to
  75. # store 32-bit dependencies in a separate cache.
  76. compiler: gcc
  77. env:
  78. - BUILD_32BIT: ON
  79. - *common-job-env
  80. - name: "OSX: clang"
  81. os: osx
  82. compiler: clang
  83. osx_image: xcode9.4 # macOS 10.13
  84. env: *common-job-env
  85. - name: "OSX: gcc"
  86. os: osx
  87. compiler: gcc
  88. osx_image: xcode9.4 # macOS 10.13
  89. env: *common-job-env
  90. - if: branch = master
  91. name: lint
  92. os: linux
  93. env:
  94. - CI_TARGET=lint
  95. - *common-job-env
  96. - stage: Flaky builds
  97. name: gcc-coverage
  98. os: linux
  99. compiler: gcc
  100. env:
  101. - GCOV=gcov
  102. - CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
  103. - *common-job-env
  104. - os: linux
  105. name: clang-tsan
  106. compiler: clang
  107. env:
  108. - CLANG_SANITIZER=TSAN
  109. - *common-job-env
  110. allow_failures:
  111. - name: gcc-coverage
  112. - name: clang-tsan
  113. fast_finish: true
  114. before_install: ci/before_install.sh
  115. install: ci/install.sh
  116. before_script: ci/before_script.sh
  117. script: ci/script.sh
  118. before_cache: ci/before_cache.sh
  119. addons:
  120. apt:
  121. packages:
  122. - apport
  123. - autoconf
  124. - automake
  125. - build-essential
  126. - clang-4.0
  127. - cmake
  128. - cscope
  129. - g++-multilib
  130. - gcc-multilib
  131. - gdb
  132. - gperf
  133. - language-pack-tr
  134. - libc6-dev-i386
  135. - libtool-bin
  136. - locales
  137. - ninja-build
  138. - pkg-config
  139. - unzip
  140. - valgrind
  141. - xclip
  142. homebrew:
  143. update: true
  144. packages:
  145. - ccache
  146. - ninja
  147. branches:
  148. only:
  149. - master
  150. - /^release-\d+\.\d+$/
  151. cache:
  152. apt: true
  153. ccache: true
  154. directories:
  155. - "$HOME/.cache/pip"
  156. - "$HOME/.cache/nvim-deps"
  157. - "$HOME/.cache/nvim-deps-downloads"
  158. notifications:
  159. webhooks:
  160. urls:
  161. - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031