From 66a4c958668fca1f8306fe6ea38fed28bc2b84ba Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Sun, 17 Jul 2016 11:40:28 +0200 Subject: [PATCH] Travis: Use caching instead of pre-compiled deps for OSX. --- .ci/before_script.sh | 6 +++--- .ci/common/build.sh | 9 +++++++-- .ci/install.sh | 2 +- .ci/script.sh | 3 --- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.ci/before_script.sh b/.ci/before_script.sh index 6babc582ea..23940ab2e2 100755 --- a/.ci/before_script.sh +++ b/.ci/before_script.sh @@ -29,10 +29,10 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # That allows to test changing the group of the file by `os_fchown`. sudo dscl . -create /Groups/chown_test sudo dscl . -append /Groups/chown_test GroupMembership "${USER}" -else - # Compile dependencies. - build_deps fi +# Compile dependencies. +build_deps + rm -rf "${LOG_DIR}" mkdir -p "${LOG_DIR}" diff --git a/.ci/common/build.sh b/.ci/common/build.sh index 06bdab707f..f31fb01360 100644 --- a/.ci/common/build.sh +++ b/.ci/common/build.sh @@ -14,10 +14,15 @@ build_deps() { # If there is a valid cache and we're not forced to recompile, # use cached third-party dependencies. if [[ -f "${CACHE_MARKER}" ]] && [[ "${BUILD_NVIM_DEPS}" != true ]]; then - echo "Using third-party dependencies from Travis's cache (last updated: $(stat -c '%y' "${CACHE_MARKER}"))." + if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + local statcmd="stat -f '%Sm'" + else + local statcmd="stat -c '%y'" + fi + echo "Using third-party dependencies from Travis's cache (last updated: $(${statcmd} "${CACHE_MARKER}"))." mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" - mv -T "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" + mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" else mkdir -p "${DEPS_BUILD_DIR}" fi diff --git a/.ci/install.sh b/.ci/install.sh index 93c9a930ac..f809bb06ea 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -9,6 +9,7 @@ fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew install gettext + brew reinstall -s libtool elif [[ "${BUILD_MINGW}" == ON ]]; then # TODO: When Travis gets a recent version of Mingw-w64 use packages: # binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools @@ -16,7 +17,6 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then echo "Downloading MinGW..." curl -sSL "https://github.com/neovim/deps/raw/master/opt/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" \ | tar xJf - -C "${HOME}/.local" - fi # Use default CC to avoid compilation problems when installing Python modules. diff --git a/.ci/script.sh b/.ci/script.sh index c3c7b8dfa9..46c4eecf38 100755 --- a/.ci/script.sh +++ b/.ci/script.sh @@ -12,9 +12,6 @@ fi # as $USER, while retaining the environment variables defined and belonging # to secondary groups given above in usermod. if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - # Set up precompiled third-party dependencies. - eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) deps-x64" - sudo -E su "${USER}" -c ".ci/run_tests.sh" else .ci/run_tests.sh