Skip to content

Commit

Permalink
[build] Actively avoid travis "no output" timeout for 15min
Browse files Browse the repository at this point in the history
This is done by having an echo on the background with 3x5min sleeps.
The echo is killed if the rest of the travis_script takes less time
to complete.

Solution inspired from this issue comment while looking at travis_wait:
travis-ci/travis-ci#4190 (comment)
  • Loading branch information
simonbasle committed Jun 13, 2018
1 parent 0d8e16e commit 95a07d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -ev

for i in 1 2 3
do
sleep 300;
echo "=====[ $((i * 5))min, still running ]=====";
done &

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
COMMIT_RANGE="FETCH_HEAD..$TRAVIS_BRANCH"
echo "travis PR #$TRAVIS_PULL_REQUEST build, looking at files in $COMMIT_RANGE"
Expand Down Expand Up @@ -39,4 +45,6 @@ else
fi
fi

kill %1

exit 0;

0 comments on commit 95a07d2

Please sign in to comment.