mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-20 18:45:55 +00:00
Strip down Travis CI support toward future deprecation:
* Remove all builds except cmake gcc & clang debug. * Time some dependency and build operations, using a custom format to avoid interfering with other timers. * Use Travis's "trusty" infrastructure. * Install more dependencies via apt. * Update boost version to 1.65.1. * Do not run unit tests under gdb - several security features prevent it from running correctly. * Run test job with two processes.
This commit is contained in:
committed by
Mike Ellery
parent
2fee75bfc1
commit
4a3a40174e
47
.travis.yml
47
.travis.yml
@@ -3,23 +3,19 @@ language: cpp
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- LLVM_VERSION=3.8.0
|
|
||||||
# Maintenance note: to move to a new version
|
# Maintenance note: to move to a new version
|
||||||
# of boost, update both BOOST_ROOT and BOOST_URL.
|
# of boost, update both BOOST_ROOT and BOOST_URL.
|
||||||
# Note that for simplicity, BOOST_ROOT's final
|
# Note that for simplicity, BOOST_ROOT's final
|
||||||
# namepart must match the folder name internal
|
# namepart must match the folder name internal
|
||||||
# to boost's .tar.gz.
|
# to boost's .tar.gz.
|
||||||
- LCOV_ROOT=$HOME/lcov
|
- BOOST_ROOT=$HOME/boost_1_65_1
|
||||||
- GDB_ROOT=$HOME/gdb
|
- BOOST_URL='https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz'
|
||||||
- BOOST_ROOT=$HOME/boost_1_60_0
|
|
||||||
- BOOST_URL='http://sourceforge.net/projects/boost/files/boost/1.60.0/boost_1_60_0.tar.gz'
|
|
||||||
|
|
||||||
# Travis is timing out on Trusty. So, for now, use Precise. July 2017
|
|
||||||
dist: precise
|
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources:
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
- llvm-toolchain-trusty-5.0
|
||||||
packages:
|
packages:
|
||||||
- gcc-5
|
- gcc-5
|
||||||
- g++-5
|
- g++-5
|
||||||
@@ -29,43 +25,41 @@ addons:
|
|||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libstdc++6
|
- libstdc++6
|
||||||
- binutils-gold
|
- binutils-gold
|
||||||
# Provides a backtrace if the unittests crash
|
- cmake
|
||||||
- gdb
|
- lcov
|
||||||
# needed to build gdb
|
- llvm-5.0
|
||||||
- texinfo
|
- clang-5.0
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Default BUILD is "scons".
|
# Default BUILD is "scons".
|
||||||
|
|
||||||
|
- compiler: gcc
|
||||||
|
env: GCC_VER=5 BUILD=cmake TARGET=debug
|
||||||
|
# - APP_ARGS="--unittest-jobs=2"
|
||||||
|
|
||||||
# - compiler: gcc
|
# - compiler: gcc
|
||||||
# env: GCC_VER=5 TARGET=debug.nounity
|
# env: GCC_VER=5 TARGET=debug.nounity
|
||||||
|
|
||||||
- compiler: gcc
|
# - compiler: gcc
|
||||||
env: GCC_VER=5 BUILD=cmake TARGET=coverage PATH=$PWD/cmake/bin:$PATH
|
# env: GCC_VER=5 BUILD=cmake TARGET=coverage PATH=$PWD/cmake/bin:$PATH
|
||||||
|
|
||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: GCC_VER=5 BUILD=cmake TARGET=debug CLANG_VER=3.8 PATH=$PWD/llvm-$LLVM_VERSION/bin:$PWD/cmake/bin:$PATH
|
env: GCC_VER=5 BUILD=cmake TARGET=debug
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $GDB_ROOT
|
|
||||||
|
|
||||||
- compiler: clang
|
# - compiler: clang
|
||||||
env: GCC_VER=5 TARGET=debug.nounity CLANG_VER=3.8 PATH=$PWD/llvm-$LLVM_VERSION/bin:$PATH
|
# env: GCC_VER=5 TARGET=debug.nounity
|
||||||
|
|
||||||
# The clang cmake builds do not link.
|
# The clang cmake builds do not link.
|
||||||
# - compiler: clang
|
# - compiler: clang
|
||||||
# env: GCC_VER=5 BUILD=cmake TARGET=debug CLANG_VER=3.8 PATH=$PWD/llvm-$LLVM_VERSION/bin:$PWD/cmake/bin:$PATH
|
# env: GCC_VER=5 BUILD=cmake TARGET=debug
|
||||||
|
|
||||||
# - compiler: clang
|
# - compiler: clang
|
||||||
# env: GCC_VER=5 BUILD=cmake TARGET=debug.nounity CLANG_VER=3.8 PATH=$PWD/llvm-$LLVM_VERSION/bin:$PWD/cmake/bin:$PATH
|
# env: GCC_VER=5 BUILD=cmake TARGET=debug.nounity
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $BOOST_ROOT
|
- $BOOST_ROOT
|
||||||
- llvm-$LLVM_VERSION
|
|
||||||
- cmake
|
|
||||||
- $GDB_ROOT
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- bin/ci/ubuntu/install-dependencies.sh
|
- bin/ci/ubuntu/install-dependencies.sh
|
||||||
@@ -80,4 +74,3 @@ notifications:
|
|||||||
channels:
|
channels:
|
||||||
- "chat.freenode.net#ripple-dev"
|
- "chat.freenode.net#ripple-dev"
|
||||||
|
|
||||||
dist: precise
|
|
||||||
|
|||||||
@@ -13,7 +13,17 @@ echo "using TARGET: $TARGET"
|
|||||||
echo "using APP: $APP"
|
echo "using APP: $APP"
|
||||||
|
|
||||||
JOBS=${NUM_PROCESSORS:-2}
|
JOBS=${NUM_PROCESSORS:-2}
|
||||||
JOBS=$((JOBS+1))
|
if [[ ${TRAVIS:-false} != "true" ]]; then
|
||||||
|
JOBS=$((JOBS+1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x /usr/bin/time ] ; then
|
||||||
|
: ${TIME:="Duration: %E"}
|
||||||
|
export TIME
|
||||||
|
time=/usr/bin/time
|
||||||
|
else
|
||||||
|
time=
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ ${BUILD:-scons} == "cmake" ]]; then
|
if [[ ${BUILD:-scons} == "cmake" ]]; then
|
||||||
echo "cmake building ${APP}"
|
echo "cmake building ${APP}"
|
||||||
@@ -37,13 +47,13 @@ if [[ ${BUILD:-scons} == "cmake" ]]; then
|
|||||||
fi
|
fi
|
||||||
mkdir -p "build/${CMAKE_TARGET}"
|
mkdir -p "build/${CMAKE_TARGET}"
|
||||||
pushd "build/${CMAKE_TARGET}"
|
pushd "build/${CMAKE_TARGET}"
|
||||||
cmake ../.. -Dtarget=$CMAKE_TARGET ${CMAKE_EXTRA_ARGS}
|
$time cmake ../.. -Dtarget=$CMAKE_TARGET ${CMAKE_EXTRA_ARGS}
|
||||||
cmake --build . -- $BUILDARGS
|
$time cmake --build . -- $BUILDARGS
|
||||||
if [[ ${BUILD_BOTH:-} == true ]]; then
|
if [[ ${BUILD_BOTH:-} == true ]]; then
|
||||||
if [[ ${TARGET} == *.unity ]]; then
|
if [[ ${TARGET} == *.unity ]]; then
|
||||||
cmake --build . --target rippled_classic -- $BUILDARGS
|
$time cmake --build . --target rippled_classic -- $BUILDARGS
|
||||||
else
|
else
|
||||||
cmake --build . --target rippled_unity -- $BUILDARGS
|
$time cmake --build . --target rippled_unity -- $BUILDARGS
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
@@ -53,12 +63,12 @@ else
|
|||||||
export APP_PATH="$PWD/build/$CC.$TARGET/${APP}"
|
export APP_PATH="$PWD/build/$CC.$TARGET/${APP}"
|
||||||
echo "using APP_PATH: $APP_PATH"
|
echo "using APP_PATH: $APP_PATH"
|
||||||
# Make sure vcxproj is up to date
|
# Make sure vcxproj is up to date
|
||||||
scons vcxproj
|
$time scons vcxproj
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
# $CC will be either `clang` or `gcc`
|
# $CC will be either `clang` or `gcc`
|
||||||
# http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade
|
# http://docs.travis-ci.com/user/migrating-from-legacy/?utm_source=legacy-notice&utm_medium=banner&utm_campaign=legacy-upgrade
|
||||||
# indicates that 2 cores are available to containers.
|
# indicates that 2 cores are available to containers.
|
||||||
scons -j${JOBS} $CC.$TARGET
|
$time scons -j${JOBS} $CC.$TARGET
|
||||||
fi
|
fi
|
||||||
# We can be sure we're using the build/$CC.$TARGET variant
|
# We can be sure we're using the build/$CC.$TARGET variant
|
||||||
# (-f so never err)
|
# (-f so never err)
|
||||||
@@ -68,7 +78,7 @@ rm -f build/${APP}
|
|||||||
ldd $APP_PATH
|
ldd $APP_PATH
|
||||||
|
|
||||||
if [[ ${APP} == "rippled" ]]; then
|
if [[ ${APP} == "rippled" ]]; then
|
||||||
export APP_ARGS="--unittest --quiet --unittest-log"
|
export APP_ARGS+=" --unittest --quiet --unittest-log"
|
||||||
# Only report on src/ripple files
|
# Only report on src/ripple files
|
||||||
export LCOV_FILES="*/src/ripple/*"
|
export LCOV_FILES="*/src/ripple/*"
|
||||||
# Nothing to explicitly exclude
|
# Nothing to explicitly exclude
|
||||||
@@ -92,7 +102,8 @@ if [[ ${SKIP_TESTS:-} == true ]]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $TARGET == debug* ]]; then
|
if [[ $TARGET == debug* && -v GDB_ROOT && -x $GDB_ROOT/bin/gdb ]]; then
|
||||||
|
$GDB_ROOT/bin/gdb -v
|
||||||
# Execute unit tests under gdb, printing a call stack
|
# Execute unit tests under gdb, printing a call stack
|
||||||
# if we get a crash.
|
# if we get a crash.
|
||||||
$GDB_ROOT/bin/gdb -return-child-result -quiet -batch \
|
$GDB_ROOT/bin/gdb -return-child-result -quiet -batch \
|
||||||
|
|||||||
@@ -15,42 +15,11 @@ do
|
|||||||
ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
|
ln -sv $(type -p ${g}-$GCC_VER) $HOME/bin/${g}
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n ${CLANG_VER:-} ]]; then
|
|
||||||
# There are cases where the directory exists, but the exe is not available.
|
|
||||||
# Use this workaround for now.
|
|
||||||
if [[ ! -x ${TWD}/llvm-${LLVM_VERSION}/bin/llvm-config && -d ${TWD}/llvm-${LLVM_VERSION} ]]; then
|
|
||||||
rm -fr ${TWD}/llvm-${LLVM_VERSION}
|
|
||||||
fi
|
|
||||||
if [[ ! -d ${TWD}/llvm-${LLVM_VERSION} ]]; then
|
|
||||||
mkdir ${TWD}/llvm-${LLVM_VERSION}
|
|
||||||
LLVM_URL="http://llvm.org/releases/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-linux-gnu-ubuntu-14.04.tar.xz"
|
|
||||||
wget -O - ${LLVM_URL} | tar -Jxvf - --strip 1 -C ${TWD}/llvm-${LLVM_VERSION}
|
|
||||||
fi
|
|
||||||
${TWD}/llvm-${LLVM_VERSION}/bin/llvm-config --version;
|
|
||||||
export LLVM_CONFIG="${TWD}/llvm-${LLVM_VERSION}/bin/llvm-config";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${BUILD:-} == cmake ]]; then
|
|
||||||
# There are cases where the directory exists, but the exe is not available.
|
|
||||||
# Use this workaround for now.
|
|
||||||
if [[ ! -x ${TWD}/cmake/bin/cmake && -d ${TWD}/cmake ]]; then
|
|
||||||
rm -fr ${TWD}/cmake
|
|
||||||
fi
|
|
||||||
if [[ ! -d ${TWD}/cmake ]]; then
|
|
||||||
CMAKE_URL="https://www.cmake.org/files/v3.6/cmake-3.6.1-Linux-x86_64.tar.gz"
|
|
||||||
wget --version
|
|
||||||
# wget version 1.13.4 thinks this certificate is invalid, even though it's fine.
|
|
||||||
# "ERROR: no certificate subject alternative name matches"
|
|
||||||
# See also: https://github.com/travis-ci/travis-ci/issues/5059
|
|
||||||
mkdir ${TWD}/cmake &&
|
|
||||||
wget -O - --no-check-certificate ${CMAKE_URL} | tar --strip-components=1 -xz -C ${TWD}/cmake
|
|
||||||
cmake --version
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# What versions are we ACTUALLY running?
|
# What versions are we ACTUALLY running?
|
||||||
if [ -x $HOME/bin/g++ ]; then
|
if [ -x $HOME/bin/g++ ]; then
|
||||||
$HOME/bin/g++ -v
|
$HOME/bin/g++ -v
|
||||||
|
else
|
||||||
|
g++ -v
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip install --user requests==2.13.0
|
pip install --user requests==2.13.0
|
||||||
@@ -58,24 +27,3 @@ pip install --user https://github.com/codecov/codecov-python/archive/master.zip
|
|||||||
|
|
||||||
bash bin/sh/install-boost.sh
|
bash bin/sh/install-boost.sh
|
||||||
|
|
||||||
# Install lcov
|
|
||||||
# Download the archive
|
|
||||||
wget https://github.com/linux-test-project/lcov/releases/download/v1.12/lcov-1.12.tar.gz
|
|
||||||
# Extract to ~/lcov-1.12
|
|
||||||
tar xfvz lcov-1.12.tar.gz -C $HOME
|
|
||||||
# Set install path
|
|
||||||
mkdir -p $LCOV_ROOT
|
|
||||||
cd $HOME/lcov-1.12 && make install PREFIX=$LCOV_ROOT
|
|
||||||
|
|
||||||
if [[ ${TARGET} == debug* && ! -x ${GDB_ROOT}/bin/gdb ]]; then
|
|
||||||
pushd $HOME
|
|
||||||
#install gdb
|
|
||||||
wget https://ftp.gnu.org/gnu/gdb/gdb-8.0.tar.xz
|
|
||||||
tar xf gdb-8.0.tar.xz
|
|
||||||
pushd gdb-8.0
|
|
||||||
./configure CFLAGS='-w -O2' CXXFLAGS='-std=gnu++11 -g -O2 -w' --prefix=$GDB_ROOT
|
|
||||||
make -j2
|
|
||||||
make install
|
|
||||||
popd
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -8,6 +8,14 @@
|
|||||||
# https://travis-ci.org/ripple/rippled/caches
|
# https://travis-ci.org/ripple/rippled/caches
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -x /usr/bin/time ] ; then
|
||||||
|
: ${TIME:="Duration: %E"}
|
||||||
|
export TIME
|
||||||
|
time=/usr/bin/time
|
||||||
|
else
|
||||||
|
time=
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$BOOST_ROOT/lib" ]
|
if [ ! -d "$BOOST_ROOT/lib" ]
|
||||||
then
|
then
|
||||||
wget $BOOST_URL -O /tmp/boost.tar.gz
|
wget $BOOST_URL -O /tmp/boost.tar.gz
|
||||||
@@ -15,9 +23,9 @@ then
|
|||||||
rm -fr ${BOOST_ROOT}
|
rm -fr ${BOOST_ROOT}
|
||||||
tar xzf /tmp/boost.tar.gz
|
tar xzf /tmp/boost.tar.gz
|
||||||
cd $BOOST_ROOT && \
|
cd $BOOST_ROOT && \
|
||||||
./bootstrap.sh --prefix=$BOOST_ROOT && \
|
$time ./bootstrap.sh --prefix=$BOOST_ROOT && \
|
||||||
./b2 -d1 define=_GLIBCXX_USE_CXX11_ABI=0 -j$((2*${NUM_PROCESSORS:-2})) &&\
|
$time ./b2 -d1 define=_GLIBCXX_USE_CXX11_ABI=0 -j$((2*${NUM_PROCESSORS:-2})) &&\
|
||||||
./b2 -d0 define=_GLIBCXX_USE_CXX11_ABI=0 install
|
$time ./b2 -d0 define=_GLIBCXX_USE_CXX11_ABI=0 install
|
||||||
else
|
else
|
||||||
echo "Using cached boost at $BOOST_ROOT"
|
echo "Using cached boost at $BOOST_ROOT"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user