mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #8117 'build/CI/MSVC/LuaRocks'
This commit is contained in:
commit
241c380da9
16
.travis.yml
16
.travis.yml
@ -4,13 +4,8 @@ language: c
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# To force rebuilding of third-party dependencies, set this to 'true'.
|
# Set "false" to force rebuild of third-party dependencies.
|
||||||
- BUILD_NVIM_DEPS=false
|
- CACHE_ENABLE=true
|
||||||
# Travis has 1.5 virtual cores according to
|
|
||||||
# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM
|
|
||||||
- MAKE_CMD="make -j2"
|
|
||||||
# Update PATH for pip.
|
|
||||||
- PATH="$(python2.7 -c 'import site; print(site.getuserbase())')/bin:$PATH"
|
|
||||||
# Build directory for Neovim.
|
# Build directory for Neovim.
|
||||||
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
- BUILD_DIR="$TRAVIS_BUILD_DIR/build"
|
||||||
# Build directory for third-party dependencies.
|
# Build directory for third-party dependencies.
|
||||||
@ -41,9 +36,7 @@ env:
|
|||||||
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
- UBSAN_OPTIONS="print_stacktrace=1 log_path=$LOG_DIR/ubsan"
|
||||||
# Environment variables for Valgrind.
|
# Environment variables for Valgrind.
|
||||||
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
- VALGRIND_LOG="$LOG_DIR/valgrind-%p.log"
|
||||||
# Cache marker for third-party dependencies cache.
|
# If this file exists, the cache is valid (compile was successful).
|
||||||
# If this file exists, we know that the cache contains compiled
|
|
||||||
# dependencies and we can use it.
|
|
||||||
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
- CACHE_MARKER="$HOME/.cache/nvim-deps/.travis_cache_marker"
|
||||||
# default target name for functional tests
|
# default target name for functional tests
|
||||||
- FUNCTIONALTEST=functionaltest
|
- FUNCTIONALTEST=functionaltest
|
||||||
@ -72,11 +65,9 @@ jobs:
|
|||||||
- os: osx
|
- os: osx
|
||||||
compiler: clang
|
compiler: clang
|
||||||
osx_image: xcode7.3 # macOS 10.11
|
osx_image: xcode7.3 # macOS 10.11
|
||||||
env: PATH="/usr/local/opt/python@2/bin:$PATH"
|
|
||||||
- os: osx
|
- os: osx
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
osx_image: xcode7.3 # macOS 10.11
|
osx_image: xcode7.3 # macOS 10.11
|
||||||
env: PATH="/usr/local/opt/python@2/bin:$PATH"
|
|
||||||
- os: linux
|
- os: linux
|
||||||
env: CI_TARGET=lint
|
env: CI_TARGET=lint
|
||||||
- stage: Flaky builds
|
- stage: Flaky builds
|
||||||
@ -115,6 +106,7 @@ addons:
|
|||||||
- libc6-dev-i386
|
- libc6-dev-i386
|
||||||
- libtool
|
- libtool
|
||||||
- locales
|
- locales
|
||||||
|
- ninja-build
|
||||||
- pkg-config
|
- pkg-config
|
||||||
- unzip
|
- unzip
|
||||||
- valgrind
|
- valgrind
|
||||||
|
@ -12,7 +12,11 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
|||||||
include(PreventInTreeBuilds)
|
include(PreventInTreeBuilds)
|
||||||
|
|
||||||
# Prefer our bundled versions of dependencies.
|
# Prefer our bundled versions of dependencies.
|
||||||
|
if(DEFINED ENV{DEPS_BUILD_DIR})
|
||||||
|
set(DEPS_PREFIX "$ENV{DEPS_BUILD_DIR}/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||||
|
else()
|
||||||
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
set(DEPS_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/.deps/usr" CACHE PATH "Path prefix for finding dependencies")
|
||||||
|
endif()
|
||||||
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
if(CMAKE_CROSSCOMPILING AND NOT UNIX)
|
||||||
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
|
list(INSERT CMAKE_FIND_ROOT_PATH 0 ${DEPS_PREFIX})
|
||||||
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
|
list(INSERT CMAKE_PREFIX_PATH 0 ${DEPS_PREFIX}/../host/bin)
|
||||||
|
22
Makefile
22
Makefile
@ -1,3 +1,4 @@
|
|||||||
|
THIS_DIR = $(shell pwd)
|
||||||
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
|
filter-false = $(strip $(filter-out 0 off OFF false FALSE,$1))
|
||||||
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
filter-true = $(strip $(filter-out 1 on ON true TRUE,$1))
|
||||||
|
|
||||||
@ -8,11 +9,14 @@ CMAKE_PRG ?= $(shell (command -v cmake3 || echo cmake))
|
|||||||
CMAKE_BUILD_TYPE ?= Debug
|
CMAKE_BUILD_TYPE ?= Debug
|
||||||
|
|
||||||
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
CMAKE_FLAGS := -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)
|
||||||
DOC_DOWNLOAD_URL_BASE := https://raw.githubusercontent.com/neovim/doc/gh-pages
|
|
||||||
CLINT_ERRORS_FILE_PATH := /reports/clint/errors.json
|
|
||||||
|
|
||||||
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
|
BUILD_TYPE ?= $(shell (type ninja > /dev/null 2>&1 && echo "Ninja") || \
|
||||||
echo "Unix Makefiles")
|
echo "Unix Makefiles")
|
||||||
|
DEPS_BUILD_DIR ?= .deps
|
||||||
|
|
||||||
|
ifneq (1,$(words [$(DEPS_BUILD_DIR)]))
|
||||||
|
$(error DEPS_BUILD_DIR must not contain whitespace)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq (,$(BUILD_TOOL))
|
ifeq (,$(BUILD_TOOL))
|
||||||
ifeq (Ninja,$(BUILD_TYPE))
|
ifeq (Ninja,$(BUILD_TYPE))
|
||||||
@ -48,7 +52,7 @@ endif
|
|||||||
|
|
||||||
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
ifneq (,$(findstring functionaltest-lua,$(MAKECMDGOALS)))
|
||||||
BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON
|
BUNDLED_LUA_CMAKE_FLAG := -DUSE_BUNDLED_LUA=ON
|
||||||
$(shell [ -x .deps/usr/bin/lua ] || rm build/.ran-*)
|
$(shell [ -x $(DEPS_BUILD_DIR)/usr/bin/lua ] || rm build/.ran-*)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# For use where we want to make sure only a single job is run. This does issue
|
# For use where we want to make sure only a single job is run. This does issue
|
||||||
@ -68,20 +72,20 @@ cmake:
|
|||||||
$(MAKE) build/.ran-cmake
|
$(MAKE) build/.ran-cmake
|
||||||
|
|
||||||
build/.ran-cmake: | deps
|
build/.ran-cmake: | deps
|
||||||
cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) ..
|
cd build && $(CMAKE_PRG) -G '$(BUILD_TYPE)' $(CMAKE_FLAGS) $(CMAKE_EXTRA_FLAGS) $(THIS_DIR)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
deps: | build/.ran-third-party-cmake
|
deps: | build/.ran-third-party-cmake
|
||||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||||
+$(BUILD_CMD) -C .deps
|
+$(BUILD_CMD) -C $(DEPS_BUILD_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
build/.ran-third-party-cmake:
|
build/.ran-third-party-cmake:
|
||||||
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
ifeq ($(call filter-true,$(USE_BUNDLED_DEPS)),)
|
||||||
mkdir -p .deps
|
mkdir -p $(DEPS_BUILD_DIR)
|
||||||
cd .deps && \
|
cd $(DEPS_BUILD_DIR) && \
|
||||||
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
$(CMAKE_PRG) -G '$(BUILD_TYPE)' $(BUNDLED_CMAKE_FLAG) $(BUNDLED_LUA_CMAKE_FLAG) \
|
||||||
$(DEPS_CMAKE_FLAGS) ../third-party
|
$(DEPS_CMAKE_FLAGS) $(THIS_DIR)/third-party
|
||||||
endif
|
endif
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
touch $@
|
touch $@
|
||||||
@ -124,7 +128,7 @@ clean:
|
|||||||
$(MAKE) -C runtime/doc clean
|
$(MAKE) -C runtime/doc clean
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf .deps build
|
rm -rf $(DEPS_BUILD_DIR) build
|
||||||
|
|
||||||
install: | nvim
|
install: | nvim
|
||||||
+$(BUILD_CMD) -C build install
|
+$(BUILD_CMD) -C build install
|
||||||
|
@ -3,15 +3,14 @@ environment:
|
|||||||
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"
|
||||||
image: Visual Studio 2017
|
image: Visual Studio 2017
|
||||||
configuration:
|
configuration:
|
||||||
- MSVC_64
|
|
||||||
- MSVC_32
|
|
||||||
- MINGW_64
|
- MINGW_64
|
||||||
- MINGW_32
|
- MINGW_32
|
||||||
|
- MSVC_64
|
||||||
|
# - MSVC_32
|
||||||
- MINGW_64-gcov
|
- MINGW_64-gcov
|
||||||
matrix:
|
matrix:
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- configuration: MSVC_64
|
- configuration: MSVC_64
|
||||||
- configuration: MSVC_32
|
|
||||||
- configuration: MINGW_64-gcov
|
- configuration: MINGW_64-gcov
|
||||||
install: []
|
install: []
|
||||||
before_build:
|
before_build:
|
||||||
|
@ -23,20 +23,14 @@ echo 'python info:'
|
|||||||
2>&1 pyenv versions || true
|
2>&1 pyenv versions || true
|
||||||
) | sed 's/^/ /'
|
) | 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
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
echo "Upgrade Python 3."
|
echo "Upgrade Python 3."
|
||||||
brew upgrade python
|
brew upgrade python
|
||||||
echo "Upgrade Python 3 pip."
|
echo "Upgrade Python 3 pip."
|
||||||
pip3 -q install --user --upgrade pip
|
pip3 -q install --user --upgrade pip
|
||||||
else
|
else
|
||||||
|
echo "Upgrade Python 2 pip."
|
||||||
|
pip2.7 -q install --user --upgrade pip
|
||||||
echo "Upgrade Python 3 pip."
|
echo "Upgrade Python 3 pip."
|
||||||
# Allow failure. pyenv pip3 on travis is broken:
|
# Allow failure. pyenv pip3 on travis is broken:
|
||||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||||
|
14
ci/build.bat
14
ci/build.bat
@ -6,19 +6,19 @@ if "%CONFIGURATION%" == "MINGW_32" (
|
|||||||
set ARCH=x86_64
|
set ARCH=x86_64
|
||||||
set BITS=64
|
set BITS=64
|
||||||
if "%CONFIGURATION%" == "MINGW_64-gcov" (
|
if "%CONFIGURATION%" == "MINGW_64-gcov" (
|
||||||
set USE_GCOV="-DUSE_GCOV=ON"
|
set "USE_GCOV=-DUSE_GCOV=ON"
|
||||||
)
|
)
|
||||||
) else if "%CONFIGURATION%" == "MSVC_32" (
|
) else if "%CONFIGURATION%" == "MSVC_32" (
|
||||||
set CMAKE_GENERATOR="Visual Studio 15 2017"
|
set "CMAKE_GENERATOR=Visual Studio 15 2017"
|
||||||
) else if "%CONFIGURATION%" == "MSVC_64" (
|
) 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" (
|
if "%CONFIGURATION:~0,5%" == "MINGW" (
|
||||||
:: These are native MinGW builds, but they use the toolchain inside
|
:: These are native MinGW builds, but they use the toolchain inside
|
||||||
:: MSYS2, this allows using all the dependencies and tools available
|
:: MSYS2, this allows using all the dependencies and tools available
|
||||||
:: in MSYS2, but we cannot build inside the MSYS2 shell.
|
:: 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
|
set CMAKE_GENERATOR_ARGS=VERBOSE=1
|
||||||
:: Add MinGW to the PATH and remove the Git directory because it
|
:: Add MinGW to the PATH and remove the Git directory because it
|
||||||
:: has a conflicting sh.exe
|
:: has a conflicting sh.exe
|
||||||
@ -49,14 +49,14 @@ where.exe neovim-node-host.cmd || goto :error
|
|||||||
|
|
||||||
mkdir .deps
|
mkdir .deps
|
||||||
cd .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
|
cmake --build . -- %CMAKE_GENERATOR_ARGS% || goto :error
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
:: Build Neovim
|
:: Build Neovim
|
||||||
mkdir build
|
mkdir build
|
||||||
cd 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
|
cmake --build . --config RelWithDebInfo -- %CMAKE_GENERATOR_ARGS% || goto :error
|
||||||
bin\nvim --version || goto :error
|
bin\nvim --version || goto :error
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ if defined USE_GCOV (
|
|||||||
)
|
)
|
||||||
|
|
||||||
:: The default cpack in the PATH is not CMake
|
:: 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
|
:: Build artifacts
|
||||||
cpack -G ZIP -C RelWithDebInfo
|
cpack -G ZIP -C RelWithDebInfo
|
||||||
if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo
|
if defined APPVEYOR_REPO_TAG_NAME cpack -G NSIS -C RelWithDebInfo
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
top_make() {
|
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() {
|
build_make() {
|
||||||
@ -17,14 +20,13 @@ build_deps() {
|
|||||||
|
|
||||||
rm -rf "${DEPS_BUILD_DIR}"
|
rm -rf "${DEPS_BUILD_DIR}"
|
||||||
|
|
||||||
# If there is a valid cache and we're not forced to recompile,
|
# Use cached dependencies if $CACHE_MARKER exists.
|
||||||
# use cached third-party dependencies.
|
if test -f "${CACHE_MARKER}" && ! test "${CACHE_ENABLE}" = "false" ; then
|
||||||
if test -f "${CACHE_MARKER}" && test "${BUILD_NVIM_DEPS}" != "true" ; then
|
|
||||||
local statcmd="stat -c '%y'"
|
local statcmd="stat -c '%y'"
|
||||||
if test "${TRAVIS_OS_NAME}" = osx ; then
|
if test "${TRAVIS_OS_NAME}" = osx ; then
|
||||||
statcmd="stat -f '%Sm'"
|
statcmd="stat -f '%Sm'"
|
||||||
fi
|
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}")"
|
mkdir -p "$(dirname "${DEPS_BUILD_DIR}")"
|
||||||
mv "${HOME}/.cache/nvim-deps" "${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.
|
# update CMake configuration and update to newer deps versions.
|
||||||
cd "${DEPS_BUILD_DIR}"
|
cd "${DEPS_BUILD_DIR}"
|
||||||
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
|
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
|
if ! top_make; then
|
||||||
exit 1
|
exit 1
|
||||||
@ -56,7 +58,7 @@ prepare_build() {
|
|||||||
mkdir -p "${BUILD_DIR}"
|
mkdir -p "${BUILD_DIR}"
|
||||||
cd "${BUILD_DIR}"
|
cd "${BUILD_DIR}"
|
||||||
echo "Configuring with '${CMAKE_FLAGS} $@'."
|
echo "Configuring with '${CMAKE_FLAGS} $@'."
|
||||||
cmake ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
|
cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_nvim() {
|
build_nvim() {
|
||||||
|
@ -8,20 +8,23 @@ if [[ "${CI_TARGET}" == lint ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
|
||||||
|
brew install ninja
|
||||||
brew install gettext
|
brew install gettext
|
||||||
brew reinstall -s libtool
|
brew reinstall -s libtool
|
||||||
fi
|
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."
|
echo "Install neovim module for Python 3."
|
||||||
# Allow failure. pyenv pip3 on travis is broken:
|
# Allow failure. pyenv pip3 on travis is broken:
|
||||||
# https://github.com/travis-ci/travis-ci/issues/8363
|
# https://github.com/travis-ci/travis-ci/issues/8363
|
||||||
CC=cc pip3 -q install --user --upgrade neovim || true
|
CC=cc pip3 -q install --user --upgrade neovim || true
|
||||||
|
|
||||||
if ! [ "${TRAVIS_OS_NAME}" = osx ] ; then
|
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."
|
echo "Install neovim RubyGem."
|
||||||
gem install --no-document --version ">= 0.2.0" neovim
|
gem install --no-document --version ">= 0.2.0" neovim
|
||||||
fi
|
fi
|
||||||
|
@ -10,19 +10,19 @@ source "${CI_DIR}/common/suite.sh"
|
|||||||
|
|
||||||
enter_suite 'clint'
|
enter_suite 'clint'
|
||||||
|
|
||||||
run_test 'top_make clint-full' clint
|
run_test 'make clint-full' clint
|
||||||
|
|
||||||
exit_suite --continue
|
exit_suite --continue
|
||||||
|
|
||||||
enter_suite 'testlint'
|
enter_suite 'testlint'
|
||||||
|
|
||||||
run_test 'top_make testlint' testlint
|
run_test 'make testlint' testlint
|
||||||
|
|
||||||
exit_suite --continue
|
exit_suite --continue
|
||||||
|
|
||||||
enter_suite 'lualint'
|
enter_suite 'lualint'
|
||||||
|
|
||||||
run_test 'top_make lualint' lualint
|
run_test 'make lualint' lualint
|
||||||
|
|
||||||
exit_suite --continue
|
exit_suite --continue
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ enter_suite single-includes
|
|||||||
CLICOLOR_FORCE=1 run_test_wd \
|
CLICOLOR_FORCE=1 run_test_wd \
|
||||||
--allow-hang \
|
--allow-hang \
|
||||||
10s \
|
10s \
|
||||||
'top_make check-single-includes' \
|
'make check-single-includes' \
|
||||||
'csi_clean' \
|
'csi_clean' \
|
||||||
single-includes
|
single-includes
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local eq, clear, eval, command, nvim, next_message =
|
local eq, clear, eval, command, nvim, next_msg =
|
||||||
helpers.eq, helpers.clear, helpers.eval, helpers.command, helpers.nvim,
|
helpers.eq, helpers.clear, helpers.eval, helpers.command, helpers.nvim,
|
||||||
helpers.next_message
|
helpers.next_msg
|
||||||
local meths = helpers.meths
|
local meths = helpers.meths
|
||||||
|
|
||||||
describe('notify', function()
|
describe('notify', function()
|
||||||
@ -15,10 +15,10 @@ describe('notify', function()
|
|||||||
describe('passing a valid channel id', function()
|
describe('passing a valid channel id', function()
|
||||||
it('sends the notification/args to the corresponding channel', function()
|
it('sends the notification/args to the corresponding channel', function()
|
||||||
eval('rpcnotify('..channel..', "test-event", 1, 2, 3)')
|
eval('rpcnotify('..channel..', "test-event", 1, 2, 3)')
|
||||||
eq({'notification', 'test-event', {1, 2, 3}}, next_message())
|
eq({'notification', 'test-event', {1, 2, 3}}, next_msg())
|
||||||
command('au FileType lua call rpcnotify('..channel..', "lua!")')
|
command('au FileType lua call rpcnotify('..channel..', "lua!")')
|
||||||
command('set filetype=lua')
|
command('set filetype=lua')
|
||||||
eq({'notification', 'lua!', {}}, next_message())
|
eq({'notification', 'lua!', {}}, next_msg())
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -28,13 +28,13 @@ describe('notify', function()
|
|||||||
eval('rpcnotify(0, "event1", 1, 2, 3)')
|
eval('rpcnotify(0, "event1", 1, 2, 3)')
|
||||||
eval('rpcnotify(0, "event2", 4, 5, 6)')
|
eval('rpcnotify(0, "event2", 4, 5, 6)')
|
||||||
eval('rpcnotify(0, "event2", 7, 8, 9)')
|
eval('rpcnotify(0, "event2", 7, 8, 9)')
|
||||||
eq({'notification', 'event2', {4, 5, 6}}, next_message())
|
eq({'notification', 'event2', {4, 5, 6}}, next_msg())
|
||||||
eq({'notification', 'event2', {7, 8, 9}}, next_message())
|
eq({'notification', 'event2', {7, 8, 9}}, next_msg())
|
||||||
nvim('unsubscribe', 'event2')
|
nvim('unsubscribe', 'event2')
|
||||||
nvim('subscribe', 'event1')
|
nvim('subscribe', 'event1')
|
||||||
eval('rpcnotify(0, "event2", 10, 11, 12)')
|
eval('rpcnotify(0, "event2", 10, 11, 12)')
|
||||||
eval('rpcnotify(0, "event1", 13, 14, 15)')
|
eval('rpcnotify(0, "event1", 13, 14, 15)')
|
||||||
eq({'notification', 'event1', {13, 14, 15}}, next_message())
|
eq({'notification', 'event1', {13, 14, 15}}, next_msg())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('does not crash for deeply nested variable', function()
|
it('does not crash for deeply nested variable', function()
|
||||||
@ -42,7 +42,7 @@ describe('notify', function()
|
|||||||
local nest_level = 1000
|
local nest_level = 1000
|
||||||
meths.command(('call map(range(%u), "extend(g:, {\'l\': [g:l]})")'):format(nest_level - 1))
|
meths.command(('call map(range(%u), "extend(g:, {\'l\': [g:l]})")'):format(nest_level - 1))
|
||||||
eval('rpcnotify('..channel..', "event", g:l)')
|
eval('rpcnotify('..channel..', "event", g:l)')
|
||||||
local msg = next_message()
|
local msg = next_msg()
|
||||||
eq('notification', msg[1])
|
eq('notification', msg[1])
|
||||||
eq('event', msg[2])
|
eq('event', msg[2])
|
||||||
local act_ret = msg[3]
|
local act_ret = msg[3]
|
||||||
|
@ -6,7 +6,7 @@ local Paths = require('test.config.paths')
|
|||||||
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
|
local clear, nvim, eval = helpers.clear, helpers.nvim, helpers.eval
|
||||||
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
|
local eq, neq, run, stop = helpers.eq, helpers.neq, helpers.run, helpers.stop
|
||||||
local nvim_prog, command, funcs = helpers.nvim_prog, helpers.command, helpers.funcs
|
local nvim_prog, command, funcs = helpers.nvim_prog, helpers.command, helpers.funcs
|
||||||
local source, next_message = helpers.source, helpers.next_message
|
local source, next_msg = helpers.source, helpers.next_msg
|
||||||
local ok = helpers.ok
|
local ok = helpers.ok
|
||||||
local meths = helpers.meths
|
local meths = helpers.meths
|
||||||
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
|
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
|
||||||
@ -258,12 +258,12 @@ describe('server -> client', function()
|
|||||||
it('rpc and text stderr can be combined', function()
|
it('rpc and text stderr can be combined', function()
|
||||||
eq("ok",funcs.rpcrequest(jobid, "poll"))
|
eq("ok",funcs.rpcrequest(jobid, "poll"))
|
||||||
funcs.rpcnotify(jobid, "ping")
|
funcs.rpcnotify(jobid, "ping")
|
||||||
eq({'notification', 'pong', {}}, next_message())
|
eq({'notification', 'pong', {}}, next_msg())
|
||||||
eq("done!",funcs.rpcrequest(jobid, "write_stderr", "fluff\n"))
|
eq("done!",funcs.rpcrequest(jobid, "write_stderr", "fluff\n"))
|
||||||
eq({'notification', 'stderr', {0, {'fluff', ''}}}, next_message())
|
eq({'notification', 'stderr', {0, {'fluff', ''}}}, next_msg())
|
||||||
funcs.rpcrequest(jobid, "exit")
|
funcs.rpcrequest(jobid, "exit")
|
||||||
eq({'notification', 'stderr', {0, {''}}}, next_message())
|
eq({'notification', 'stderr', {0, {''}}}, next_msg())
|
||||||
eq({'notification', 'exit', {0, 0}}, next_message())
|
eq({'notification', 'exit', {0, 0}}, next_msg())
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ local clear = helpers.clear
|
|||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local eq = helpers.eq
|
local eq = helpers.eq
|
||||||
local expect = helpers.expect
|
local expect = helpers.expect
|
||||||
local next_msg = helpers.next_message
|
local next_msg = helpers.next_msg
|
||||||
local feed = helpers.feed
|
local feed = helpers.feed
|
||||||
local meths = helpers.meths
|
local meths = helpers.meths
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
|
local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq,
|
||||||
helpers.eval, helpers.next_message, helpers.ok, helpers.source
|
helpers.eval, helpers.next_msg, helpers.ok, helpers.source
|
||||||
local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths
|
local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths
|
||||||
local sleep = helpers.sleep
|
local sleep = helpers.sleep
|
||||||
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
|
local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv
|
||||||
|
@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
|
|||||||
local clear, eq, eval, exc_exec, feed_command, feed, insert, neq, next_msg, nvim,
|
local clear, eq, eval, exc_exec, feed_command, feed, insert, neq, next_msg, nvim,
|
||||||
nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear,
|
nvim_dir, ok, source, write_file, mkdir, rmdir = helpers.clear,
|
||||||
helpers.eq, helpers.eval, helpers.exc_exec, helpers.feed_command, helpers.feed,
|
helpers.eq, helpers.eval, helpers.exc_exec, helpers.feed_command, helpers.feed,
|
||||||
helpers.insert, helpers.neq, helpers.next_message, helpers.nvim,
|
helpers.insert, helpers.neq, helpers.next_msg, helpers.nvim,
|
||||||
helpers.nvim_dir, helpers.ok, helpers.source,
|
helpers.nvim_dir, helpers.ok, helpers.source,
|
||||||
helpers.write_file, helpers.mkdir, helpers.rmdir
|
helpers.write_file, helpers.mkdir, helpers.rmdir
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
@ -292,8 +292,16 @@ describe('jobs', function()
|
|||||||
nvim('command', 'let g:job_opts.user = {"n": 5, "s": "str", "l": [1]}')
|
nvim('command', 'let g:job_opts.user = {"n": 5, "s": "str", "l": [1]}')
|
||||||
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
|
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
|
||||||
local data = {n = 5, s = 'str', l = {1}}
|
local data = {n = 5, s = 'str', l = {1}}
|
||||||
eq({'notification', 'stdout', {data, {'foo', ''}}}, next_msg())
|
expect_msg_seq(
|
||||||
eq({'notification', 'stdout', {data, {''}}}, next_msg())
|
{ {'notification', 'stdout', {data, {'foo', ''}}},
|
||||||
|
{'notification', 'stdout', {data, {''}}},
|
||||||
|
},
|
||||||
|
-- Alternative sequence:
|
||||||
|
{ {'notification', 'stdout', {data, {'foo'}}},
|
||||||
|
{'notification', 'stdout', {data, {'', ''}}},
|
||||||
|
{'notification', 'stdout', {data, {''}}},
|
||||||
|
}
|
||||||
|
)
|
||||||
eq({'notification', 'exit', {data, 0}}, next_msg())
|
eq({'notification', 'exit', {data, 0}}, next_msg())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -310,11 +318,12 @@ describe('jobs', function()
|
|||||||
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
|
nvim('command', [[call jobstart('echo "foo"', g:job_opts)]])
|
||||||
expect_msg_seq(
|
expect_msg_seq(
|
||||||
{ {'notification', 'stdout', {5, {'foo', ''} } },
|
{ {'notification', 'stdout', {5, {'foo', ''} } },
|
||||||
{'notification', 'stdout', {5, {''} } }
|
{'notification', 'stdout', {5, {''} } },
|
||||||
},
|
},
|
||||||
-- Alternative sequence:
|
-- Alternative sequence:
|
||||||
{ {'notification', 'stdout', {5, {'foo'} } },
|
{ {'notification', 'stdout', {5, {'foo'} } },
|
||||||
{'notification', 'stdout', {5, {'', ''} } }
|
{'notification', 'stdout', {5, {'', ''} } },
|
||||||
|
{'notification', 'stdout', {5, {''} } },
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
@ -417,7 +426,14 @@ describe('jobs', function()
|
|||||||
let g:job_opts = {'on_stdout': Callback}
|
let g:job_opts = {'on_stdout': Callback}
|
||||||
call jobstart('echo "some text"', g:job_opts)
|
call jobstart('echo "some text"', g:job_opts)
|
||||||
]])
|
]])
|
||||||
eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
|
expect_msg_seq(
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
|
||||||
|
},
|
||||||
|
-- Alternative sequence:
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
|
||||||
|
{'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
|
||||||
|
}
|
||||||
|
)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('jobstart() works with closures', function()
|
it('jobstart() works with closures', function()
|
||||||
@ -430,7 +446,14 @@ describe('jobs', function()
|
|||||||
let g:job_opts = {'on_stdout': MkFun()}
|
let g:job_opts = {'on_stdout': MkFun()}
|
||||||
call jobstart('echo "some text"', g:job_opts)
|
call jobstart('echo "some text"', g:job_opts)
|
||||||
]])
|
]])
|
||||||
eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
|
expect_msg_seq(
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
|
||||||
|
},
|
||||||
|
-- Alternative sequence:
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
|
||||||
|
{'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
|
||||||
|
}
|
||||||
|
)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('jobstart() works when closure passed directly to `jobstart`', function()
|
it('jobstart() works when closure passed directly to `jobstart`', function()
|
||||||
@ -438,7 +461,14 @@ describe('jobs', function()
|
|||||||
let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', Normalize(data), event)}}
|
let g:job_opts = {'on_stdout': {id, data, event -> rpcnotify(g:channel, '1', 'foo', 'bar', Normalize(data), event)}}
|
||||||
call jobstart('echo "some text"', g:job_opts)
|
call jobstart('echo "some text"', g:job_opts)
|
||||||
]])
|
]])
|
||||||
eq({'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}}, next_msg())
|
expect_msg_seq(
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text', ''}, 'stdout'}},
|
||||||
|
},
|
||||||
|
-- Alternative sequence:
|
||||||
|
{ {'notification', '1', {'foo', 'bar', {'some text'}, 'stdout'}},
|
||||||
|
{'notification', '1', {'foo', 'bar', {'', ''}, 'stdout'}},
|
||||||
|
}
|
||||||
|
)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('jobwait', function()
|
describe('jobwait', function()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source
|
local clear, nvim, source = helpers.clear, helpers.nvim, helpers.source
|
||||||
local eq, next_msg = helpers.eq, helpers.next_message
|
local eq, next_msg = helpers.eq, helpers.next_msg
|
||||||
local exc_exec = helpers.exc_exec
|
local exc_exec = helpers.exc_exec
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local eval = helpers.eval
|
local eval = helpers.eval
|
||||||
|
@ -97,14 +97,14 @@ local function request(method, ...)
|
|||||||
return rv
|
return rv
|
||||||
end
|
end
|
||||||
|
|
||||||
local function next_message(timeout)
|
local function next_msg(timeout)
|
||||||
return session:next_message(timeout)
|
return session:next_message(timeout and timeout or 10000)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function expect_twostreams(msgs1, msgs2)
|
local function expect_twostreams(msgs1, msgs2)
|
||||||
local pos1, pos2 = 1, 1
|
local pos1, pos2 = 1, 1
|
||||||
while pos1 <= #msgs1 or pos2 <= #msgs2 do
|
while pos1 <= #msgs1 or pos2 <= #msgs2 do
|
||||||
local msg = next_message()
|
local msg = next_msg()
|
||||||
if pos1 <= #msgs1 and pcall(eq, msgs1[pos1], msg) then
|
if pos1 <= #msgs1 and pcall(eq, msgs1[pos1], msg) then
|
||||||
pos1 = pos1 + 1
|
pos1 = pos1 + 1
|
||||||
elseif pos2 <= #msgs2 then
|
elseif pos2 <= #msgs2 then
|
||||||
@ -117,7 +117,7 @@ local function expect_twostreams(msgs1, msgs2)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Expects a sequence of next_message() results. If multiple sequences are
|
-- Expects a sequence of next_msg() results. If multiple sequences are
|
||||||
-- passed they are tried until one succeeds, in order of shortest to longest.
|
-- passed they are tried until one succeeds, in order of shortest to longest.
|
||||||
local function expect_msg_seq(...)
|
local function expect_msg_seq(...)
|
||||||
if select('#', ...) < 1 then
|
if select('#', ...) < 1 then
|
||||||
@ -140,7 +140,7 @@ local function expect_msg_seq(...)
|
|||||||
local expected_seq = seqs[anum]
|
local expected_seq = seqs[anum]
|
||||||
-- Collect enough messages to compare the next expected sequence.
|
-- Collect enough messages to compare the next expected sequence.
|
||||||
while #actual_seq < #expected_seq do
|
while #actual_seq < #expected_seq do
|
||||||
local msg = next_message(10000) -- Big timeout for ASAN/valgrind.
|
local msg = next_msg(10000) -- Big timeout for ASAN/valgrind.
|
||||||
if msg == nil then
|
if msg == nil then
|
||||||
error(cat_err(final_error,
|
error(cat_err(final_error,
|
||||||
string.format('got %d messages, expected %d',
|
string.format('got %d messages, expected %d',
|
||||||
@ -754,7 +754,7 @@ local module = {
|
|||||||
mkdir = lfs.mkdir,
|
mkdir = lfs.mkdir,
|
||||||
neq = neq,
|
neq = neq,
|
||||||
new_pipename = new_pipename,
|
new_pipename = new_pipename,
|
||||||
next_message = next_message,
|
next_msg = next_msg,
|
||||||
nvim = nvim,
|
nvim = nvim,
|
||||||
nvim_argv = nvim_argv,
|
nvim_argv = nvim_argv,
|
||||||
nvim_async = nvim_async,
|
nvim_async = nvim_async,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
local helpers = require('test.functional.helpers')(after_each)
|
local helpers = require('test.functional.helpers')(after_each)
|
||||||
local clear, feed_command, nvim = helpers.clear, helpers.feed_command, helpers.nvim
|
local clear, feed_command, nvim = helpers.clear, helpers.feed_command, helpers.nvim
|
||||||
local feed, next_message, eq = helpers.feed, helpers.next_message, helpers.eq
|
local feed, next_msg, eq = helpers.feed, helpers.next_msg, helpers.eq
|
||||||
local expect = helpers.expect
|
local expect = helpers.expect
|
||||||
local write_file = helpers.write_file
|
local write_file = helpers.write_file
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
@ -16,7 +16,7 @@ describe('mappings', function()
|
|||||||
|
|
||||||
local check_mapping = function(mapping, expected)
|
local check_mapping = function(mapping, expected)
|
||||||
feed(mapping)
|
feed(mapping)
|
||||||
eq({'notification', 'mapped', {expected}}, next_message())
|
eq({'notification', 'mapped', {expected}}, next_msg())
|
||||||
end
|
end
|
||||||
|
|
||||||
before_each(function()
|
before_each(function()
|
||||||
|
2
third-party/cmake/BuildLuarocks.cmake
vendored
2
third-party/cmake/BuildLuarocks.cmake
vendored
@ -72,7 +72,7 @@ if(UNIX OR (MINGW AND CMAKE_CROSSCOMPILING))
|
|||||||
BuildLuarocks(
|
BuildLuarocks(
|
||||||
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
|
CONFIGURE_COMMAND ${DEPS_BUILD_DIR}/src/luarocks/configure
|
||||||
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
|
--prefix=${HOSTDEPS_INSTALL_DIR} --force-config ${LUAROCKS_OPTS}
|
||||||
INSTALL_COMMAND ${MAKE_PRG} bootstrap)
|
INSTALL_COMMAND ${MAKE_PRG} -j1 bootstrap)
|
||||||
elseif(MSVC OR MINGW)
|
elseif(MSVC OR MINGW)
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
|
Loading…
Reference in New Issue
Block a user