Make use of Travis's conditional jobs.

This commit is contained in:
kennytm 2017-09-16 19:28:08 +08:00
parent 3a7ab6cdd1
commit 9f763549c1
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C
1 changed files with 52 additions and 30 deletions

View File

@ -12,14 +12,19 @@ matrix:
fast_finish: true fast_finish: true
include: include:
# Images used in testing PR and try-build should be run first. # Images used in testing PR and try-build should be run first.
- env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1 - env: IMAGE=x86_64-gnu-llvm-3.7 RUST_BACKTRACE=1
- env: IMAGE=dist-x86_64-linux DEPLOY=1 ALLOW_TRY=1 if: type = pull_request OR branch = auto
- env: IMAGE=dist-x86_64-linux DEPLOY=1
if: branch = try OR branch = auto
# "alternate" deployments, these are "nightlies" but don't have assertions # "alternate" deployments, these are "nightlies" but don't have assertions
# turned on, they're deployed to a different location primarily for projects # turned on, they're deployed to a different location primarily for projects
# which are stuck on nightly and don't want llvm assertions in the artifacts # which are stuck on nightly and don't want llvm assertions in the artifacts
# that they use. # that they use.
- env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1 - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
if: branch = auto
- env: > - env: >
RUST_CHECK_TARGET=dist RUST_CHECK_TARGET=dist
RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler" RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler"
@ -31,6 +36,7 @@ matrix:
NO_LLVM_ASSERTIONS=1 NO_LLVM_ASSERTIONS=1
os: osx os: osx
osx_image: xcode7 osx_image: xcode7
if: branch = auto
# macOS builders. These are placed near the beginning because they are very # macOS builders. These are placed near the beginning because they are very
# slow to run. # slow to run.
@ -50,6 +56,8 @@ matrix:
NO_LLVM_ASSERTIONS=1 NO_LLVM_ASSERTIONS=1
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
if: branch = auto
- env: > - env: >
RUST_CHECK_TARGET=check RUST_CHECK_TARGET=check
RUST_CONFIGURE_ARGS=--build=i686-apple-darwin RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
@ -61,6 +69,7 @@ matrix:
NO_LLVM_ASSERTIONS=1 NO_LLVM_ASSERTIONS=1
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
if: branch = auto
# OSX builders producing releases. These do not run the full test suite and # OSX builders producing releases. These do not run the full test suite and
# just produce a bunch of artifacts. # just produce a bunch of artifacts.
@ -79,6 +88,8 @@ matrix:
NO_LLVM_ASSERTIONS=1 NO_LLVM_ASSERTIONS=1
os: osx os: osx
osx_image: xcode7 osx_image: xcode7
if: branch = auto
- env: > - env: >
RUST_CHECK_TARGET=dist RUST_CHECK_TARGET=dist
RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers --enable-profiler" RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended --enable-sanitizers --enable-profiler"
@ -90,42 +101,77 @@ matrix:
NO_LLVM_ASSERTIONS=1 NO_LLVM_ASSERTIONS=1
os: osx os: osx
osx_image: xcode7 osx_image: xcode7
if: branch = auto
# Linux builders, remaining docker images # Linux builders, remaining docker images
- env: IMAGE=arm-android - env: IMAGE=arm-android
if: branch = auto
- env: IMAGE=armhf-gnu - env: IMAGE=armhf-gnu
if: branch = auto
- env: IMAGE=cross DEPLOY=1 - env: IMAGE=cross DEPLOY=1
if: branch = auto
- env: IMAGE=dist-aarch64-linux DEPLOY=1 - env: IMAGE=dist-aarch64-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-android DEPLOY=1 - env: IMAGE=dist-android DEPLOY=1
if: branch = auto
- env: IMAGE=dist-arm-linux DEPLOY=1 - env: IMAGE=dist-arm-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-armhf-linux DEPLOY=1 - env: IMAGE=dist-armhf-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-armv7-linux DEPLOY=1 - env: IMAGE=dist-armv7-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-fuchsia DEPLOY=1 - env: IMAGE=dist-fuchsia DEPLOY=1
if: branch = auto
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1 - env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
if: branch = auto
- env: IMAGE=dist-i686-freebsd DEPLOY=1 - env: IMAGE=dist-i686-freebsd DEPLOY=1
if: branch = auto
- env: IMAGE=dist-i686-linux DEPLOY=1 - env: IMAGE=dist-i686-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-mips-linux DEPLOY=1 - env: IMAGE=dist-mips-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-mips64-linux DEPLOY=1 - env: IMAGE=dist-mips64-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-mips64el-linux DEPLOY=1 - env: IMAGE=dist-mips64el-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-mipsel-linux DEPLOY=1 - env: IMAGE=dist-mipsel-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-powerpc-linux DEPLOY=1 - env: IMAGE=dist-powerpc-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-powerpc64-linux DEPLOY=1 - env: IMAGE=dist-powerpc64-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-powerpc64le-linux DEPLOY=1 - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-s390x-linux DEPLOY=1 - env: IMAGE=dist-s390x-linux DEPLOY=1
if: branch = auto
- env: IMAGE=dist-x86_64-freebsd DEPLOY=1 - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
if: branch = auto
- env: IMAGE=dist-x86_64-musl DEPLOY=1 - env: IMAGE=dist-x86_64-musl DEPLOY=1
if: branch = auto
- env: IMAGE=dist-x86_64-netbsd DEPLOY=1 - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
if: branch = auto
- env: IMAGE=asmjs - env: IMAGE=asmjs
if: branch = auto
- env: IMAGE=i686-gnu - env: IMAGE=i686-gnu
if: branch = auto
- env: IMAGE=i686-gnu-nopt - env: IMAGE=i686-gnu-nopt
if: branch = auto
# - env: IMAGE=wasm32 issue 42646 # - env: IMAGE=wasm32 issue 42646
# if: branch = auto
- env: IMAGE=x86_64-gnu - env: IMAGE=x86_64-gnu
if: branch = auto
- env: IMAGE=x86_64-gnu-full-bootstrap - env: IMAGE=x86_64-gnu-full-bootstrap
if: branch = auto
- env: IMAGE=x86_64-gnu-aux - env: IMAGE=x86_64-gnu-aux
if: branch = auto
- env: IMAGE=x86_64-gnu-debug - env: IMAGE=x86_64-gnu-debug
if: branch = auto
- env: IMAGE=x86_64-gnu-nopt - env: IMAGE=x86_64-gnu-nopt
if: branch = auto
- env: IMAGE=x86_64-gnu-distcheck - env: IMAGE=x86_64-gnu-distcheck
if: branch = auto
- env: IMAGE=x86_64-gnu-incremental - env: IMAGE=x86_64-gnu-incremental
if: branch = auto
env: env:
global: global:
@ -135,34 +181,11 @@ env:
- secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo=" - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
before_install: before_install:
# If we are building a pull request, do the build if $ALLOW_PR == 1 - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
# Otherwise, do the build if we are on the auto branch, or the try branch and $ALLOW_TRY == 1
- >
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
if [[ "$ALLOW_PR" == "1" ]]; then
export SKIP_BUILD=false;
else
export SKIP_BUILD=true;
fi;
elif [[ "$TRAVIS_BRANCH" == "auto" || ( "$ALLOW_TRY" == "1" && "$TRAVIS_BRANCH" == "try" ) ]]; then
export SKIP_BUILD=false;
else
export SKIP_BUILD=true;
fi
- >
if [[ "$SKIP_BUILD" == false ]]; then
zcat $HOME/docker/rust-ci.tar.gz | docker load || true
fi
- mkdir -p $HOME/rustsrc - mkdir -p $HOME/rustsrc
install: install:
- > - case "$TRAVIS_OS_NAME" in
if [[ "$SKIP_BUILD" == true ]]; then
echo echo skipping, not a full build > $HOME/stamp &&
chmod +x $HOME/stamp &&
export PATH=$PATH:$HOME;
else
case "$TRAVIS_OS_NAME" in
linux) linux)
travis_retry curl -fo $HOME/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl && travis_retry curl -fo $HOME/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl &&
chmod +x $HOME/stamp && chmod +x $HOME/stamp &&
@ -179,7 +202,6 @@ install:
chmod +x /usr/local/bin/stamp chmod +x /usr/local/bin/stamp
;; ;;
esac esac
fi
before_script: before_script:
- > - >
@ -284,7 +306,7 @@ deploy:
secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0=" secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
on: on:
branch: try branch: try
condition: $DEPLOY = 1 && $ALLOW_TRY = 1 condition: $DEPLOY = 1
# this is the same as the above deployment provider except that it uploads to # this is the same as the above deployment provider except that it uploads to
# a slightly different directory and has a different trigger # a slightly different directory and has a different trigger