Skip to content

Commit 7c05aa8

Browse files
codablockUdjinM6
authored andcommitted
Also gracefully timeout Travis builds when building source takes >30min (#2932)
We assume 15-20 minutes for running integration tests, so we can spend a maximum of 30 minutes for building depends and source.
1 parent 92e5a38 commit 7c05aa8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.travis.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@ script:
7171
- export TRAVIS_COMMIT_LOG=`git log --format=fuller -1`
7272
# Our scripts try to be Travis agnostic
7373
- $DOCKER_RUN_IN_BUILDER ./ci/build_depends.sh;
74-
# Gracefully stop build without running into timeouts (which won't update caches) when building depends took too long
75-
# Next build should fix this situation as it will start with a populated depends cache
76-
- if [ $SECONDS -gt 1200 ]; then export DEPENDS_TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
77-
- test "$DEPENDS_TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/build_src.sh
78-
- test "$DEPENDS_TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_unittests.sh
79-
- test "$DEPENDS_TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_integrationtests.sh --jobs=3
80-
- test "$DEPENDS_TIMEOUT" != "true" && if [ "$DOCKER_BUILD" = "true" ]; then BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./docker/build-docker.sh; fi
74+
# Gracefully stop build without running into timeouts (which won't update caches) when building depends or source took too long
75+
# Next build should fix this situation as it will start with a populated cache
76+
- if [ $SECONDS -gt 1200 ]; then export TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
77+
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/build_src.sh
78+
- if [ $SECONDS -gt 1800 ]; then export TIMEOUT="true"; false; fi # The "false" here ensures that the build is marked as failed even though the whole script returns 0
79+
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_unittests.sh
80+
- test "$TIMEOUT" != "true" && $DOCKER_RUN_IN_BUILDER ./ci/test_integrationtests.sh --jobs=3
81+
- test "$TIMEOUT" != "true" && if [ "$DOCKER_BUILD" = "true" ]; then BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./docker/build-docker.sh; fi
8182
after_script:
8283
- echo $TRAVIS_COMMIT_RANGE
8384
- echo $TRAVIS_COMMIT_LOG

0 commit comments

Comments
 (0)