travis: add "long" build script for cores with very large logs

This commit is contained in:
Brad Parker 2017-10-24 11:22:24 -04:00
parent 2c531e143a
commit 300b6211a0

32
travis/build-long.sh Executable file
View File

@ -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