aboutsummaryrefslogtreecommitdiff
path: root/ci/common/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/common/build.sh')
-rw-r--r--ci/common/build.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/ci/common/build.sh b/ci/common/build.sh
index 2748b15b0d..772b696969 100644
--- a/ci/common/build.sh
+++ b/ci/common/build.sh
@@ -1,5 +1,8 @@
top_make() {
- ${MAKE_CMD} "$@"
+ echo '================================================================================'
+ # Travis has 1.5 virtual cores according to:
+ # http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
+ ninja "$@"
}
build_make() {
@@ -17,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}"
@@ -36,7 +38,7 @@ build_deps() {
# update CMake configuration and update to newer deps versions.
cd "${DEPS_BUILD_DIR}"
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
- CC= cmake ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
+ CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
if ! top_make; then
exit 1
@@ -56,7 +58,7 @@ prepare_build() {
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
- cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
+ cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
}
build_nvim() {