diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-22 14:40:19 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-22 21:55:59 -0300 |
commit | 9f7426ca168e5296c22e589a6694f6a902bdf8d8 (patch) | |
tree | b7923d7ffe11030e4aa4ac7f8fc7929a8788c6a7 /scripts | |
parent | a57030d28cf8e6f3e792ebfdc9d52e1c1ac17562 (diff) | |
download | rneovim-9f7426ca168e5296c22e589a6694f6a902bdf8d8.tar.gz rneovim-9f7426ca168e5296c22e589a6694f6a902bdf8d8.tar.bz2 rneovim-9f7426ca168e5296c22e589a6694f6a902bdf8d8.zip |
Configure travis to perform a 32-bit build
- Build targeting 32-bit with travis
- Code in `before_install`/`after_success` was moved to travis.sh since it
provides greater flexibility for detecting the build matrix environment. This
improves the build speed since we now install only what's necessary.
- Now clint has a dedicated travis worker
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/travis-setup.sh | 50 | ||||
-rwxr-xr-x | scripts/travis.sh | 56 |
2 files changed, 45 insertions, 61 deletions
diff --git a/scripts/travis-setup.sh b/scripts/travis-setup.sh deleted file mode 100755 index 1520777841..0000000000 --- a/scripts/travis-setup.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e - -# Despite the logs, CC isn't being exported at before_install time in Travis. -# So the following check cannot be used to avoid the download. -# [ "$CC" != "clang" ] && exit - -echo "Downloading clang 3.4..." -mkdir /usr/local/clang-3.4 -wget -q -O - http://llvm.org/releases/3.4/clang+llvm-3.4-x86_64-unknown-ubuntu12.04.tar.xz | - unxz -c | tar xf - --strip-components=1 -C /usr/local/clang-3.4 - - -# The section below is still around, in case we want to try the llvm.org/apt/ -# repository again. - -# Set to true to enable using the clang stable builds hosted at -# http://llvm.org/apt/. -# -# Note: there have been issues with this repository. Several days in a row -# there have been problems running from broken a source repository (causing us -# to remove them from the .list file), to the toolchain being packaged -# incorrectly (most likely due to a change in version number--3.4.0 -> 3.4.1). -# Use with care. -# USE_CLANG_34=true - -# if [ -n "$USE_CLANG_34" ]; then -# add-apt-repository -y ppa:ubuntu-toolchain-r/ppa -# wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add - - -# cat > /etc/apt/sources.list.d/clang.list << "EOF" -# # deb http://llvm.org/apt/precise/ llvm-toolchain-precise main -# # deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise main -# # 3.4 -# deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main -# # deb-src http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main -# # Common -# deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main -# EOF -# fi - -# apt-get -qq update - -# [ -n "$USE_CLANG_34" ] && -# apt-get -qq -y --no-install-recommends install clang-3.4 lldb-3.4 - -pip install cpp-coveralls --use-mirrors - -# install prebuilt dependencies -cd /opt -sudo git clone --depth=1 git://github.com/tarruda/neovim-deps diff --git a/scripts/travis.sh b/scripts/travis.sh index ec8ae435af..849d458b5a 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -17,11 +17,20 @@ check_and_report() { ) } -# setup environment for using the /opt/neovim-deps prefix -export PATH="/opt/neovim-deps/bin:$PATH" -export PKG_CONFIG_PATH="/opt/neovim-deps/lib/pkgconfig" -export DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_MSGPACK=OFF -DUSE_BUNDLED_LUAROCKS=OFF" -eval $(/opt/neovim-deps/bin/luarocks path) +set_environment() { + local prefix="$1" + eval $($prefix/bin/luarocks path) + export PATH="$prefix/bin:$PATH" + export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" + export DEPS_CMAKE_FLAGS="-DUSE_BUNDLED_LIBUV=OFF -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_MSGPACK=OFF -DUSE_BUNDLED_LUAROCKS=OFF" +} + +# install prebuilt dependencies +if [ ! -d /opt/neovim-deps ]; then + cd /opt + sudo git clone --depth=1 git://github.com/tarruda/neovim-deps + cd - +fi # 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 @@ -31,7 +40,19 @@ eval $(/opt/neovim-deps/bin/luarocks path) # for more information. MAKE_CMD="make -j2" -if [ "$CC" = "clang" ]; then +if [ "$TRAVIS_BUILD_TYPE" = "clang/asan" ]; then + if [ ! -d /usr/local/clang-3.4 ]; then + echo "Downloading clang 3.4..." + sudo sh <<- "EOF" + mkdir /usr/local/clang-3.4 + wget -q -O - http://llvm.org/releases/3.4/clang+llvm-3.4-x86_64-unknown-ubuntu12.04.tar.xz | + unxz -c | tar xf - --strip-components=1 -C /usr/local/clang-3.4 + EOF + fi + sudo pip install cpp-coveralls --use-mirrors + + export CC=clang + set_environment /opt/neovim-deps if test -f /usr/local/clang-3.4/bin/clang; then USE_CLANG_34=true export CC=/usr/local/clang-3.4/bin/clang @@ -56,7 +77,7 @@ if [ "$CC" = "clang" ]; then export ASAN_OPTIONS="detect_leaks=1:" else symbolizer=/usr/local/clang-3.3/bin/llvm-symbolizer - fi + fi export SANITIZE=1 export ASAN_SYMBOLIZER_PATH=$symbolizer @@ -74,10 +95,23 @@ if [ "$CC" = "clang" ]; then exit 1 fi check_and_report + coveralls --encoding iso-8859-1 $MAKE_CMD install -else +elif [ "$TRAVIS_BUILD_TYPE" = "gcc/unittest" ]; then + sudo pip install cpp-coveralls --use-mirrors + export CC=gcc + set_environment /opt/neovim-deps export SKIP_EXEC=1 - $MAKE_CMD CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP -DUSE_GCOV=ON" - $MAKE_CMD cmake CMAKE_EXTRA_FLAGS="-DUSE_GCOV=ON" - $MAKE_CMD unittest + $MAKE_CMD CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP -DUSE_GCOV=ON" unittest + coveralls --encoding iso-8859-1 +elif [ "$TRAVIS_BUILD_TYPE" = "gcc/ia32" ]; then + set_environment /opt/neovim-deps/32 + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib libncurses5:i386 + sudo ln -s /lib/i386-linux-gnu/libtinfo.so.5 /lib/i386-linux-gnu/libtinfo.so + sudo ln -s /lib/i386-linux-gnu/libncurses.so.5.9 /lib/i386-linux-gnu/libcurses.so + $MAKE_CMD CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP -DCMAKE_TOOLCHAIN_FILE=cmake/i386-linux-gnu.toolchain.cmake" unittest + $MAKE_CMD test +elif [ "$TRAVIS_BUILD_TYPE" = "clint" ]; then + ./scripts/clint.sh fi |