From ecab029d5bb882b2b75abbc12839201de270ed23 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 21 Apr 2017 00:12:22 +0800 Subject: [PATCH] Timeout for caching in TravisCI --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a7f45a748a..865e21f046b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ env: - JOB=DOCS - JOB=BUILD_AND_TEST - JOB=PRE_COMMIT - addons: apt: packages: @@ -49,8 +48,12 @@ before_install: # Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python # protobuf version. - pip install numpy wheel 'protobuf==3.1' sphinx recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit requests==2.9.2 LinkChecker + - | + function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; } script: - - paddle/scripts/travis/main.sh + - | + timeout 2580 paddle/scripts/travis/main.sh # 43min timeout + RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi; notifications: email: on_success: change -- GitLab