You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.travis.yml 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. # Install directory for Neovim.
  12. - INSTALL_PREFIX="$HOME/nvim-install"
  13. # Log directory for Clang sanitizers and Valgrind.
  14. - LOG_DIR="$BUILD_DIR/log"
  15. # Nvim log file.
  16. - NVIM_LOG_FILE="$BUILD_DIR/.nvimlog"
  17. # Default CMake flags.
  18. - CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
  19. -DCMAKE_BUILD_TYPE=Debug
  20. -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
  21. -DBUSTED_OUTPUT_TYPE=nvim
  22. -DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
  23. -DMIN_LOG_LEVEL=3"
  24. - DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_GPERF=OFF"
  25. # Environment variables for Clang sanitizers.
  26. - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
  27. - TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
  28. - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
  29. # Environment variables for Valgrind.
  30. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
  31. - CACHE_NVIM_DEPS_DIR="$HOME/.cache/nvim-deps"
  32. # If this file exists, the cache is valid (compile was successful).
  33. - CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.travis_cache_marker"
  34. # default target name for functional tests
  35. - FUNCTIONALTEST=functionaltest
  36. - CI_TARGET=tests
  37. # Environment variables for ccache
  38. - CCACHE_COMPRESS=1
  39. - CCACHE_SLOPPINESS=time_macros,file_macro
  40. - CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
  41. # Default since 3.3, but Travis (Xenial) has 3.2.4; required with newer gcc/clang.
  42. - CCACHE_CPP2=1
  43. anchors:
  44. envs: &common-job-env
  45. # Do not fall back to cache for "master" for PR on "release" branch:
  46. # adds the target branch to the cache key.
  47. FOR_TRAVIS_CACHE=v1-$TRAVIS_BRANCH
  48. addons:
  49. apt:
  50. packages: &common-apt-packages
  51. - apport
  52. - autoconf
  53. - automake
  54. - build-essential
  55. - clang
  56. - cmake
  57. - cscope
  58. - gcc-multilib
  59. - gdb
  60. - gperf
  61. - language-pack-tr
  62. - libc6-dev-i386
  63. - libtool-bin
  64. - locales
  65. - ninja-build
  66. - pkg-config
  67. - unzip
  68. - valgrind
  69. - xclip
  70. homebrew:
  71. update: false
  72. packages:
  73. - ccache
  74. - ninja
  75. jobs:
  76. include:
  77. - stage: baseline
  78. name: clang-asan
  79. os: linux
  80. compiler: clang
  81. # Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
  82. env:
  83. - CLANG_SANITIZER=ASAN_UBSAN
  84. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  85. - *common-job-env
  86. - name: gcc-coverage (gcc 9)
  87. os: linux
  88. compiler: gcc-9
  89. env:
  90. - GCOV=gcov-9
  91. - CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
  92. - GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
  93. - USE_LUACOV=1
  94. - BUSTED_ARGS="--coverage"
  95. - *common-job-env
  96. addons:
  97. apt:
  98. sources:
  99. - sourceline: 'ppa:ubuntu-toolchain-r/test'
  100. packages:
  101. - *common-apt-packages
  102. - gcc-9
  103. - if: branch = master AND commit_message !~ /\[skip.lint\]/
  104. name: lint
  105. os: linux
  106. env:
  107. - CI_TARGET=lint
  108. - *common-job-env
  109. - stage: second stage
  110. name: "macOS: clang"
  111. os: osx
  112. compiler: clang
  113. osx_image: xcode10.2 # macOS 10.14
  114. env:
  115. - *common-job-env
  116. - name: gcc-functionaltest-lua
  117. os: linux
  118. compiler: gcc
  119. env:
  120. - FUNCTIONALTEST=functionaltest-lua
  121. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  122. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
  123. - *common-job-env
  124. - name: gcc-32bit
  125. os: linux
  126. # Travis creates a cache per compiler. Set a different value here to
  127. # store 32-bit dependencies in a separate cache.
  128. compiler: gcc
  129. env:
  130. - BUILD_32BIT=ON
  131. - CMAKE_FLAGS="$CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
  132. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
  133. # Minimum required CMake.
  134. - CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
  135. - *common-job-env
  136. - name: clang-tsan
  137. os: linux
  138. compiler: clang
  139. env:
  140. - CLANG_SANITIZER=TSAN
  141. - *common-job-env
  142. fast_finish: true
  143. before_install: ci/before_install.sh
  144. install: ci/install.sh
  145. before_script: ci/before_script.sh
  146. script: ci/script.sh
  147. before_cache: ci/before_cache.sh
  148. branches:
  149. only:
  150. - master
  151. - /^release-\d+\.\d+$/
  152. cache:
  153. apt: true
  154. ccache: true
  155. directories:
  156. - "$CACHE_NVIM_DEPS_DIR"
  157. git:
  158. quiet: true
  159. notifications:
  160. webhooks:
  161. urls:
  162. - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031