mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
travis: Enable ccache
This commit is contained in:
@@ -41,6 +41,10 @@ env:
|
|||||||
# default target name for functional tests
|
# default target name for functional tests
|
||||||
- FUNCTIONALTEST=functionaltest
|
- FUNCTIONALTEST=functionaltest
|
||||||
- CI_TARGET=tests
|
- CI_TARGET=tests
|
||||||
|
# Environment variables for ccache
|
||||||
|
- CCACHE_COMPRESS=1
|
||||||
|
- CCACHE_SLOPPINESS=time_macros,file_macro
|
||||||
|
- CCACHE_BASEDIR="$TRAVIS_BUILD_DIR"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
@@ -118,6 +122,7 @@ branches:
|
|||||||
|
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
|
ccache: true
|
||||||
directories:
|
directories:
|
||||||
- "$HOME/.cache/pip"
|
- "$HOME/.cache/pip"
|
||||||
- "$HOME/.cache/nvim-deps"
|
- "$HOME/.cache/nvim-deps"
|
||||||
|
@@ -14,6 +14,9 @@ rm -f "${HOME}/.cache/pip/selfcheck.json"
|
|||||||
echo "before_cache.sh: cache size"
|
echo "before_cache.sh: cache size"
|
||||||
du -d 2 "${HOME}/.cache" | sort -n
|
du -d 2 "${HOME}/.cache" | sort -n
|
||||||
|
|
||||||
|
echo "before_cache.sh: ccache stats"
|
||||||
|
ccache -s 2>/dev/null || true
|
||||||
|
|
||||||
# Update the third-party dependency cache only if the build was successful.
|
# Update the third-party dependency cache only if the build was successful.
|
||||||
if ended_successfully; then
|
if ended_successfully; then
|
||||||
rm -rf "${HOME}/.cache/nvim-deps"
|
rm -rf "${HOME}/.cache/nvim-deps"
|
||||||
|
@@ -20,6 +20,9 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Show ccache stats so we can compare in before_cache
|
||||||
|
ccache -s 2>/dev/null || true
|
||||||
|
|
||||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
# Adds user to a dummy group.
|
# Adds user to a dummy group.
|
||||||
# That allows to test changing the group of the file by `os_fchown`.
|
# That allows to test changing the group of the file by `os_fchown`.
|
||||||
|
@@ -30,7 +30,9 @@ build_deps() {
|
|||||||
mkdir -p "${DEPS_DOWNLOAD_DIR}"
|
mkdir -p "${DEPS_DOWNLOAD_DIR}"
|
||||||
|
|
||||||
# Use cached dependencies if $CACHE_MARKER exists.
|
# Use cached dependencies if $CACHE_MARKER exists.
|
||||||
if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
|
if test "${CACHE_ENABLE}" = "false" ; then
|
||||||
|
export CCACHE_RECACHE=1
|
||||||
|
elif test -f "${CACHE_MARKER}" ; then
|
||||||
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
|
||||||
cp -r "${HOME}/.cache/nvim-deps"/. "${DEPS_BUILD_DIR}"
|
cp -r "${HOME}/.cache/nvim-deps"/. "${DEPS_BUILD_DIR}"
|
||||||
cp -r "${HOME}/.cache/nvim-deps-downloads" "${DEPS_DOWNLOAD_DIR}"
|
cp -r "${HOME}/.cache/nvim-deps-downloads" "${DEPS_DOWNLOAD_DIR}"
|
||||||
|
@@ -11,6 +11,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
|||||||
brew install ninja
|
brew install ninja
|
||||||
brew install gettext
|
brew install gettext
|
||||||
brew reinstall -s libtool
|
brew reinstall -s libtool
|
||||||
|
brew install ccache
|
||||||
|
export PATH="/usr/local/opt/ccache/libexec:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Install neovim module for Python 3."
|
echo "Install neovim module for Python 3."
|
||||||
|
Reference in New Issue
Block a user