Merge pull request #1570 from fwalch/travis-improvements

Travis-related improvements
This commit is contained in:
Justin M. Keyes 2014-12-14 16:14:56 -05:00
commit a5edc5f257
6 changed files with 36 additions and 20 deletions

View File

@ -23,7 +23,7 @@ fi
export CC=/usr/local/clang-$clang_version/bin/clang
symbolizer=/usr/local/clang-$clang_version/bin/llvm-symbolizer
setup_prebuilt_deps x64
setup_deps x64
export ASAN_SYMBOLIZER_PATH=$symbolizer
export ASAN_OPTIONS="detect_leaks=1:log_path=$tmpdir/asan"

View File

@ -1,9 +1,3 @@
#!/bin/sh
for file in $(cat clint-files.txt); do
./clint.py $file || fail=1
done
if [ -n "$fail" ]; then
exit 1
fi
./clint.py $(cat clint-files.txt)

View File

@ -28,15 +28,29 @@ check_logs() {
check_core_dumps() {
sleep 2
local c
for c in $(find ./ -name '*core*' -print); do
gdb -q -n -batch -ex bt build/bin/nvim $c
exit 1
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cores=/cores/*
else
# TODO(fwalch): Will trigger if a file named core.* exists outside of .deps.
cores="$(find ./ -not -path '*.deps*' -name 'core.*' -print)"
fi
if [ -z "$cores" ]; then
return
fi
for c in $cores; do
gdb -q -n -batch -ex bt build/bin/nvim $c
done
exit 1
}
setup_prebuilt_deps() {
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) deps-${1}"
setup_deps() {
if [ "$BUILD_NVIM_DEPS" != "true" ]; then
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) deps-${1}"
elif [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install libtool
fi
}
tmpdir="$(pwd)/tmp"

View File

@ -1,7 +1,5 @@
. "$CI_SCRIPTS/common.sh"
setup_prebuilt_deps x86
# Need this to keep apt-get from removing gcc when installing libncurses
# below.
sudo apt-get install libc6-dev libc6-dev:i386
@ -14,16 +12,19 @@ sudo apt-get install gcc-multilib g++-multilib
# correctly.
sudo apt-get install libncurses5-dev:i386
setup_deps x86
CMAKE_EXTRA_FLAGS="-DTRAVIS_CI_BUILD=ON \
-DCMAKE_SYSTEM_PROCESSOR=i386 \
-DCMAKE_SYSTEM_LIBRARY_PATH=/lib32:/usr/lib32:/usr/local/lib32 \
-DFIND_LIBRARY_USE_LIB64_PATHS=OFF \
-DCMAKE_IGNORE_PATH=/lib:/usr/lib:/usr/local/lib \
-DCMAKE_TOOLCHAIN_FILE=cmake/i386-linux-gnu.toolchain.cmake \
-DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake \
-DBUSTED_OUTPUT_TYPE=plainTerminal"
# Build and output version info.
$MAKE_CMD CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS" nvim
$MAKE_CMD DEPS_CMAKE_FLAGS="$CMAKE_EXTRA_FLAGS" \
CMAKE_EXTRA_FLAGS="$CMAKE_EXTRA_FLAGS" nvim
build/bin/nvim --version
# Build library.
@ -39,3 +40,8 @@ check_core_dumps
# Run legacy tests.
$MAKE_CMD oldtest
check_core_dumps
# Test if correctly installed.
sudo -E $MAKE_CMD install
/usr/local/bin/nvim --version
/usr/local/bin/nvim -e -c "quit"

View File

@ -11,7 +11,7 @@ else
exit 1
fi
setup_prebuilt_deps x64
setup_deps x64
export VALGRIND=1
export VALGRIND_LOG="$tmpdir/valgrind-%p.log"

View File

@ -4,6 +4,8 @@ os:
env:
global:
- CI_SCRIPTS=$TRAVIS_BUILD_DIR/.ci
# To build third-party dependencies, set this to 'true'.
- BUILD_NVIM_DEPS=false
# Travis reports back that it has 32-cores via /proc/cpuinfo, but it's not
# what we really have available. According to their documentation, it only has
# 1.5 virtual cores.
@ -57,4 +59,4 @@ script:
# This will pass the environment variables down to a bash process which runs
# as $USER, while retaining the environment variables defined and belonging
# to secondary groups given above in usermod.
- sudo -E su $USER -c "ulimit -c 102400; sh -e \"$CI_SCRIPTS/$CI_TARGET.sh\""
- sudo -E su $USER -c "sh -e \"$CI_SCRIPTS/$CI_TARGET.sh\""