CI: Fix/improve Travis cache handling [skip appveyor] #10422

Via https://github.com/neovim/neovim/pull/10412

* use list, no indirection
* use job names
* __FOR_TRAVIS_CACHE__ (more descriptive)
This commit is contained in:
Daniel Hahler 2019-07-05 21:45:50 +02:00 committed by Justin M. Keyes
parent d65181fc9a
commit dc1a11dbe1

View File

@ -47,46 +47,74 @@ env:
- CCACHE_SLOPPINESS=time_macros,file_macro
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
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.
__FOR_TRAVIS_CACHE__=$TRAVIS_BRANCH
jobs:
include:
- stage: normal builds
name: clang-asan
os: linux
compiler: clang-4.0
# Use Lua so that ASAN can test our embedded Lua support. 8fec4d53d0f6
env: >
CLANG_SANITIZER=ASAN_UBSAN
CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
ASAN_SYMBOLIZE=asan_symbolize-4.0
- os: linux
env:
- CLANG_SANITIZER=ASAN_UBSAN
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- ASAN_SYMBOLIZE=asan_symbolize-4.0
- *common-job-env
- 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"
- os: linux
env:
- FUNCTIONALTEST=functionaltest-lua
- CMAKE_FLAGS="$CMAKE_FLAGS -DPREFER_LUA=ON"
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -DUSE_BUNDLED_LUAJIT=OFF"
- *common-job-env
- name: gcc-32bit
os: linux
# Travis creates a cache per compiler. Set a different value here to
# store 32-bit dependencies in a separate cache.
compiler: gcc
env: BUILD_32BIT=ON
- os: osx
env:
- BUILD_32BIT: ON
- *common-job-env
- name: "OSX: clang"
os: osx
compiler: clang
osx_image: xcode9.4 # macOS 10.13
- os: osx
env: *common-job-env
- name: "OSX: gcc"
os: osx
compiler: gcc
osx_image: xcode9.4 # macOS 10.13
env: *common-job-env
- if: branch = master
name: lint
os: linux
env: CI_TARGET=lint
env:
- CI_TARGET=lint
- *common-job-env
- stage: Flaky builds
name: gcc-coverage
os: linux
compiler: gcc
env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
env:
- GCOV=gcov
- CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
- *common-job-env
- os: linux
name: clang-tsan
compiler: clang
env: CLANG_SANITIZER=TSAN
env:
- CLANG_SANITIZER=TSAN
- *common-job-env
allow_failures:
- env: GCOV=gcov CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_GCOV=ON"
- env: CLANG_SANITIZER=TSAN
- name: gcc-coverage
- name: clang-tsan
fast_finish: true
before_install: ci/before_install.sh