From 3a68d5c5f9dc213c7de32450d8868ba5f580657f Mon Sep 17 00:00:00 2001 From: Jon Gjengset Date: Sat, 24 Nov 2018 16:06:31 -0500 Subject: [PATCH] Avoid double builds for tags This is pretty sad, as I'd like for build status to also be visible for release tags, but https://github.com/travis-ci/travis-ci/issues/2456#issuecomment-441393704 and https://github.com/travis-ci/travis-ci/issues/2200#issuecomment-441395545 make that unreasonable. So for the time being we'll settle with just doing CI for PRs and pushes to master. --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25def58..65106a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,10 @@ rust: - beta - nightly -# only test master and tagged releases on push # always test things that aren't pushes (like PRs) -if: type != push OR branch = master OR branch =~ /^v\d+\.\d+(\.\d+)?(-\S*)?$/ +# never test tags or pushes to non-master branches (wait for PR) +# https://github.com/travis-ci/travis-ci/issues/2200#issuecomment-441395545) +if: type != push OR (tag IS blank AND branch = master) before_script: - if [[ "$INTEGRATION" == "true" ]]; then