From 5982cf886d02a122710a86e4e55686185273e161 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 26 Jun 2017 13:05:12 +0200 Subject: [PATCH] Introduce skip flag to avoid rerunning successful builds in later stages --- travis/build-helper.sh | 2 ++ travis/build.sh | 11 +++++++++++ travis/install_linux.sh | 6 ++++++ travis/install_osx.sh | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index ccc5a286d..e8658e180 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -33,6 +33,7 @@ run() { travis_fold start make make -j$N_JOBS travis_fold end make + touch skip.txt ;; Build2 | Build3 | Build4) @@ -41,6 +42,7 @@ run() { cd build make -j$N_JOBS travis_fold end make + touch skip.txt ;; TestAll) diff --git a/travis/build.sh b/travis/build.sh index 3baa1ee0f..fbf99d6cc 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -12,6 +12,17 @@ fi EXITCODE=42 +# Skip this run? +if [ -f build/skip.txt ] +then + # Remove flag s.t. tests will be executed + if [[ "$2" == "Build4" ]] + then + rm build/skip.txt + fi + exit 0 +fi + case $OS in linux) # Execute docker image on Linux diff --git a/travis/install_linux.sh b/travis/install_linux.sh index 911b6730f..c7ef04886 100755 --- a/travis/install_linux.sh +++ b/travis/install_linux.sh @@ -2,4 +2,10 @@ set -e +# Skip this run? +if [ -f build/skip.txt ] +then + exit 0 +fi + sudo apt-get install -qq -y docker diff --git a/travis/install_osx.sh b/travis/install_osx.sh index 091f9d1f8..e62065a50 100755 --- a/travis/install_osx.sh +++ b/travis/install_osx.sh @@ -23,6 +23,12 @@ install_brew_package() { fi } +# Skip this run? +if [ -f build/skip.txt ] +then + exit 0 +fi + # Update packages travis_fold start brew_update brew update