From d3ecc3d695f33d90d6c4e61f3d7ceb57f44eb200 Mon Sep 17 00:00:00 2001 From: Chun Kuan Lee Date: Sat, 15 Sep 2018 18:00:40 +0800 Subject: [PATCH] travis: Save cache on build error --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c1d264e25f..3bb892648f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,13 @@ env: - WINEDEBUG=fixme-all - DOCKER_PACKAGES="build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache" before_install: - - set -o errexit; source .travis/test_03_before_install.sh + - set -o errexit; if ! source .travis/test_03_before_install.sh; then set +o errexit; false; fi install: - - set -o errexit; source .travis/test_04_install.sh + - set -o errexit; if ! source .travis/test_04_install.sh; then set +o errexit; false; fi before_script: - - set -o errexit; source .travis/test_05_before_script.sh + - set -o errexit; if ! source .travis/test_05_before_script.sh; then set +o errexit; false; fi script: - - if [ $SECONDS -gt 1200 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script.sh; fi + - if [ $SECONDS -gt 1200 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; if ! source .travis/test_06_script.sh; then set +o errexit; false; fi; fi after_script: - echo $TRAVIS_COMMIT_RANGE - echo $TRAVIS_COMMIT_LOG