mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
Travis: Fix OS X builds.
This commit is contained in:
parent
fa441658b1
commit
2e28f78971
@ -1,62 +0,0 @@
|
||||
. "$CI_SCRIPTS/common.sh"
|
||||
|
||||
sudo pip install cpp-coveralls
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
clang_version=3.4.2
|
||||
clang_suffix=x86_64-unknown-ubuntu12.04.xz
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
clang_version=3.5.0
|
||||
clang_suffix=macosx-apple-darwin.tar.xz
|
||||
else
|
||||
echo "Unknown OS '$TRAVIS_OS_NAME'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d /usr/local/clang-$clang_version ]; then
|
||||
echo "Downloading clang $clang_version..."
|
||||
sudo mkdir /usr/local/clang-$clang_version
|
||||
wget -q -O - http://llvm.org/releases/$clang_version/clang+llvm-$clang_version-$clang_suffix \
|
||||
| sudo tar xJf - --strip-components=1 -C /usr/local/clang-$clang_version
|
||||
fi
|
||||
|
||||
export CC=/usr/local/clang-$clang_version/bin/clang
|
||||
symbolizer=/usr/local/clang-$clang_version/bin/llvm-symbolizer
|
||||
|
||||
setup_deps x64
|
||||
|
||||
export ASAN_SYMBOLIZER_PATH=$symbolizer
|
||||
export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"
|
||||
export TSAN_OPTIONS="external_symbolizer_path=$symbolizer:log_path=$tmpdir/tsan"
|
||||
|
||||
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
|
||||
|
||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
-DUSE_GCOV=ON \
|
||||
-DBUSTED_OUTPUT_TYPE=plainTerminal"
|
||||
|
||||
# Build and output version info.
|
||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS -DSANITIZE=ON" nvim
|
||||
build/bin/nvim --version
|
||||
|
||||
# Run functional tests.
|
||||
if ! $MAKE_CMD test; then
|
||||
asan_check "$tmpdir"
|
||||
exit 1
|
||||
fi
|
||||
asan_check "$tmpdir"
|
||||
|
||||
# Run legacy tests.
|
||||
if ! $MAKE_CMD oldtest; then
|
||||
reset
|
||||
asan_check "$tmpdir"
|
||||
exit 1
|
||||
fi
|
||||
asan_check "$tmpdir"
|
||||
|
||||
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
||||
|
||||
# Test if correctly installed.
|
||||
sudo -E $MAKE_CMD install
|
||||
/usr/local/bin/nvim --version
|
||||
/usr/local/bin/nvim -e -c "quit"
|
57
.ci/clang.sh
Normal file
57
.ci/clang.sh
Normal file
@ -0,0 +1,57 @@
|
||||
. "$CI_SCRIPTS/common.sh"
|
||||
|
||||
sudo pip install cpp-coveralls
|
||||
|
||||
# Use custom Clang and enable ASAN on Linux.
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
clang_version=3.4.2
|
||||
clang_suffix=x86_64-unknown-ubuntu12.04.xz
|
||||
if [ ! -d /usr/local/clang-$clang_version ]; then
|
||||
echo "Downloading clang $clang_version..."
|
||||
sudo mkdir /usr/local/clang-$clang_version
|
||||
wget -q -O - http://llvm.org/releases/$clang_version/clang+llvm-$clang_version-$clang_suffix \
|
||||
| sudo tar xJf - --strip-components=1 -C /usr/local/clang-$clang_version
|
||||
fi
|
||||
export CC=/usr/local/clang-$clang_version/bin/clang
|
||||
symbolizer=/usr/local/clang-$clang_version/bin/llvm-symbolizer
|
||||
export ASAN_SYMBOLIZER_PATH=$symbolizer
|
||||
export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"
|
||||
export TSAN_OPTIONS="external_symbolizer_path=$symbolizer:log_path=$tmpdir/tsan"
|
||||
export UBSAN_OPTIONS="log_path=$tmpdir/ubsan" # not sure if this works
|
||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
-DUSE_GCOV=ON \
|
||||
-DBUSTED_OUTPUT_TYPE=plainTerminal \
|
||||
-DSANITIZE=ON"
|
||||
else
|
||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
-DUSE_GCOV=ON \
|
||||
-DBUSTED_OUTPUT_TYPE=plainTerminal"
|
||||
fi
|
||||
|
||||
setup_deps x64
|
||||
|
||||
# Build and output version info.
|
||||
$MAKE_CMD CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS" nvim
|
||||
build/bin/nvim --version
|
||||
|
||||
# Run functional tests.
|
||||
if ! $MAKE_CMD test; then
|
||||
asan_check "$tmpdir"
|
||||
exit 1
|
||||
fi
|
||||
asan_check "$tmpdir"
|
||||
|
||||
# Run legacy tests.
|
||||
if ! $MAKE_CMD oldtest; then
|
||||
reset
|
||||
asan_check "$tmpdir"
|
||||
exit 1
|
||||
fi
|
||||
asan_check "$tmpdir"
|
||||
|
||||
coveralls --encoding iso-8859-1 || echo 'coveralls upload failed.'
|
||||
|
||||
# Test if correctly installed.
|
||||
sudo -E $MAKE_CMD install
|
||||
/usr/local/bin/nvim --version
|
||||
/usr/local/bin/nvim -e -c "quit"
|
@ -30,17 +30,19 @@ check_core_dumps() {
|
||||
sleep 2
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
cores=/cores/*
|
||||
cores="$(find /cores/ -type f -print)"
|
||||
dbg="lldb -Q -o bt -f build/bin/nvim -c"
|
||||
else
|
||||
# TODO(fwalch): Will trigger if a file named core.* exists outside of .deps.
|
||||
cores="$(find ./ -not -path '*.deps*' -name 'core.*' -print)"
|
||||
cores="$(find ./ -type f -not -path '*.deps*' -name 'core.*' -print)"
|
||||
dbg="gdb -n -batch -ex bt build/bin/nvim"
|
||||
fi
|
||||
|
||||
if [ -z "$cores" ]; then
|
||||
return
|
||||
fi
|
||||
for c in $cores; do
|
||||
gdb -q -n -batch -ex bt build/bin/nvim $c
|
||||
$dbg $c
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
@ -4,17 +4,12 @@ sudo pip install cpp-coveralls
|
||||
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo apt-get install valgrind
|
||||
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
brew install valgrind
|
||||
else
|
||||
echo "Unknown OS '$TRAVIS_OS_NAME'."
|
||||
exit 1
|
||||
export VALGRIND=1
|
||||
export VALGRIND_LOG="$tmpdir/valgrind-%p.log"
|
||||
fi
|
||||
|
||||
setup_deps x64
|
||||
|
||||
export VALGRIND=1
|
||||
export VALGRIND_LOG="$tmpdir/valgrind-%p.log"
|
||||
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
|
||||
-DUSE_GCOV=ON \
|
||||
-DBUSTED_OUTPUT_TYPE=plainTerminal"
|
||||
|
@ -16,19 +16,18 @@ env:
|
||||
# Force verification of DLOG macros.
|
||||
- CFLAGS='-DMIN_LOG_LEVEL=0'
|
||||
matrix:
|
||||
- CI_TARGET=clang-asan
|
||||
- CI_TARGET=clang
|
||||
- CI_TARGET=gcc
|
||||
- CI_TARGET=gcc-32
|
||||
- CI_TARGET=clint
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
env: CI_TARGET=clang-asan
|
||||
env: CI_TARGET=clang
|
||||
compiler: clang
|
||||
- os: osx
|
||||
env: CI_TARGET=gcc
|
||||
compiler: gcc-4.9
|
||||
allow_failures:
|
||||
- os: osx
|
||||
before_install:
|
||||
# Pins the version of the java package installed on the Travis VMs
|
||||
# and avoids a lengthy upgrade process for them.
|
||||
@ -41,6 +40,8 @@ before_install:
|
||||
install:
|
||||
- if [ $TRAVIS_OS_NAME = linux ]; then
|
||||
sudo apt-get install xclip gdb;
|
||||
elif [ $TRAVIS_OS_NAME = osx ]; then
|
||||
brew install gettext;
|
||||
fi
|
||||
before_script:
|
||||
# Adds user to a dummy group.
|
||||
|
Loading…
Reference in New Issue
Block a user