From e463cb6fa03f807930bb052cba5b80dd46094cca Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 13 Aug 2017 20:34:23 -0400 Subject: ci: Switch to codecov.io for coverage data Continue uploading to coveralls, for now, so we can compare the services. --- ci/after_success.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'ci') diff --git a/ci/after_success.sh b/ci/after_success.sh index 0215eb139b..388b6eb714 100755 --- a/ci/after_success.sh +++ b/ci/after_success.sh @@ -5,4 +5,5 @@ set -o pipefail if [[ -n "${GCOV}" ]]; then coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' + bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.' fi -- cgit From e88fc3542903ac2527a8f6a90135701bd19fec2f Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 14 Aug 2017 08:30:59 -0400 Subject: ci: Collect coverage data for MINGW_64 builds on appveyor --- ci/build.bat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index c871c6b849..9c6b77c49a 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -38,13 +38,17 @@ cd .. :: Build Neovim mkdir build cd build -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim -DUSE_GCOV="%USE_GCOV%" -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error mingw32-make VERBOSE=1 || goto :error bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error +if "%USE_GCOV%" == "ON" ( + C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" +) + :: Build artifacts cpack -G ZIP -C RelWithDebInfo if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo -- cgit From 44dc8bbb1330a07a7cd3c1b379d6e15dc8258010 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 15 Aug 2017 11:06:51 +0200 Subject: ci/win: list build permutations explicitly (#7163) This avoids changing the matrix permutations for the old non-gcov builds, so that old URLs continue to work: https://ci.appveyor.com/api/projects/neovim/neovim/artifacts/build/Neovim.zip?branch=master&job=Configuration%3A%20MINGW_32 https://ci.appveyor.com/api/projects/neovim/neovim/artifacts/build/Neovim.zip?branch=master&job=Configuration%3A%20MINGW_64 --- ci/build.bat | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 9c6b77c49a..6eb22176a9 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -9,6 +9,10 @@ if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=x86_64 set BITS=64 ) +if "%CONFIGURATION%" == "MINGW_64-gcov" ( + set USE_GCOV="-DUSE_GCOV=ON" +) + :: We cannot have sh.exe in the PATH (MinGW) set PATH=%PATH:C:\Program Files\Git\usr\bin;=% set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH% @@ -38,14 +42,14 @@ cd .. :: Build Neovim mkdir build cd build -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim -DUSE_GCOV="%USE_GCOV%" -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error +cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error mingw32-make VERBOSE=1 || goto :error bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error -if "%USE_GCOV%" == "ON" ( +if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" ) -- cgit From 23cc41df555fba7345e0403eff3f4b3483cb2747 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 9 Sep 2017 16:44:38 +0200 Subject: ci/travis: report python environment info --- ci/before_install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index 5b36adaef2..7279152fb0 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -11,6 +11,18 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew update fi +echo 'python info:' +( + 2>&1 python --version || true + 2>&1 python2 --version || true + 2>&1 python3 --version || true + 2>&1 pip --version || true + 2>&1 pip2 --version || true + 2>&1 pip3 --version || true + echo 'pyenv versions:' + 2>&1 pyenv versions || true +) | sed 's/^/ /' + echo "Upgrade Python 2 pip." pip2.7 -q install --user --upgrade pip -- cgit From 6389bde0bc966e5a5850735b0b1605f7fca233f9 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 9 Sep 2017 21:26:40 +0200 Subject: ci/travis: skip pip3 upgrade if pip3 is missing Workaround for travis issue: https://github.com/travis-ci/travis-ci/issues/8363 Sometimes `pip3` works, sometimes not: pyenv: pip3: command not found The `pip3' command exists in these Python versions: 3.5 3.5.3 Tried these steps to fix the issue: - add `python: 3.6` to top level of `.travis.yml` - add `python3` to `addons.apt.packages` level of `.travis.yml` - `pyenv global system 3.{4,5,6}` - `pyenv global 3.6` In all cases the presence or absence of `pip3` was random. --- ci/before_install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index 7279152fb0..8b0603eb16 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -32,6 +32,10 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else - echo "Upgrade Python 3 pip." - pip3 -q install --user --upgrade pip + if command -v pip3 ; then + echo "Upgrade Python 3 pip." + pip3 -q install --user --upgrade pip + else + echo 'warning: missing pip3' + fi fi -- cgit From f51a397010dcf4a8308c3b0249810696375b82b2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 10 Sep 2017 13:53:26 +0200 Subject: ci/travis: ignore pip3 failure Workaround for travis issue: https://github.com/travis-ci/travis-ci/issues/8363 Cannot check `command -v pip3`, because that may point to `/opt/pyenv/shims/pip3` which is also (sometimes) broken. ref 6389bde0bc96 --- ci/before_install.sh | 10 ++++------ ci/install.sh | 4 +++- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index 8b0603eb16..f84ad935bc 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -32,10 +32,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else - if command -v pip3 ; then - echo "Upgrade Python 3 pip." - pip3 -q install --user --upgrade pip - else - echo 'warning: missing pip3' - fi + echo "Upgrade Python 3 pip." + # Allow failure. pyenv pip3 on travis is broken: + # https://github.com/travis-ci/travis-ci/issues/8363 + pip3 -q install --user --upgrade pip || true fi diff --git a/ci/install.sh b/ci/install.sh index 4ee99e1e44..c8a0c8825d 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -17,7 +17,9 @@ echo "Install neovim module and coveralls for Python 2." CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls echo "Install neovim module for Python 3." -CC=cc pip3 -q install --user --upgrade neovim +# Allow failure. pyenv pip3 on travis is broken: +# https://github.com/travis-ci/travis-ci/issues/8363 +CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim -- cgit From afae4b514183c490737a28f2946def717e78a11c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 7 Dec 2017 04:21:03 -0500 Subject: ci: Install neovim gem in Appveyor (#7700) ref #7655 --- ci/build.bat | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 6eb22176a9..91eca9ef73 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -33,6 +33,10 @@ set PATH=C:\Python35;C:\Python27;%PATH% python -c "import neovim; print(str(neovim))" || goto :error python3 -c "import neovim; print(str(neovim))" || goto :error +set PATH=C:\Ruby24\bin;%PATH% +cmd /c gem.cmd install neovim || goto :error +where.exe neovim-ruby-host.bat || goto :error + mkdir .deps cd .deps cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error -- cgit From 4a5bc6275d09056ff0ccf5a29a878d48bbe58655 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 8 Dec 2017 10:42:30 -0500 Subject: ci: run oldtests in Appveyor #7705 --- ci/build.bat | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 91eca9ef73..25f949b5e4 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -53,6 +53,12 @@ bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error +:: Old tests +setlocal +set PATH=%PATH%;C:\msys64\usr\bin +mingw32-make -C "%~dp0\..\src\nvim\testdir" VERBOSE=1 +endlocal + if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" ) -- cgit From a1adfdc7d59979824addce2f519a527f9a5c0290 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 29 Nov 2017 01:50:11 -0500 Subject: ci: nodejs client acceptance-test #7706 ci: install nodejs 8 in Appveyor, Travis provider: check node version for debug support Resolve https://github.com/neovim/neovim/pull/7577#issuecomment-350590592 for Unix. provider: test if nodejs in ci supports --inspect-brk nodejs host for neovim requires nodejs 6+ to work properly. nodejs 6.12+ or 7.6+ is required for debug support via `node --inspect-brk`. provider: run cli.js of nodejs host directly npm shims are useless because the user cannot set node to debug mode via --inspect-brk. This is problematic on Windows which use batchfiles and shell scripts to compensate for not supporting shebang. The patch uses `npm root -g` to get the absolute path of the global npm modules. If that fails, then the user did not install neovim npm package globally. Use that absolute path to find `neovim/bin/cli.js`, which is what the npm shim actually runs with node. glob() is for a simple file check in case bin/ is removed because the npm shims are ignored now. --- ci/before_install.sh | 12 ++++++++++++ ci/build.bat | 6 ++++++ ci/install.sh | 5 +++++ ci/run_tests.sh | 1 + 4 files changed, 24 insertions(+) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index f84ad935bc..f5a57ad657 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -37,3 +37,15 @@ else # https://github.com/travis-ci/travis-ci/issues/8363 pip3 -q install --user --upgrade pip || true fi + +if [[ "${TRAVIS_OS_NAME}" == linux ]]; then + echo "Install node (LTS)" + + if [ ! -f ~/.nvm/nvm.sh ]; then + curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh + fi + + source ~/.nvm/nvm.sh + nvm install --lts + nvm use --lts +fi diff --git a/ci/build.bat b/ci/build.bat index 25f949b5e4..c5353ec5d1 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -37,6 +37,12 @@ set PATH=C:\Ruby24\bin;%PATH% cmd /c gem.cmd install neovim || goto :error where.exe neovim-ruby-host.bat || goto :error +cmd /c npm.cmd install -g neovim || goto :error +where.exe neovim-node-host.cmd || goto :error +for /f %%F in ('cmd /c npm root -g') do ( + set NODE_PATH=%%F +) + mkdir .deps cd .deps cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error diff --git a/ci/install.sh b/ci/install.sh index c8a0c8825d..2fe4f88822 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -23,3 +23,8 @@ CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim + +if [[ "${TRAVIS_OS_NAME}" == linux ]]; then + echo "Install neovim npm package" + npm install -g neovim +fi diff --git a/ci/run_tests.sh b/ci/run_tests.sh index a0bf6e010d..ee3fa4a5af 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -23,6 +23,7 @@ if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests run_test run_unittests + export NODE_PATH="$(npm root -g)" run_test run_functionaltests fi run_test run_oldtests -- cgit From 5b692124cc94c8e5edc0c767e6a71887754643cd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 16 Dec 2017 16:29:33 -0500 Subject: test: remove inspect test; set NODE_PATH in nodejs_spec.lua provider#node#can_inspect will fail on some systems because it is common to have old node versions in OS (any Linux OS that has LTS releases) and CI (Travis, Appveyor). NODE_PATH can be trivially set with VimL. Build scripts don't have to set it for the nodejs tests to work. NODE_PATH is optional to begin with and is used only as a workaround for the neovim node.js host. --- ci/build.bat | 3 --- ci/run_tests.sh | 1 - 2 files changed, 4 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index c5353ec5d1..9909d102a4 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -39,9 +39,6 @@ where.exe neovim-ruby-host.bat || goto :error cmd /c npm.cmd install -g neovim || goto :error where.exe neovim-node-host.cmd || goto :error -for /f %%F in ('cmd /c npm root -g') do ( - set NODE_PATH=%%F -) mkdir .deps cd .deps diff --git a/ci/run_tests.sh b/ci/run_tests.sh index ee3fa4a5af..a0bf6e010d 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -23,7 +23,6 @@ if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests run_test run_unittests - export NODE_PATH="$(npm root -g)" run_test run_functionaltests fi run_test run_oldtests -- cgit 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') 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') 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/before_script.sh | 2 ++ ci/common/build.sh | 9 +++++++++ ci/install.sh | 4 ++++ 3 files changed, 15 insertions(+) (limited to 'ci') diff --git a/ci/before_script.sh b/ci/before_script.sh index 445996a8df..e8ecd8c990 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -25,6 +25,8 @@ 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}" + + macos_rvm_dance fi # Compile dependencies. 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 +} diff --git a/ci/install.sh b/ci/install.sh index 2fe4f88822..f28227d95c 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -22,6 +22,10 @@ echo "Install neovim module for Python 3." CC=cc pip3 -q install --user --upgrade neovim || true echo "Install neovim RubyGem." +if [ "${TRAVIS_OS_NAME}" = osx ] ; then + macos_rvm_dance + gem update --system +fi gem install --no-document --version ">= 0.2.0" neovim if [[ "${TRAVIS_OS_NAME}" == linux ]]; then -- cgit From 46a9600d0e17f460a940ac6ed605f01f5b12aaf2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 7 Jan 2018 20:09:03 +0100 Subject: ci/travis: macOS: skip ruby-neovim install With 6fa0a0a516f3 the neovim-ruby gem installs successfully, but ruby_spec.lua can't find it: g:ruby_host_prog needs to be set correctly. Just skip the whole thing for now, so that CI builds don't fail. --- ci/before_script.sh | 2 -- ci/install.sh | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'ci') diff --git a/ci/before_script.sh b/ci/before_script.sh index e8ecd8c990..445996a8df 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -25,8 +25,6 @@ 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}" - - macos_rvm_dance fi # Compile dependencies. diff --git a/ci/install.sh b/ci/install.sh index f28227d95c..f51ba1a776 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -21,12 +21,10 @@ echo "Install neovim module for Python 3." # https://github.com/travis-ci/travis-ci/issues/8363 CC=cc pip3 -q install --user --upgrade neovim || true -echo "Install neovim RubyGem." -if [ "${TRAVIS_OS_NAME}" = osx ] ; then - macos_rvm_dance - gem update --system +if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then + echo "Install neovim RubyGem." + gem install --no-document --version ">= 0.2.0" neovim fi -gem install --no-document --version ">= 0.2.0" neovim if [[ "${TRAVIS_OS_NAME}" == linux ]]; then echo "Install neovim npm package" -- cgit From 9370a0e5d859f692f6fa24c27c76410b54595be4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 7 Jan 2018 18:37:31 -0500 Subject: ci/travis: install neovim npm module on osx (#7825) Always get latest nvm on osx to fix lts aliases. --- ci/before_install.sh | 16 +++++++--------- ci/install.sh | 6 ++---- 2 files changed, 9 insertions(+), 13 deletions(-) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index f5a57ad657..9f512ee5b9 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -38,14 +38,12 @@ else pip3 -q install --user --upgrade pip || true fi -if [[ "${TRAVIS_OS_NAME}" == linux ]]; then - echo "Install node (LTS)" +echo "Install node (LTS)" - if [ ! -f ~/.nvm/nvm.sh ]; then - curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh - fi - - source ~/.nvm/nvm.sh - nvm install --lts - nvm use --lts +if [[ "${TRAVIS_OS_NAME}" == osx ]] || [ ! -f ~/.nvm/nvm.sh ]; then + curl -o ~/.nvm/nvm.sh https://raw.githubusercontent.com/creationix/nvm/master/nvm.sh fi + +source ~/.nvm/nvm.sh +nvm install --lts +nvm use --lts diff --git a/ci/install.sh b/ci/install.sh index f51ba1a776..eb7fb14760 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -26,7 +26,5 @@ if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then gem install --no-document --version ">= 0.2.0" neovim fi -if [[ "${TRAVIS_OS_NAME}" == linux ]]; then - echo "Install neovim npm package" - npm install -g neovim -fi +echo "Install neovim npm package" +npm install -g neovim -- 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 +++++--- ci/run_tests.sh | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'ci') 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 diff --git a/ci/run_tests.sh b/ci/run_tests.sh index a0bf6e010d..c175910da5 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -22,7 +22,9 @@ enter_suite tests if test "$CLANG_SANITIZER" != "TSAN" ; then # Additional threads are only created when the builtin UI starts, which # doesn't happen in the unit/functional tests - run_test run_unittests + if test "${FUNCTIONALTEST}" != "functionaltest-lua"; then + run_test run_unittests + fi run_test run_functionaltests fi run_test run_oldtests -- cgit From 6e2bb564e15f69f88f0bd73c7f6eaa9b1dc2eff3 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 6 Feb 2018 21:18:54 -0500 Subject: ci: Remove coveralls coverage reporting --- ci/after_success.sh | 1 - ci/install.sh | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'ci') diff --git a/ci/after_success.sh b/ci/after_success.sh index 388b6eb714..5d2a53d3d5 100755 --- a/ci/after_success.sh +++ b/ci/after_success.sh @@ -4,6 +4,5 @@ set -e set -o pipefail if [[ -n "${GCOV}" ]]; then - coveralls --gcov "$(which "${GCOV}")" --encoding iso-8859-1 || echo 'coveralls upload failed.' bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.' fi diff --git a/ci/install.sh b/ci/install.sh index eb7fb14760..60d9507bfb 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -13,8 +13,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then fi # Use default CC to avoid compilation problems when installing Python modules. -echo "Install neovim module and coveralls for Python 2." -CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls +echo "Install neovim module for Python 2." +CC=cc pip2.7 -q install --user --upgrade neovim echo "Install neovim module for Python 3." # Allow failure. pyenv pip3 on travis is broken: -- 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/after_success.sh | 8 -------- ci/build.bat | 6 +++++- ci/common/test.sh | 12 ++++++++++++ 3 files changed, 17 insertions(+), 9 deletions(-) delete mode 100755 ci/after_success.sh (limited to 'ci') diff --git a/ci/after_success.sh b/ci/after_success.sh deleted file mode 100755 index 5d2a53d3d5..0000000000 --- a/ci/after_success.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -if [[ -n "${GCOV}" ]]; then - bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.' -fi diff --git a/ci/build.bat b/ci/build.bat index 9909d102a4..5c7f14ad0a 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -56,6 +56,10 @@ bin\nvim --version || goto :error :: Functional tests mingw32-make functionaltest VERBOSE=1 || goto :error +if defined USE_GCOV ( + C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'" +) + :: Old tests setlocal set PATH=%PATH%;C:\msys64\usr\bin @@ -63,7 +67,7 @@ mingw32-make -C "%~dp0\..\src\nvim\testdir" VERBOSE=1 endlocal if defined USE_GCOV ( - C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) || echo 'codecov upload failed.'" + C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F oldtest || echo 'codecov upload failed.'" ) :: Build artifacts 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 90fc7c6ad0d502b859bb20094820b937cacdcb8e Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sun, 4 Mar 2018 01:11:09 +0100 Subject: ci: the homebrew formula for Python 3 was renamed (#8094) Homebrew changed a few formulae to meet their standards. "python3" was renamed to "python", and "python2" to "python@2". As for why, read this announcement: https://brew.sh/2018/01/19/homebrew-1.5.0 Since we install Python 3 via homebrew anyway, we now do the same for Python 2 as well. We do that because the system Python 2 of macOS comes without pip installed and this way seems cleaner than doing "sudo easy_install pip". The Python 2 formula is keg-only now, so it doesn't interfere with the system Python 2. Therefore we have to add its executables to $PATH ourselves. --- ci/before_install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index 9f512ee5b9..f696b85afc 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -23,12 +23,17 @@ echo 'python info:' 2>&1 pyenv versions || true ) | sed 's/^/ /' +if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + echo "Install Python 2." + brew install python@2 +fi + echo "Upgrade Python 2 pip." pip2.7 -q install --user --upgrade pip if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - echo "Install Python 3." - brew install python3 + echo "Upgrade Python 3." + brew upgrade python echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else -- cgit From cfb713b5c6a3cde25e12ffba87b488105d82c76a Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Sun, 4 Mar 2018 17:44:23 -0600 Subject: build/msvc: Add Appveyor CI for MSVC --- ci/build.bat | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 5c7f14ad0a..60bd152192 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -1,27 +1,33 @@ -:: These are native MinGW builds, but they use the toolchain inside -:: MSYS2, this allows using all the dependencies and tools available -:: in MSYS2, but we cannot build inside the MSYS2 shell. echo on if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=i686 set BITS=32 -) else ( +) else if "%CONFIGURATION%" == "MINGW_64" ( set ARCH=x86_64 set BITS=64 -) -if "%CONFIGURATION%" == "MINGW_64-gcov" ( +) else if "%CONFIGURATION%" == "MINGW_64-gcov" ( set USE_GCOV="-DUSE_GCOV=ON" +) else if "%CONFIGURATION%" == "MSVC_32" ( + set CMAKE_GENERATOR="Visual Studio 15 2017" +) else if "%CONFIGURATION%" == "MSVC_64" ( + set CMAKE_GENERATOR="Visual Studio 15 2017 Win64" ) -:: We cannot have sh.exe in the PATH (MinGW) -set PATH=%PATH:C:\Program Files\Git\usr\bin;=% -set PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH% -:: The default cpack in the PATH is not CMake -set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% - -:: Build third-party dependencies -C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error -C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error +if "%CONFIGURATION:~0,5%" == "MINGW" ( + :: These are native MinGW builds, but they use the toolchain inside + :: MSYS2, this allows using all the dependencies and tools available + :: in MSYS2, but we cannot build inside the MSYS2 shell. + set CMAKE_GENERATOR="MinGW Makefiles" + set CMAKE_GENERATOR_ARGS=VERBOSE=1 + :: Add MinGW to the PATH and remove the Git directory because it + :: has a conflicting sh.exe + set "PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH:C:\Program Files\Git\usr\bin;=%" + :: Build third-party dependencies + C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error + C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error +) else if "%CONFIGURATION:~0,4%" == "MSVC" ( + set CMAKE_GENERATOR_ARGS=/verbosity:detailed +) :: Setup python (use AppVeyor system python) C:\Python27\python.exe -m pip install neovim || goto :error @@ -42,19 +48,19 @@ where.exe neovim-node-host.cmd || goto :error mkdir .deps cd .deps -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error -mingw32-make VERBOSE=1 || goto :error +cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error +cmake --build . -- %CMAKE_GENERATOR_ARGS% || goto :error cd .. :: Build Neovim mkdir build cd build -cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error -mingw32-make VERBOSE=1 || goto :error +cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error +cmake --build . --config RelWithDebInfo -- %CMAKE_GENERATOR_ARGS% || goto :error bin\nvim --version || goto :error :: Functional tests -mingw32-make functionaltest VERBOSE=1 || goto :error +cmake --build . --config RelWithDebInfo --target functionaltest -- %CMAKE_GENERATOR_ARGS% || goto :error if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'" @@ -63,13 +69,15 @@ if defined USE_GCOV ( :: Old tests setlocal set PATH=%PATH%;C:\msys64\usr\bin -mingw32-make -C "%~dp0\..\src\nvim\testdir" VERBOSE=1 +cmake --build "%~dp0\..\src\nvim\testdir" -- %CMAKE_GENERATOR_ARGS% endlocal if defined USE_GCOV ( C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F oldtest || echo 'codecov upload failed.'" ) +:: The default cpack in the PATH is not CMake +set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% :: Build artifacts cpack -G ZIP -C RelWithDebInfo if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo -- cgit From 7612ba5ad9f358722638e78fec8f45cb82545dca Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Mon, 5 Mar 2018 11:00:01 -0600 Subject: build/msvc: Change MSBuild verbosity to normal --- ci/build.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 60bd152192..7bedc19195 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -26,7 +26,7 @@ if "%CONFIGURATION:~0,5%" == "MINGW" ( C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error ) else if "%CONFIGURATION:~0,4%" == "MSVC" ( - set CMAKE_GENERATOR_ARGS=/verbosity:detailed + set CMAKE_GENERATOR_ARGS=/verbosity:normal ) :: Setup python (use AppVeyor system python) -- cgit From 0adf950ccf9a0057c552a349d79a716ff7be6f8f Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Wed, 7 Mar 2018 11:07:07 -0600 Subject: build/msvc: Fix AppVeyor build script for 'MINGW_64-gcov' configuration --- ci/build.bat | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 7bedc19195..3fa185f646 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -2,11 +2,12 @@ echo on if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=i686 set BITS=32 -) else if "%CONFIGURATION%" == "MINGW_64" ( +) else if "%CONFIGURATION:~0,8%" == "MINGW_64" ( set ARCH=x86_64 set BITS=64 -) else if "%CONFIGURATION%" == "MINGW_64-gcov" ( - set USE_GCOV="-DUSE_GCOV=ON" + if "%CONFIGURATION%" == "MINGW_64-gcov" ( + set USE_GCOV="-DUSE_GCOV=ON" + ) ) else if "%CONFIGURATION%" == "MSVC_32" ( set CMAKE_GENERATOR="Visual Studio 15 2017" ) else if "%CONFIGURATION%" == "MSVC_64" ( -- cgit From d554a6c7f0e9ed84f2e16d4977740a1584d11198 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 8 Mar 2018 20:31:34 +0100 Subject: ci/AppVeyor: fix `set` whitespace quoting --- ci/build.bat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat index 3fa185f646..8bf310851e 100644 --- a/ci/build.bat +++ b/ci/build.bat @@ -6,19 +6,19 @@ if "%CONFIGURATION%" == "MINGW_32" ( set ARCH=x86_64 set BITS=64 if "%CONFIGURATION%" == "MINGW_64-gcov" ( - set USE_GCOV="-DUSE_GCOV=ON" + set "USE_GCOV=-DUSE_GCOV=ON" ) ) else if "%CONFIGURATION%" == "MSVC_32" ( - set CMAKE_GENERATOR="Visual Studio 15 2017" + set "CMAKE_GENERATOR=Visual Studio 15 2017" ) else if "%CONFIGURATION%" == "MSVC_64" ( - set CMAKE_GENERATOR="Visual Studio 15 2017 Win64" + set "CMAKE_GENERATOR=Visual Studio 15 2017 Win64" ) if "%CONFIGURATION:~0,5%" == "MINGW" ( :: These are native MinGW builds, but they use the toolchain inside :: MSYS2, this allows using all the dependencies and tools available :: in MSYS2, but we cannot build inside the MSYS2 shell. - set CMAKE_GENERATOR="MinGW Makefiles" + set "CMAKE_GENERATOR=MinGW Makefiles" set CMAKE_GENERATOR_ARGS=VERBOSE=1 :: Add MinGW to the PATH and remove the Git directory because it :: has a conflicting sh.exe @@ -49,14 +49,14 @@ where.exe neovim-node-host.cmd || goto :error mkdir .deps cd .deps -cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error +cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error cmake --build . -- %CMAKE_GENERATOR_ARGS% || goto :error cd .. :: Build Neovim mkdir build cd build -cmake -G %CMAKE_GENERATOR% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error +cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error cmake --build . --config RelWithDebInfo -- %CMAKE_GENERATOR_ARGS% || goto :error bin\nvim --version || goto :error @@ -78,7 +78,7 @@ if defined USE_GCOV ( ) :: The default cpack in the PATH is not CMake -set PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH% +set "PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%" :: Build artifacts cpack -G ZIP -C RelWithDebInfo if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo -- 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 ++++++--- ci/install.sh | 1 + ci/run_lint.sh | 8 ++++---- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'ci') 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() { diff --git a/ci/install.sh b/ci/install.sh index 60d9507bfb..9deaa601b4 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -8,6 +8,7 @@ if [[ "${CI_TARGET}" == lint ]]; then fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then + brew install ninja brew install gettext brew reinstall -s libtool fi diff --git a/ci/run_lint.sh b/ci/run_lint.sh index e7f6727448..ae9adb7c87 100755 --- a/ci/run_lint.sh +++ b/ci/run_lint.sh @@ -10,19 +10,19 @@ source "${CI_DIR}/common/suite.sh" enter_suite 'clint' -run_test 'top_make clint-full' clint +run_test 'make clint-full' clint exit_suite --continue enter_suite 'testlint' -run_test 'top_make testlint' testlint +run_test 'make testlint' testlint exit_suite --continue enter_suite 'lualint' -run_test 'top_make lualint' lualint +run_test 'make lualint' lualint exit_suite --continue @@ -31,7 +31,7 @@ enter_suite single-includes CLICOLOR_FORCE=1 run_test_wd \ --allow-hang \ 10s \ - 'top_make check-single-includes' \ + 'make check-single-includes' \ 'csi_clean' \ single-includes -- cgit From 45e81e03f880f9ad6f23e57eed00d5178f47fd2f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 10 Mar 2018 20:43:51 +0100 Subject: ci/macOS: skip python2 on travis macOS macOS travis builds recently started failing (travis caches were cleared recently, maybe related). python2 is reasonably covered by linux CI. Not going to waste time on it for macOS CI. ==> Installing python@2 ==> Downloading https://homebrew.bintray.com/bottles/python@2-2.7.14_3.el_capita ==> Pouring python@2-2.7.14_3.el_capitan.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink bin/2to3-2 Target /usr/local/bin/2to3-2 is a symlink belonging to python. You can unlink it: brew unlink python To force the link and overwrite all conflicting files: brew link --overwrite python@2 To list all files that would be deleted: brew link --overwrite --dry-run python@2 Possible conflicting files are: /usr/local/bin/2to3-2 -> /usr/local/Cellar/python/2.7.12_1/bin/2to3-2 /usr/local/bin/2to3-2.7 -> /usr/local/Cellar/python/2.7.12_1/bin/2to3-2.7 /usr/local/bin/idle -> /usr/local/Cellar/python/2.7.12_1/bin/idle ... --- ci/before_install.sh | 10 ++-------- ci/install.sh | 10 ++++++---- 2 files changed, 8 insertions(+), 12 deletions(-) (limited to 'ci') diff --git a/ci/before_install.sh b/ci/before_install.sh index f696b85afc..9a3e192536 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -23,20 +23,14 @@ echo 'python info:' 2>&1 pyenv versions || true ) | sed 's/^/ /' -if [[ "${TRAVIS_OS_NAME}" == osx ]]; then - echo "Install Python 2." - brew install python@2 -fi - -echo "Upgrade Python 2 pip." -pip2.7 -q install --user --upgrade pip - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then echo "Upgrade Python 3." brew upgrade python echo "Upgrade Python 3 pip." pip3 -q install --user --upgrade pip else + echo "Upgrade Python 2 pip." + pip2.7 -q install --user --upgrade pip echo "Upgrade Python 3 pip." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 diff --git a/ci/install.sh b/ci/install.sh index 9deaa601b4..053549d6db 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -13,16 +13,18 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew reinstall -s libtool fi -# Use default CC to avoid compilation problems when installing Python modules. -echo "Install neovim module for Python 2." -CC=cc pip2.7 -q install --user --upgrade neovim - echo "Install neovim module for Python 3." # Allow failure. pyenv pip3 on travis is broken: # https://github.com/travis-ci/travis-ci/issues/8363 CC=cc pip3 -q install --user --upgrade neovim || true if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then + # Update PATH for pip. + export PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH" + # Use default CC to avoid compilation problems when installing Python modules. + echo "Install neovim module for Python 2." + CC=cc pip2.7 -q install --user --upgrade neovim + echo "Install neovim RubyGem." gem install --no-document --version ">= 0.2.0" neovim fi -- 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') 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/before_cache.sh | 3 ++- ci/common/build.sh | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'ci') diff --git a/ci/before_cache.sh b/ci/before_cache.sh index 3d7cc0ec5a..2340f4db74 100755 --- a/ci/before_cache.sh +++ b/ci/before_cache.sh @@ -4,6 +4,7 @@ set -e set -o pipefail CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +source "${CI_DIR}/common/build.sh" source "${CI_DIR}/common/suite.sh" # Don't cache pip's log and selfcheck. @@ -15,5 +16,5 @@ if ended_successfully; then rm -rf "${HOME}/.cache/nvim-deps" mv "${DEPS_BUILD_DIR}" "${HOME}/.cache/nvim-deps" touch "${CACHE_MARKER}" - echo "Updated third-party dependencies (timestamp: $(stat -c '%y' "${CACHE_MARKER}"))." + echo "Updated third-party dependencies (timestamp: $(_stat "${CACHE_MARKER}"))." fi 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 e24e98534bbb915d484eca0056ff8b57a2eb2a1d Mon Sep 17 00:00:00 2001 From: b-r-o-c-k Date: Sun, 11 Mar 2018 17:44:07 -0500 Subject: ci/AppVeyor: use PowerShell (#8124) --- ci/build.bat | 88 ---------------------------------------------- ci/build.ps1 | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 88 deletions(-) delete mode 100644 ci/build.bat create mode 100644 ci/build.ps1 (limited to 'ci') diff --git a/ci/build.bat b/ci/build.bat deleted file mode 100644 index 8bf310851e..0000000000 --- a/ci/build.bat +++ /dev/null @@ -1,88 +0,0 @@ -echo on -if "%CONFIGURATION%" == "MINGW_32" ( - set ARCH=i686 - set BITS=32 -) else if "%CONFIGURATION:~0,8%" == "MINGW_64" ( - set ARCH=x86_64 - set BITS=64 - if "%CONFIGURATION%" == "MINGW_64-gcov" ( - set "USE_GCOV=-DUSE_GCOV=ON" - ) -) else if "%CONFIGURATION%" == "MSVC_32" ( - set "CMAKE_GENERATOR=Visual Studio 15 2017" -) else if "%CONFIGURATION%" == "MSVC_64" ( - set "CMAKE_GENERATOR=Visual Studio 15 2017 Win64" -) - -if "%CONFIGURATION:~0,5%" == "MINGW" ( - :: These are native MinGW builds, but they use the toolchain inside - :: MSYS2, this allows using all the dependencies and tools available - :: in MSYS2, but we cannot build inside the MSYS2 shell. - set "CMAKE_GENERATOR=MinGW Makefiles" - set CMAKE_GENERATOR_ARGS=VERBOSE=1 - :: Add MinGW to the PATH and remove the Git directory because it - :: has a conflicting sh.exe - set "PATH=C:\msys64\mingw%BITS%\bin;C:\Windows\System32;C:\Windows;%PATH:C:\Program Files\Git\usr\bin;=%" - :: Build third-party dependencies - C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" || goto :error - C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-perl mingw-w64-%ARCH%-diffutils mingw-w64-%ARCH%-unibilium gperf" || goto :error -) else if "%CONFIGURATION:~0,4%" == "MSVC" ( - set CMAKE_GENERATOR_ARGS=/verbosity:normal -) - -:: Setup python (use AppVeyor system python) -C:\Python27\python.exe -m pip install neovim || goto :error -C:\Python35\python.exe -m pip install neovim || goto :error -:: Disambiguate python3 -move c:\Python35\python.exe c:\Python35\python3.exe -set PATH=C:\Python35;C:\Python27;%PATH% -:: Sanity check -python -c "import neovim; print(str(neovim))" || goto :error -python3 -c "import neovim; print(str(neovim))" || goto :error - -set PATH=C:\Ruby24\bin;%PATH% -cmd /c gem.cmd install neovim || goto :error -where.exe neovim-ruby-host.bat || goto :error - -cmd /c npm.cmd install -g neovim || goto :error -where.exe neovim-node-host.cmd || goto :error - -mkdir .deps -cd .deps -cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\third-party\ || goto :error -cmake --build . -- %CMAKE_GENERATOR_ARGS% || goto :error -cd .. - -:: Build Neovim -mkdir build -cd build -cmake -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUSTED_OUTPUT_TYPE=nvim %USE_GCOV% -DGPERF_PRG="C:\msys64\usr\bin\gperf.exe" .. || goto :error -cmake --build . --config RelWithDebInfo -- %CMAKE_GENERATOR_ARGS% || goto :error -bin\nvim --version || goto :error - -:: Functional tests -cmake --build . --config RelWithDebInfo --target functionaltest -- %CMAKE_GENERATOR_ARGS% || goto :error - -if defined USE_GCOV ( - C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'" -) - -:: Old tests -setlocal -set PATH=%PATH%;C:\msys64\usr\bin -cmake --build "%~dp0\..\src\nvim\testdir" -- %CMAKE_GENERATOR_ARGS% -endlocal - -if defined USE_GCOV ( - C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F oldtest || echo 'codecov upload failed.'" -) - -:: The default cpack in the PATH is not CMake -set "PATH=C:\Program Files (x86)\CMake\bin\cpack.exe;%PATH%" -:: Build artifacts -cpack -G ZIP -C RelWithDebInfo -if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo - -goto :EOF -:error -exit /b %errorlevel% diff --git a/ci/build.ps1 b/ci/build.ps1 new file mode 100644 index 0000000000..7075775bcd --- /dev/null +++ b/ci/build.ps1 @@ -0,0 +1,112 @@ +Set-PSDebug -Trace 1 + +$env:CONFIGURATION -match '^(?\w+)_(?32|64)(?:-(?