mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
ci/travis: rename $BUILD_NVIM_DEPS to $CACHE_ENABLE
This commit is contained in:
parent
9a0147754c
commit
b0b656dd37
@ -4,8 +4,8 @@ language: c
|
||||
|
||||
env:
|
||||
global:
|
||||
# To force rebuilding of third-party dependencies, set this to 'true'.
|
||||
- BUILD_NVIM_DEPS=false
|
||||
# Set "false" to force rebuild of third-party dependencies.
|
||||
- CACHE_ENABLE=true
|
||||
# Build directory for Neovim.
|
||||
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
||||
# Build directory for third-party dependencies.
|
||||
@ -36,9 +36,7 @@ env:
|
||||
- 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.
|
||||
# If this file exists, the cache is valid (compile was successful).
|
||||
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
||||
# default target name for functional tests
|
||||
- FUNCTIONALTEST=functionaltest
|
||||
|
@ -20,14 +20,13 @@ build_deps() {
|
||||
|
||||
rm -rf "${DEPS_BUILD_DIR}"
|
||||
|
||||
# If there is a valid cache and we're not forced to recompile,
|
||||
# use cached third-party dependencies.
|
||||
if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then
|
||||
# Use cached dependencies if $CACHE_MARKER exists.
|
||||
if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
|
||||
local statcmd="stat -c '%y'"
|
||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
||||
statcmd="stat -f '%Sm'"
|
||||
fi
|
||||
echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))."
|
||||
echo "Using third-party dependencies from Travis cache (last update: $(${statcmd} "${CACHE_MARKER}"))."
|
||||
|
||||
mkdir -p "$(dirname "${DEPS_BUILD_DIR}")"
|
||||
mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}"
|
||||
|
Loading…
Reference in New Issue
Block a user