"Always use `find_package` with `REQUIRED`."
- We make an exception for LuaJit (not REQUIRED): the `nvim-test` target
is included only if we can find LuaJit.
This is partially a cargo-cult (reference below), but it uncovered at
least one problem: `find_package(LibIntl REQUIRED)` fails on my vanilla
ubuntu 16.04 system.
ref: https://schneide.blog/2017/11/06/4-tips-for-better-cmake/
> optional dependencies is nice, but skipping on REQUIRED is not the way
> you want to do it. In the worst case, some of your features will just
> not work if those packages are not found, with no explanation
> whatsoever. Instead, use explicit feature-toggles (e.g. using option())
> that either skip the find_package call or use it with REQUIRED, so the
> user will know that another lib is needed for this feature.
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
...
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.
Workaround for this fun new issue:
==27404==LeakSanitizer has encountered a fatal error.
==27404==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==27404==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
Failed: E /build|logs :: Runtime errors detected.
https://github.com/travis-ci/travis-ci/issues/9033https://github.com/google/sanitizers/issues/764
Separating the non-flaky builds (asan, normal builds, lint) into
separate stages simply slowed down overall CI turnaround. Since none of
the builds rely on the output of others, reducing the stages increases
the opportunities for parallel builds.
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.
- Establish ERROR log level as "critical". Such errors are rare and will
be valuable when users encounter unusual circumstances.
- Set -DMIN_LOG_LEVEL=3 for release-type builds
This should better allow distributing the load among PRs, while getting
critical feedback to the submitter sooner.
First stage runs the ASAN/UBSAN/TSAN since any failures in those are
gating issues.
Second stage runs the rest of the normal builds in parallel.
Remaining stages provide lower priority feedback. The lint build runs
fast locally, so it's better to run that locally than wait on CI. The
coverage build is pretty fickle, so it is only run once all other jobs
are green.
Compile `nvim` executable against Lua if PREFER_LUA=ON.
As the testing library `nvim-test` requires LuaJIT, it is
still compiled against LuaJIT. If LuaJIT is not available,
`nvim-test` is not built.
Reasoning:
1. gtest is better then something like utfTerminal, yet it is way too verbose.
2. gtest cannot be configured to show colors always.
3. Actually I am going to add a CMake target which will allow running tests
(especially, functional tests) in parallel, but this is not going to work
well with any of the default output handlers. Build in this case must be more
or less silent, yet debuggable. New handler does not support this in this
commit though.
1. CI_TARGET now determines which run_${CI_TARGET}.sh script to use. Defaults to
`tests`.
2. Build no longer halts on the first failing suit: e.g. if functional tests
failed it will continue with unit tests, etc.
3. All ${MAKE_CMD} occurrences moved to `top_make` function, added `build_make`
as an alias to `make -C build` (`"${MAKE_CMD}" -C "${BUILD_DIR}"`) which is
too verbose.
`suite.sh` was copied from powerline (tests/common.sh file), assumes running
with POSIX shells (and actually uses dash in powerline). Then some convenience
functions were added (run_test and below).
- Do not exclude any directories from `find` search, remove dumps before tests
instead.
- Install `apport` on travis so that linux tests should produce core dumps
(based on information from travis-ci/travis-ci#3754, not sure whether it still
applies).
- Check cores in lua so that one has an idea which test is failing exactly. Do
this only 10% of time on linux because traversing the file system is slow.
Unit tests are still not touched, though it is what `app` argument in
`check_cores` is for.
TODO? consider using `find`, it may be faster. Consider retiring `os.execute`,
dealing with escaping is bad.
This fixes failures with TSAN builds like
FATAL: ThreadSanitizer can not mmap the shadow memory (something is mapped at 0x55deea465000 < 0x7cf000000000)
FATAL: Make sure to compile with -fPIE and to link with -pie.
Update to a recent, but not bleeding-edge, version of macOS and xcode.
At present, travis defaults to OS X 10.9.5 / Xcode 6.1.
QuickBuild runs macOS 10.10.
- Check if MIN_LOG_LEVEL value is a number 0-3, default to
INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example