Address Travis compiler out of memory and timeout errors

This commit is contained in:
Scott Schurr
2017-07-25 18:33:19 -07:00
committed by seelabs
parent 3d977aeacb
commit 3c37539cee
35 changed files with 444 additions and 225 deletions

View File

@@ -10,6 +10,12 @@ echo "using TARGET: $TARGET"
# Ensure APP defaults to rippled if it's not set.
: ${APP:=rippled}
JOBS=${NUM_PROCESSORS:-2}
if [[ ${TARGET} == *.nounity ]]; then
JOBS=$((2*${JOBS}))
fi
if [[ ${BUILD:-scons} == "cmake" ]]; then
echo "cmake building ${APP}"
CMAKE_TARGET=$CC.$TARGET
@@ -19,7 +25,7 @@ if [[ ${BUILD:-scons} == "cmake" ]]; then
mkdir -p "build/${CMAKE_TARGET}"
pushd "build/${CMAKE_TARGET}"
cmake ../.. -Dtarget=$CMAKE_TARGET
cmake --build . -- -j${NUM_PROCESSORS:-2}
cmake --build . -- -j${JOBS}
popd
export APP_PATH="$PWD/build/${CMAKE_TARGET}/${APP}"
echo "using APP_PATH: $APP_PATH"
@@ -33,7 +39,7 @@ else
# $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
# indicates that 2 cores are available to containers.
scons -j${NUM_PROCESSORS:-2} $CC.$TARGET
scons -j${JOBS} $CC.$TARGET
fi
# We can be sure we're using the build/$CC.$TARGET variant
# (-f so never err)
@@ -91,6 +97,8 @@ if [[ $TARGET == "coverage" ]]; then
# Push the results (lcov.info) to codecov
codecov -X gcov # don't even try and look for .gcov files ;)
find . -name "*.gcda" | xargs rm -f
fi