2018-11-20 10:05:07 +01:00
|
|
|
dist: xenial
|
|
|
|
|
2014-02-22 18:29:21 +01:00
|
|
|
language: c
|
2015-07-05 09:52:36 +02:00
|
|
|
|
2014-04-22 19:40:19 +02:00
|
|
|
env:
|
2014-05-31 16:19:14 +02:00
|
|
|
global:
|
2018-03-11 13:31:10 +01:00
|
|
|
# Set "false" to force rebuild of third-party dependencies.
|
|
|
|
- CACHE_ENABLE=true
|
2015-07-05 09:52:36 +02:00
|
|
|
# Build directory for Neovim.
|
|
|
|
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
|
|
|
# Build directory for third-party dependencies.
|
2015-09-08 12:48:04 +02:00
|
|
|
- DEPS_BUILD_DIR="$HOME/nvim-deps"
|
2015-07-05 09:52:36 +02:00
|
|
|
# Install directory for Neovim.
|
|
|
|
- INSTALL_PREFIX="$HOME/nvim-install"
|
|
|
|
# Log directory for Clang sanitizers and Valgrind.
|
|
|
|
- LOG_DIR="$BUILD_DIR/log"
|
2017-05-30 14:54:09 +02:00
|
|
|
# Nvim log file.
|
|
|
|
- NVIM_LOG_FILE="$BUILD_DIR/.nvimlog"
|
2015-07-05 09:52:36 +02:00
|
|
|
# Default CMake flags.
|
|
|
|
- CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
|
2017-04-10 02:33:00 +02:00
|
|
|
-DBUSTED_OUTPUT_TYPE=nvim
|
2014-12-08 21:00:54 +01:00
|
|
|
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
|
2017-05-30 02:03:08 +02:00
|
|
|
-DMIN_LOG_LEVEL=3"
|
2019-07-30 23:21:12 +02:00
|
|
|
- DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_GPERF=OFF"
|
2015-07-05 09:52:36 +02:00
|
|
|
# Environment variables for Clang sanitizers.
|
|
|
|
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
|
2019-08-15 21:58:22 +02:00
|
|
|
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
|
2016-11-13 04:28:59 +01:00
|
|
|
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
2015-07-05 09:52:36 +02:00
|
|
|
# Environment variables for Valgrind.
|
|
|
|
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
2019-07-30 23:21:12 +02:00
|
|
|
- CACHE_NVIM_DEPS_DIR="$HOME/.cache/nvim-deps"
|
2018-03-11 13:31:10 +01:00
|
|
|
# If this file exists, the cache is valid (compile was successful).
|
2019-07-30 23:21:12 +02:00
|
|
|
- CACHE_MARKER="$CACHE_NVIM_DEPS_DIR/.travis_cache_marker"
|
2016-03-07 06:18:44 +01:00
|
|
|
# default target name for functional tests
|
|
|
|
- FUNCTIONALTEST=functionaltest
|
2017-03-31 15:02:53 +02:00
|
|
|
- CI_TARGET=tests
|
2018-05-01 13:02:11 +02:00
|
|
|
# Environment variables for ccache
|
|
|
|
- CCACHE_COMPRESS=1
|
|
|
|
- CCACHE_SLOPPINESS=time_macros,file_macro
|
|
|
|
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
2019-07-18 01:27:05 +02:00
|
|
|
# Default since 3.3, but Travis (Xenial) has 3.2.4; required with newer gcc/clang.
|
|
|
|
- CCACHE_CPP2=1
|
2015-07-05 09:52:36 +02:00
|
|
|
|
2019-07-07 18:07:01 +02:00
|
|
|
anchors:
|
|
|
|
envs: &common-job-env
|
|
|
|
# Do not fall back to cache for "master" for PR on "release" branch:
|
|
|
|
# adds the target branch to the cache key.
|
2019-07-30 23:21:12 +02:00
|
|
|
FOR_TRAVIS_CACHE=v1-$TRAVIS_BRANCH
|
2019-07-07 18:07:01 +02:00
|
|
|
|
2019-07-18 01:27:05 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages: &common-apt-packages
|
|
|
|
- apport
|
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- build-essential
|
2019-07-18 08:49:37 +02:00
|
|
|
- clang
|
2019-07-18 01:27:05 +02:00
|
|
|
- cmake
|
|
|
|
- cscope
|
|
|
|
- gcc-multilib
|
|
|
|
- gdb
|
|
|
|
- gperf
|
|
|
|
- language-pack-tr
|
|
|
|
- libc6-dev-i386
|
|
|
|
- libtool-bin
|
|
|
|
- locales
|
|
|
|
- ninja-build
|
|
|
|
- pkg-config
|
|
|
|
- unzip
|
|
|
|
- valgrind
|
|
|
|
- xclip
|
|
|
|
homebrew:
|
2019-08-14 21:59:28 +02:00
|
|
|
update: false
|
2019-07-18 01:27:05 +02:00
|
|
|
packages:
|
|
|
|
- ccache
|
|
|
|
- ninja
|
|
|
|
|
2017-05-14 06:46:30 +02:00
|
|
|
jobs:
|
2014-11-27 15:10:36 +01:00
|
|
|
include:
|
2019-07-24 02:16:09 +02:00
|
|
|
- stage: baseline
|
|
|
|
name: clang-asan
|
|
|
|
os: linux
|
|
|
|
compiler: clang
|
|
|
|
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
|
|
|
|
env:
|
|
|
|
- CLANG_SANITIZER=ASAN_UBSAN
|
|
|
|
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
|
|
|
- *common-job-env
|
2019-08-02 15:48:32 +02:00
|
|
|
- name: gcc-coverage (gcc 9)
|
2019-07-24 02:16:09 +02:00
|
|
|
os: linux
|
2019-08-02 15:48:32 +02:00
|
|
|
compiler: gcc-9
|
2019-07-24 02:16:09 +02:00
|
|
|
env:
|
2019-08-02 15:48:32 +02:00
|
|
|
- GCOV=gcov-9
|
|
|
|
- CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
|
|
|
- GCOV_ERROR_FILE="/tmp/libgcov-errors.log"
|
2019-10-04 16:09:42 +02:00
|
|
|
- USE_LUACOV=1
|
|
|
|
- BUSTED_ARGS="--coverage"
|
2019-07-24 02:16:09 +02:00
|
|
|
- *common-job-env
|
2019-08-02 15:48:32 +02:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
|
|
|
packages:
|
|
|
|
- *common-apt-packages
|
|
|
|
- gcc-9
|
2019-07-24 02:16:09 +02:00
|
|
|
- if: branch = master AND commit_message !~ /\[skip.lint\]/
|
|
|
|
name: lint
|
|
|
|
os: linux
|
|
|
|
env:
|
|
|
|
- CI_TARGET=lint
|
|
|
|
- *common-job-env
|
|
|
|
|
2019-06-20 01:51:42 +02:00
|
|
|
- stage: second stage
|
2019-07-07 18:07:01 +02:00
|
|
|
name: "macOS: clang"
|
2019-06-15 18:46:51 +02:00
|
|
|
os: osx
|
2014-11-30 11:27:08 +01:00
|
|
|
compiler: clang
|
2019-06-26 20:06:40 +02:00
|
|
|
osx_image: xcode10.2 # macOS 10.14
|
2019-07-07 18:07:01 +02:00
|
|
|
env:
|
|
|
|
- *common-job-env
|
2019-08-03 14:55:27 +02:00
|
|
|
- name: gcc-functionaltest-lua
|
|
|
|
os: linux
|
|
|
|
compiler: gcc
|
|
|
|
env:
|
|
|
|
- FUNCTIONALTEST=functionaltest-lua
|
|
|
|
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
|
|
|
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
|
|
|
|
- *common-job-env
|
2019-08-02 15:48:32 +02:00
|
|
|
- name: gcc-32bit
|
2019-07-24 02:16:09 +02:00
|
|
|
os: linux
|
2019-08-02 15:48:32 +02:00
|
|
|
# Travis creates a cache per compiler. Set a different value here to
|
|
|
|
# store 32-bit dependencies in a separate cache.
|
|
|
|
compiler: gcc
|
2019-07-24 02:16:09 +02:00
|
|
|
env:
|
2019-08-02 15:48:32 +02:00
|
|
|
- BUILD_32BIT=ON
|
2019-10-03 05:40:25 +02:00
|
|
|
- CMAKE_FLAGS="$CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
|
|
|
|
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
|
2019-08-02 15:48:32 +02:00
|
|
|
# Minimum required CMake.
|
|
|
|
- CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
|
2019-07-24 02:16:09 +02:00
|
|
|
- *common-job-env
|
2019-07-07 18:07:01 +02:00
|
|
|
- name: clang-tsan
|
|
|
|
os: linux
|
2018-01-02 03:00:07 +01:00
|
|
|
compiler: clang
|
2019-07-07 18:07:01 +02:00
|
|
|
env:
|
2019-07-24 02:16:09 +02:00
|
|
|
- CLANG_SANITIZER=TSAN
|
2019-07-07 18:07:01 +02:00
|
|
|
- *common-job-env
|
2015-02-02 17:19:12 +01:00
|
|
|
fast_finish: true
|
2015-07-05 09:52:36 +02:00
|
|
|
|
2017-03-31 14:32:58 +02:00
|
|
|
before_install: ci/before_install.sh
|
|
|
|
install: ci/install.sh
|
|
|
|
before_script: ci/before_script.sh
|
|
|
|
script: ci/script.sh
|
|
|
|
before_cache: ci/before_cache.sh
|
2015-07-05 09:52:36 +02:00
|
|
|
|
|
|
|
branches:
|
2018-12-21 11:48:32 +01:00
|
|
|
only:
|
|
|
|
- master
|
2019-01-01 14:06:02 +01:00
|
|
|
- /^release-\d+\.\d+$/
|
2015-07-05 09:52:36 +02:00
|
|
|
|
|
|
|
cache:
|
|
|
|
apt: true
|
2018-05-01 13:02:11 +02:00
|
|
|
ccache: true
|
2015-07-05 09:52:36 +02:00
|
|
|
directories:
|
2019-07-30 23:21:12 +02:00
|
|
|
- "$CACHE_NVIM_DEPS_DIR"
|
2015-07-05 09:52:36 +02:00
|
|
|
|
2019-08-15 08:55:22 +02:00
|
|
|
git:
|
|
|
|
quiet: true
|
|
|
|
|
2015-03-18 00:36:45 +01:00
|
|
|
notifications:
|
|
|
|
webhooks:
|
|
|
|
urls:
|
|
|
|
- https://webhooks.gitter.im/e/b5c38c99f9677aa3d031
|