From 90aae43984ce3b6a5193ce3bc18293c28db6c606 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 1 Jan 2018 21:00:07 -0500 Subject: travis: Use Ubuntu's clang instead of llvm's repo The llvm repos commonly have access issues, so removing them will improve stability of the Travis builds. Filtering check_log's output through asan_symbolize also avoids the version dance every time a new clang version makes its way into Travis. --- ci/common/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci/common') diff --git a/ci/common/test.sh b/ci/common/test.sh index 55f76ca798..2de89dee79 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -71,7 +71,7 @@ valgrind_check() { } asan_check() { - check_logs "${1}" "*san.*" + check_logs "${1}" "*san.*" | asan_symbolize } run_unittests() {( -- cgit From dd0fa4fd0e6dd7c59aba17dfeadc66b271501ce1 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 1 Jan 2018 21:46:44 -0500 Subject: ci: asan_check: No-op unless performing ASAN build --- ci/common/test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ci/common') diff --git a/ci/common/test.sh b/ci/common/test.sh index 2de89dee79..1cb3a6224b 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -71,7 +71,9 @@ valgrind_check() { } asan_check() { - check_logs "${1}" "*san.*" | asan_symbolize + if test "${CLANG_SANITIZER}" = "ASAN_UBSAN" ; then + check_logs "${1}" "*san.*" | asan_symbolize + fi } run_unittests() {( -- cgit From 6fa0a0a516f3a3a163c50ca0f1f9a8b7443c8860 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 6 Jan 2018 17:56:43 +0100 Subject: ci/travis: macOS: switch ruby version Travis macOS builds are failing because of neovim-ruby gem dependencies. Switch default ruby to a newer version to make the builds pass. --- ci/common/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index f398a1a1cc..adfd7b9e8a 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -87,3 +87,12 @@ build_nvim() { cd "${TRAVIS_BUILD_DIR}" } + +macos_rvm_dance() { + # neovim-ruby gem requires a ruby newer than the macOS default. + source ~/.rvm/scripts/rvm + rvm get stable --auto-dotfiles + rvm reload + rvm use 2.2.5 + rvm use +} -- cgit From 5da6f0e903f2eb76e72bbb3c098d4908d1f3b1ad Mon Sep 17 00:00:00 2001 From: James McCoy Date: Thu, 1 Feb 2018 13:27:51 -0500 Subject: travis: Don't run unit tests for functionaltest-lua build --- ci/common/build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index adfd7b9e8a..2748b15b0d 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -71,9 +71,11 @@ build_nvim() { exit 1 fi - echo "Building nvim-test." - if ! top_make nvim-test ; then - exit 1 + if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then + echo "Building nvim-test." + if ! top_make nvim-test ; then + exit 1 + fi fi fi -- cgit From 9fdd5d7f033941f28bd22b5a0f8c44e96e4dd3ef Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 6 Feb 2018 21:20:45 -0500 Subject: codecov: Submit test suite specific coverage --- ci/common/test.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ci/common') diff --git a/ci/common/test.sh b/ci/common/test.sh index 1cb3a6224b..bc80dfead7 100644 --- a/ci/common/test.sh +++ b/ci/common/test.sh @@ -1,6 +1,15 @@ . "${CI_DIR}/common/build.sh" . "${CI_DIR}/common/suite.sh" +submit_coverage() { + if [ -n "${GCOV}" ]; then + if curl --fail --output codecov.bash --silent https://codecov.io/bash; then + bash codecov.bash -c -F "$1" || echo "codecov upload failed." + rm -f codecov.bash + fi + fi +} + print_core() { local app="$1" local core="$2" @@ -82,6 +91,7 @@ run_unittests() {( if ! build_make unittest ; then fail 'unittests' F 'Unit tests failed' fi + submit_coverage unittest check_core_dumps "$(which luajit)" exit_suite )} @@ -92,6 +102,7 @@ run_functionaltests() {( if ! build_make ${FUNCTIONALTEST}; then fail 'functionaltests' F 'Functional tests failed' fi + submit_coverage functionaltest asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps @@ -105,6 +116,7 @@ run_oldtests() {( reset fail 'oldtests' F 'Legacy tests failed' fi + submit_coverage oldtest asan_check "${LOG_DIR}" valgrind_check "${LOG_DIR}" check_core_dumps -- cgit From 968c7ab17eedd7f3c53f3860ff6fbcaddca417e0 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 9 Mar 2018 20:55:10 +0100 Subject: ci/travis: use ninja instead of make --- ci/common/build.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index 2748b15b0d..13305c0bad 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() { @@ -36,7 +39,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 +59,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() { -- cgit From b0b656dd37567dea5e3f58e7821c7442831403cb Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Mar 2018 13:31:10 +0100 Subject: ci/travis: rename $BUILD_NVIM_DEPS to $CACHE_ENABLE --- ci/common/build.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index 13305c0bad..772b696969 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -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}" -- cgit From c7f95fde1bb1d1a245ad015be10aa4d23fc48899 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Mar 2018 20:15:30 +0100 Subject: ci/travis: Don't destroy cache during prepare Use `cp -r` instead of `mv`. Remove use of `dirname`, that was missed in 10cdf8c28621. closes #5166 --- ci/common/build.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index 772b696969..5b719940ab 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -1,3 +1,11 @@ +_stat() { + if test "${TRAVIS_OS_NAME}" = osx ; then + stat -f %Sm "${@}" + else + stat -c %y "${@}" + fi +} + top_make() { echo '================================================================================' # Travis has 1.5 virtual cores according to: @@ -19,19 +27,12 @@ build_deps() { fi rm -rf "${DEPS_BUILD_DIR}" + mkdir -p "${DEPS_BUILD_DIR}" # 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 cache (last update: $(${statcmd} "${CACHE_MARKER}"))." - - mkdir -p "$(dirname "${DEPS_BUILD_DIR}")" - mv "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" - else - mkdir -p "${DEPS_BUILD_DIR}" + echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))." + cp -r "${HOME}/.cache/nvim-deps" "${DEPS_BUILD_DIR}" fi # Even if we're using cached dependencies, run CMake and make to -- cgit From b0e5187e49caf4c33e5d72d299b353336ae1450c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 16 Mar 2018 07:09:52 +0100 Subject: ci/travis: Don't destroy cache during prepare This change was missed in c7f95fde1bb1. ref #5166 --- ci/common/build.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index 5b719940ab..7d9767f460 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -26,7 +26,6 @@ build_deps() { DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" fi - rm -rf "${DEPS_BUILD_DIR}" mkdir -p "${DEPS_BUILD_DIR}" # Use cached dependencies if $CACHE_MARKER exists. -- cgit From 8f82f95c1c8355228a3d405c8a135a4acb008969 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 16 Mar 2018 07:29:43 +0100 Subject: ci/travis: also cache $DEPS_DOWNLOAD_DIR ref #5166 --- ci/common/build.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ci/common') diff --git a/ci/common/build.sh b/ci/common/build.sh index 7d9767f460..80973b64c9 100644 --- a/ci/common/build.sh +++ b/ci/common/build.sh @@ -27,11 +27,13 @@ build_deps() { fi mkdir -p "${DEPS_BUILD_DIR}" + mkdir -p "${DEPS_DOWNLOAD_DIR}" # Use cached dependencies if $CACHE_MARKER exists. if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then 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-downloads" "${DEPS_DOWNLOAD_DIR}" fi # Even if we're using cached dependencies, run CMake and make to -- cgit