]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Auto merge of #40432 - alexcrichton:rollup, r=alexcrichton
[rust.git] / .travis.yml
1 language: minimal
2 sudo: required
3 dist: trusty
4 services:
5   - docker
6
7 git:
8   depth: 1
9   submodules: false
10
11 matrix:
12   fast_finish: true
13   include:
14     # Linux builders, all docker images
15     - env: IMAGE=arm-android
16     - env: IMAGE=armhf-gnu
17     - env: IMAGE=cross DEPLOY=1
18     - env: IMAGE=dist-android DEPLOY=1
19     - env: IMAGE=dist-arm-linux DEPLOY=1
20     - env: IMAGE=dist-armv7-aarch64-linux DEPLOY=1
21     - env: IMAGE=dist-freebsd DEPLOY=1
22     - env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
23     - env: IMAGE=dist-fuchsia DEPLOY=1
24     - env: IMAGE=dist-mips-linux DEPLOY=1
25     - env: IMAGE=dist-mips64-linux DEPLOY=1
26     - env: IMAGE=dist-powerpc-linux DEPLOY=1
27     - env: IMAGE=dist-powerpc64-linux DEPLOY=1
28     - env: IMAGE=dist-s390x-linux-netbsd DEPLOY=1
29     - env: IMAGE=dist-x86-linux DEPLOY=1
30     - env: IMAGE=dist-x86_64-musl DEPLOY=1
31     - env: IMAGE=emscripten
32     - env: IMAGE=i686-gnu
33     - env: IMAGE=i686-gnu-nopt
34     - env: IMAGE=x86_64-gnu
35     - env: IMAGE=x86_64-gnu-full-bootstrap
36     - env: IMAGE=x86_64-gnu-aux
37     - env: IMAGE=x86_64-gnu-debug
38     - env: IMAGE=x86_64-gnu-nopt
39     - env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
40     - env: IMAGE=x86_64-gnu-distcheck
41     - env: IMAGE=x86_64-gnu-incremental
42
43     # OSX builders
44     - env: >
45         RUST_CHECK_TARGET=check
46         RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin
47         SRC=.
48         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
49       os: osx
50       osx_image: xcode8.2
51       install: &osx_install_sccache >
52         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-apple-darwin &&
53           chmod +x /usr/local/bin/sccache
54     - env: >
55         RUST_CHECK_TARGET=check
56         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
57         SRC=.
58         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
59       os: osx
60       osx_image: xcode8.2
61       install: *osx_install_sccache
62
63     - env: >
64         RUST_CHECK_TARGET=dist
65         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
66         SRC=.
67         DEPLOY=1
68         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
69       os: osx
70       osx_image: xcode8.2
71       install: >
72         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-02-25-sccache-x86_64-apple-darwin &&
73           chmod +x /usr/local/bin/sccache
74     - env: >
75         RUST_CHECK_TARGET=dist
76         RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
77         SRC=.
78         DEPLOY=1
79         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
80       os: osx
81       osx_image: xcode8.2
82       install: *osx_install_sccache
83
84     # "alternate" deployments, these are "nightlies" but don't have assertions
85     # turned on, they're deployed to a different location primarily for projects
86     # which are stuck on nightly and don't want llvm assertions in the artifacts
87     # that they use.
88     - env: IMAGE=dist-x86-linux DEPLOY_ALT=1
89     - env: >
90         RUST_CHECK_TARGET=dist
91         RUST_CONFIGURE_ARGS="--enable-extended"
92         SRC=.
93         DEPLOY_ALT=1
94         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
95       os: osx
96       osx_image: xcode8.2
97       install: *osx_install_sccache
98
99 env:
100   global:
101     - SCCACHE_BUCKET=rust-lang-ci-sccache
102     - AWS_ACCESS_KEY_ID=AKIAIMX7VLAS3PZAVLUQ
103     # AWS_SECRET_ACCESS_KEY=...
104     - secure: "Pixhh0hXDqGCdOyLtGFjli3J2AtDWIpyb2btIrLe956nCBDRutRoMm6rv5DI9sFZN07Mms7VzNNvhc9wCW1y63JAm414d2Co7Ob8kWMZlz9l9t7ACHuktUiis8yr+S4Quq1Vqd6pqi7pf2J++UxC8R/uLeqVrubzr6+X7AbmEFE="
105
106 before_script:
107   - >
108       echo "#### Disk usage before running script:";
109       df -h;
110       du . | sort -nr | head -n100
111
112 script:
113   - >
114       if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
115           echo skipping, not a full build;
116       elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
117           travis_retry sh -c 'git submodule deinit -f . && git submodule update --init' &&
118           src/ci/run.sh;
119       else
120           travis_retry sh -c 'git submodule deinit -f . && git submodule update --init' &&
121           src/ci/docker/run.sh $IMAGE;
122       fi
123
124 after_success:
125   - >
126       echo "#### Build successful; Disk usage after running script:";
127       df -h;
128       du . | sort -nr | head -n100
129
130 after_failure:
131   - >
132       echo "#### Build failed; Disk usage after running script:";
133       df -h;
134       du . | sort -nr | head -n100
135   - cat obj/tmp/sccache.log
136
137 # Save tagged docker images we created and load them if they're available
138 before_cache:
139   - docker history -q rust-ci |
140     grep -v missing |
141     xargs docker save |
142     gzip > $HOME/docker/rust-ci.tar.gz
143 before_install:
144   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
145
146 notifications:
147   email: false
148
149 cache:
150   directories:
151     - $HOME/docker
152
153 before_deploy:
154   - mkdir -p deploy/$TRAVIS_COMMIT
155   - >
156       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
157           rm -rf build/dist/doc &&
158           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
159       else
160           rm -rf obj/build/dist/doc &&
161           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
162       fi
163
164 deploy:
165   - provider: s3
166     bucket: rust-lang-ci
167     skip_cleanup: true
168     local_dir: deploy
169     upload_dir: rustc-builds
170     acl: public_read
171     region: us-east-1
172     access_key_id: AKIAIPQVNYF2T3DTYIWQ
173     secret_access_key:
174       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
175     on:
176       branch: auto
177       condition: $DEPLOY = 1
178
179   # this is the same as the above deployment provider except that it uploads to
180   # a slightly different directory and has a different trigger
181   - provider: s3
182     bucket: rust-lang-ci
183     skip_cleanup: true
184     local_dir: deploy
185     upload_dir: rustc-builds-alt
186     acl: public_read
187     region: us-east-1
188     access_key_id: AKIAIPQVNYF2T3DTYIWQ
189     secret_access_key:
190       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
191     on:
192       branch: auto
193       condition: $DEPLOY_ALT = 1