File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -152,16 +152,30 @@ before_script:
152152 echo "#### Disk usage before running script:";
153153 df -h;
154154 du . | sort -nr | head -n100
155+ # If we are building a pull request, do the build if $ALLOW_PR == 1
156+ # Otherwise, do the build if we are on the auto branch, or the try branch and $ALLOW_TRY == 1
155157 - >
156- if [[ "$ALLOW_PR" = "1" || "$TRAVIS_BRANCH" == "auto" || ( "$ALLOW_TRY" = "1" && "$TRAVIS_BRANCH" = "try" ) ]]; then
158+ if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
159+ if [[ "$ALLOW_PR" == "1" ]]; then
160+ SKIP_BUILD=false;
161+ else
162+ SKIP_BUILD=true;
163+ fi
164+ elif [[ "$TRAVIS_BRANCH" == "auto" || ( "$ALLOW_TRY" == "1" && "$TRAVIS_BRANCH" == "try" ) ]]; then
165+ SKIP_BUILD=false;
166+ else
167+ SKIP_BUILD=true;
168+ fi
169+
170+ if [[ "$SKIP_BUILD" == true ]]; then
171+ export RUN_SCRIPT="echo 'skipping, not a full build'";
172+ else
157173 RUN_SCRIPT="stamp src/ci/init_repo.sh . $HOME/rustsrc";
158174 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
159175 export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/run.sh";
160176 else
161177 export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/docker/run.sh $IMAGE";
162178 fi
163- else
164- export RUN_SCRIPT="echo 'skipping, not a full build'";
165179 fi
166180
167181script :
You can’t perform that action at this time.
0 commit comments