mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
6e4e70f51b
This should better allow distributing the load among PRs, while getting critical feedback to the submitter sooner. First stage runs the ASAN/UBSAN/TSAN since any failures in those are gating issues. Second stage runs the rest of the normal builds in parallel. Remaining stages provide lower priority feedback. The lint build runs fast locally, so it's better to run that locally than wait on CI. The coverage build is pretty fickle, so it is only run once all other jobs are green.
138 lines
4.2 KiB
YAML
138 lines
4.2 KiB
YAML
dist: trusty
|
|
sudo: false
|
|
language: c
|
|
|
|
env:
|
|
global:
|
|
# To force rebuilding of third-party dependencies, set this to 'true'.
|
|
- BUILD_NVIM_DEPS=false
|
|
# Travis has 1.5 virtual cores according to
|
|
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
|
- MAKE_CMD="make -j2"
|
|
# Update PATH for pip.
|
|
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:/usr/lib/llvm-symbolizer-3.9/bin:$PATH"
|
|
# Build directory for Neovim.
|
|
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
|
# Build directory for third-party dependencies.
|
|
- DEPS_BUILD_DIR="$HOME/nvim-deps"
|
|
# Directory where third-party dependency sources are downloaded to.
|
|
- DEPS_DOWNLOAD_DIR="$TRAVIS_BUILD_DIR/deps-downloads"
|
|
# Install directory for Neovim.
|
|
- INSTALL_PREFIX="$HOME/nvim-install"
|
|
# Log directory for Clang sanitizers and Valgrind.
|
|
- LOG_DIR="$BUILD_DIR/log"
|
|
# Default CMake flags.
|
|
- CMAKE_FLAGS="-DTRAVIS_CI_BUILD=ON
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX
|
|
-DBUSTED_OUTPUT_TYPE=nvim
|
|
-DDEPS_PREFIX=$DEPS_BUILD_DIR/usr
|
|
-DMIN_LOG_LEVEL=3
|
|
-DDISABLE_LOG=1"
|
|
- DEPS_CMAKE_FLAGS="-DDEPS_DOWNLOAD_DIR:PATH=$DEPS_DOWNLOAD_DIR"
|
|
# Additional CMake flags for 32-bit builds.
|
|
- CMAKE_FLAGS_32BIT="-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32
|
|
-DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib
|
|
-DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
|
|
# Environment variables for Clang sanitizers.
|
|
- ASAN_OPTIONS="detect_leaks=1:check_initialization_order=1:log_path=$LOG_DIR/asan"
|
|
- TSAN_OPTIONS="log_path=$LOG_DIR/tsan"
|
|
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
|
# Environment variables for Valgrind.
|
|
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
|
# Cache marker for third-party dependencies cache.
|
|
# If this file exists, we know that the cache contains compiled
|
|
# dependencies and we can use it.
|
|
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
|
# default target name for functional tests
|
|
- FUNCTIONALTEST=functionaltest
|
|
- CI_TARGET=tests
|
|
|
|
jobs:
|
|
include:
|
|
- stage: sanitizers
|
|
os: linux
|
|
compiler: clang-3.9
|
|
env: >
|
|
CLANG_SANITIZER=ASAN_UBSAN
|
|
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
|
|
- os: linux
|
|
compiler: clang-3.9
|
|
env: CLANG_SANITIZER=TSAN
|
|
- stage: normal builds
|
|
os: linux
|
|
compiler: gcc-5
|
|
env: FUNCTIONALTEST=functionaltest-lua
|
|
- os: linux
|
|
# Travis creates a cache per compiler.
|
|
# Set a different value here to store 32-bit
|
|
# dependencies in a separate cache.
|
|
compiler: gcc-5 -m32
|
|
env: BUILD_32BIT=ON
|
|
- os: osx
|
|
compiler: clang
|
|
osx_image: xcode7.3 # macOS 10.11
|
|
- os: osx
|
|
compiler: gcc-4.9
|
|
osx_image: xcode7.3 # macOS 10.11
|
|
- stage: lint
|
|
os: linux
|
|
env: CI_TARGET=lint
|
|
- stage: coverage
|
|
os: linux
|
|
compiler: gcc-5
|
|
env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
|
allow_failures:
|
|
- env: GCOV=gcov-5 CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
|
|
fast_finish: true
|
|
|
|
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
|
|
after_success: ci/after_success.sh
|
|
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
- llvm-toolchain-trusty-3.9
|
|
packages:
|
|
- autoconf
|
|
- automake
|
|
- apport
|
|
- build-essential
|
|
- clang-3.9
|
|
- cmake
|
|
- cscope
|
|
- g++-5-multilib
|
|
- g++-multilib
|
|
- gcc-5-multilib
|
|
- gcc-multilib
|
|
- gdb
|
|
- language-pack-tr
|
|
- libc6-dev-i386
|
|
- libtool
|
|
- llvm-3.9-dev
|
|
- locales
|
|
- pkg-config
|
|
- unzip
|
|
- valgrind
|
|
- xclip
|
|
|
|
branches:
|
|
except:
|
|
- nightly
|
|
|
|
cache:
|
|
apt: true
|
|
directories:
|
|
- "$HOME/.cache/pip"
|
|
- "$HOME/.cache/nvim-deps"
|
|
|
|
notifications:
|
|
webhooks:
|
|
urls:
|
|
- https://webhooks.gitter.im/e/b5c38c99f9677aa3d031
|