From 300b6211a0273e53c3fce6900dbb8b93ba5c5f60 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Tue, 24 Oct 2017 11:22:24 -0400 Subject: [PATCH] travis: add "long" build script for cores with very large logs --- travis/build-long.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 travis/build-long.sh diff --git a/travis/build-long.sh b/travis/build-long.sh new file mode 100755 index 00000000..eb548a1c --- /dev/null +++ b/travis/build-long.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +export LOGDATE=`date +%Y-%m-%d` +mkdir -p /tmp/log/${LOGDATE} +export BOT=. +export TMPDIR=/tmp +export EXIT_ON_ERROR=1 + +# taken from https://stackoverflow.com/questions/26082444/how-to-work-around-travis-cis-4mb-output-limit +export PING_SLEEP=30s +export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +export BUILD_OUTPUT=$WORKDIR/build.out + +touch $BUILD_OUTPUT + +dump_output() { + echo Tailing the last 500 lines of output: + tail -500 $BUILD_OUTPUT +} + +# Set up a repeating loop to send some output to Travis. + +bash -c "while true; do echo \$(date) - building ...; sleep $PING_SLEEP; done" & +PING_LOOP_PID=$! + +./build-${PLATFORM}.sh &>$BUILD_OUTPUT + +RET=$? + +dump_output + +exit $RET