.travis.yml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. # Minimum required CMake.
  131. - CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
  132. - *common-job-env
  133. - name: big-endian
  134. os: linux
  135. arch: s390x
  136. compiler: gcc
  137. env:
  138. - FUNCTIONALTEST=functionaltest-lua
  139. - CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
  140. - DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
  141. - *common-job-env
  142. addons:
  143. apt:
  144. packages:
  145. - *common-apt-packages
  146. - gettext
  147. - python-pip
  148. - python3-pip
  149. - python-setuptools
  150. - python3-setuptools
  151. - python-dev
  152. - python3-dev
  153. - if: type != pull_request
  154. name: snap
  155. os: linux
  156. env:
  157. - LC_ALL: C.UTF-8
  158. - LANG: C.UTF-8
  159. - SNAPCRAFT_ENABLE_SILENT_REPORT: y
  160. - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
  161. - SNAPCRAFT_BUILD_ENVIRONMENT: lxd
  162. addons:
  163. snaps:
  164. - name: snapcraft
  165. channel: stable
  166. classic: true
  167. - name: http
  168. - name: transfer
  169. - name: lxd
  170. channel: stable
  171. # Override default before_install, before_cache.
  172. before_install: /bin/true
  173. before_cache: /bin/true
  174. install: ci/snap/install.sh
  175. before_script: echo "Building snap..."
  176. script: ci/snap/script.sh
  177. after_success: ci/snap/after_success.sh
  178. deploy:
  179. skip_cleanup: true
  180. provider: script
  181. script: ci/snap/deploy.sh
  182. on:
  183. branch: master
  184. allow_failures:
  185. - env:
  186. - LC_ALL: C.UTF-8
  187. - LANG: C.UTF-8
  188. - SNAPCRAFT_ENABLE_SILENT_REPORT: y
  189. - SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y
  190. - SNAPCRAFT_BUILD_ENVIRONMENT: lxd
  191. fast_finish: true
  192. before_install: ci/before_install.sh
  193. install: ci/install.sh
  194. before_script: ci/before_script.sh
  195. script: ci/script.sh
  196. before_cache: ci/before_cache.sh
  197. branches:
  198. only:
  199. - master
  200. - /^release-\d+\.\d+$/
  201. cache:
  202. apt: true
  203. ccache: true
  204. directories:
  205. - "$CACHE_NVIM_DEPS_DIR"
  206. git:
  207. quiet: true
  208. notifications:
  209. webhooks:
  210. urls:
  211. - https://webhooks.gitter.im/e/b5c38c99f9677aa3d031