diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-06-03 12:49:03 -0600 |
|---|---|---|
| committer | Tom Prince <tom.prince@twistedmatrix.com> | 2017-06-04 00:00:22 -0600 |
| commit | d2ff798f3a67a6781755d9e1e757db630ac94c0d (patch) | |
| tree | 9a1b7c042ee973d70e22a7c48f484ab3ff15e31e | |
| parent | abb50f2dfa2242cbbba1d84af364b92e28ccf77e (diff) | |
Don't run travis tests on master.
This saves us builders for more helpful purposes.
| -rw-r--r-- | .travis.yml | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 0f872d4ff99..40fecb3ee5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -152,16 +152,30 @@ before_script: echo "#### Disk usage before running script:"; df -h; du . | sort -nr | head -n100 + # If we are building a pull request, do the build if $ALLOW_PR == 1 + # Otherwise, do the build if we are on the auto branch, or the try branch and $ALLOW_TRY == 1 - > - if [[ "$ALLOW_PR" = "1" || "$TRAVIS_BRANCH" == "auto" || ( "$ALLOW_TRY" = "1" && "$TRAVIS_BRANCH" = "try" ) ]]; then + if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then + if [[ "$ALLOW_PR" == "1" ]]; then + SKIP_BUILD=false; + else + SKIP_BUILD=true; + fi + elif [[ "$TRAVIS_BRANCH" == "auto" || ( "$ALLOW_TRY" == "1" && "$TRAVIS_BRANCH" == "try" ) ]]; then + SKIP_BUILD=false; + else + SKIP_BUILD=true; + fi + + if [[ "$SKIP_BUILD" == true ]]; then + export RUN_SCRIPT="echo 'skipping, not a full build'"; + else RUN_SCRIPT="stamp src/ci/init_repo.sh . $HOME/rustsrc"; if [ "$TRAVIS_OS_NAME" = "osx" ]; then export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/run.sh"; else export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/docker/run.sh $IMAGE"; fi - else - export RUN_SCRIPT="echo 'skipping, not a full build'"; fi script: |
