.travis.yml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. dist: bionic
  2. language: c
  3. env:
  4. global:
  5. # Encrypted environment variables, see
  6. # http://docs.travis-ci.com/user/encryption-keys/
  7. #
  8. # SNAP_SECRET_KEY: generated by:
  9. # travis encrypt SNAP_SECRET_KEY=xx --add
  10. # https://github.com/neovim/neovim/pull/11428
  11. # snapcraft key expires after 1 year. Steps to refresh it:
  12. # 1. snapcraft enable-ci travis --refresh
  13. # 2. mv .snapcraft/travis_snapcraft.cfg ci/snap/travis_snapcraft.cfg
  14. # 3. Copy after_success command to ci/snap/deploy.sh from .travis.yml
  15. # 4. Undo changes to .travis.yml
  16. - secure: hd0qn2u8ABbJg5Bx4pBRcUQbKYFmcSHoecyHIPTCnGJT+NI41Bvm/IkN/N5DhBF+LbD3Q2nmR/dzI5H/dqS7RxMFvEx1DuFLendFHHX3MYf0AuKpXYY3gwgMTmqx8p/v6srlU7RBGWNGzHCWqksAem+EIWCe3I7WvfdKo1/DV/Y=
  17. - PATH="$HOME/.local/bin:$PATH"
  18. # Set "false" to force rebuild of third-party dependencies.
  19. - CACHE_ENABLE=true
  20. # Build directory for Neovim.
  21. - BUILD_DIR="$TRAVIS_BUILD_DIR/build"
  22. # Build directory for third-party dependencies.
  23. - DEPS_BUILD_DIR="$HOME/nvim-deps"
  24. # Install directory for Neovim.
  25. - INSTALL_PREFIX="$HOME/nvim-install"
  26. # Log directory for Clang sanitizers and Valgrind.
  27. - LOG_DIR="$BUILD_DIR/log"
  28. # Nvim log file.
  29. - NVIM_LOG_FILE="$BUILD_DIR/.nvimlog"
  30. # Default CMake flags.
  31. - CMAKE_FLAGS="-DCI_BUILD=ON
  32. -DCMAKE_BUILD_TYPE=Debug
  33. -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
  34. -DBUSTED_OUTPUT_TYPE=nvim
  35. -DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
  36. -DMIN_LOG_LEVEL=3"
  37. - DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_GPERF=OFF"
  38. # Environment variables for Clang sanitizers.
  39. - ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
  40. - TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
  41. - UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
  42. # Environment variables for Valgrind.
  43. - VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
  44. - CACHE_NVIM_DEPS_DIR="$HOME/.cache/nvim-deps"
  45. # If this file exists, the cache is valid (compile was successful).
  46. - CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.ci_cache_marker"
  47. # default target name for functional tests
  48. - FUNCTIONALTEST=functionaltest
  49. - CI_TARGET=tests
  50. # Environment variables for ccache
  51. - CCACHE_COMPRESS=1
  52. - CCACHE_SLOPPINESS=time_macros,file_macro
  53. - CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
  54. - CI_OS_NAME="$TRAVIS_OS_NAME"
  55. anchors:
  56. envs: &common-job-env
  57. # Do not fall back to cache for "master" for PR on "release" branch:
  58. # adds the target branch to the cache key.
  59. FOR_TRAVIS_CACHE=v1-$TRAVIS_BRANCH
  60. addons:
  61. apt:
  62. packages: &common-apt-packages
  63. - apport
  64. - autoconf
  65. - automake
  66. - build-essential
  67. - clang
  68. - cmake
  69. - cpanminus
  70. - cscope
  71. - gcc-multilib
  72. - gdb
  73. - gperf
  74. - language-pack-tr
  75. - libtool-bin
  76. - locales
  77. - ninja-build
  78. - pkg-config
  79. - unzip
  80. - valgrind
  81. - xclip
  82. homebrew:
  83. update: true
  84. casks:
  85. - powershell
  86. packages:
  87. - ccache
  88. - cpanminus
  89. - ninja
  90. - perl
  91. jobs:
  92. include:
  93. - name: gcc-coverage (gcc 9)
  94. os: linux
  95. compiler: gcc-9
  96. env:
  97. - GCOV=gcov-9
  98. - CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
  99. - GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
  100. - USE_LUACOV=1
  101. - BUSTED_ARGS="--coverage"
  102. - *common-job-env
  103. addons:
  104. snaps:
  105. - name: powershell
  106. confinement: classic
  107. apt:
  108. sources:
  109. - sourceline: 'ppa:ubuntu-toolchain-r/test'
  110. packages:
  111. - *common-apt-packages
  112. - gcc-9
  113. - name: gcc-functionaltest-lua
  114. os: linux
  115. compiler: gcc
  116. env:
  117. - FUNCTIONALTEST=functionaltest-lua
  118. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  119. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
  120. - *common-job-env
  121. - name: gcc-32bit
  122. os: linux
  123. # Travis creates a cache per compiler. Set a different value here to
  124. # store 32-bit dependencies in a separate cache.
  125. compiler: gcc
  126. env:
  127. - BUILD_32BIT=ON
  128. - CMAKE_FLAGS="$CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
  129. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
  130. - *common-job-env
  131. - name: big-endian
  132. os: linux
  133. arch: s390x
  134. compiler: gcc
  135. env:
  136. - FUNCTIONALTEST=functionaltest-lua
  137. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  138. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
  139. - *common-job-env
  140. addons:
  141. apt:
  142. packages:
  143. - *common-apt-packages
  144. - gettext
  145. - python-pip
  146. - python3-pip
  147. - python-setuptools
  148. - python3-setuptools
  149. - python-dev
  150. - python3-dev
  151. - if: type != pull_request
  152. name: snap
  153. os: linux
  154. env:
  155. - LC_ALL: C.UTF-8
  156. - LANG: C.UTF-8
  157. - SNAPCRAFT_ENABLE_SILENT_REPORT: y
  158. - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
  159. - SNAPCRAFT_BUILD_ENVIRONMENT: lxd
  160. addons:
  161. snaps:
  162. - name: snapcraft
  163. channel: stable
  164. classic: true
  165. - name: http
  166. - name: transfer
  167. - name: lxd
  168. channel: stable
  169. # Override default before_install, before_cache.
  170. before_install: /bin/true
  171. before_cache: /bin/true
  172. install: ci/snap/install.sh
  173. before_script: echo "Building snap..."
  174. script: ci/snap/script.sh
  175. after_success: ci/snap/after_success.sh
  176. deploy:
  177. skip_cleanup: true
  178. provider: script
  179. script: ci/snap/deploy.sh
  180. on:
  181. branch: master
  182. allow_failures:
  183. - env:
  184. - LC_ALL: C.UTF-8
  185. - LANG: C.UTF-8
  186. - SNAPCRAFT_ENABLE_SILENT_REPORT: y
  187. - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
  188. - SNAPCRAFT_BUILD_ENVIRONMENT: lxd
  189. fast_finish: true
  190. before_install: ci/before_install.sh
  191. install: ci/install.sh
  192. before_script: ci/before_script.sh
  193. script: ci/script.sh
  194. before_cache: ci/before_cache.sh
  195. branches:
  196. only:
  197. - master
  198. - /^release-\d+\.\d+$/
  199. cache:
  200. apt: true
  201. ccache: true
  202. directories:
  203. - "$CACHE_NVIM_DEPS_DIR"
  204. git:
  205. quiet: true
  206. notifications:
  207. webhooks:
  208. urls:
  209. - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031