]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Rollup merge of #42616 - estebank:span-fix, r=nikomatsakis
[rust.git] / .travis.yml
1 language: generic
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-aarch64-linux DEPLOY=1
19     - env: IMAGE=dist-android DEPLOY=1
20     - env: IMAGE=dist-arm-linux DEPLOY=1
21     - env: IMAGE=dist-armhf-linux DEPLOY=1
22     - env: IMAGE=dist-armv7-linux DEPLOY=1
23     - env: IMAGE=dist-fuchsia DEPLOY=1
24     - env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
25     - env: IMAGE=dist-i686-freebsd DEPLOY=1
26     - env: IMAGE=dist-i686-linux DEPLOY=1
27     - env: IMAGE=dist-mips-linux DEPLOY=1
28     - env: IMAGE=dist-mips64-linux DEPLOY=1
29     - env: IMAGE=dist-mips64el-linux DEPLOY=1
30     - env: IMAGE=dist-mipsel-linux DEPLOY=1
31     - env: IMAGE=dist-powerpc-linux DEPLOY=1
32     - env: IMAGE=dist-powerpc64-linux DEPLOY=1
33     - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
34     - env: IMAGE=dist-s390x-linux DEPLOY=1
35     - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
36     - env: IMAGE=dist-x86_64-linux DEPLOY=1 ALLOW_TRY=1
37     - env: IMAGE=dist-x86_64-musl DEPLOY=1
38     - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
39     - env: IMAGE=emscripten
40     - env: IMAGE=i686-gnu
41     - env: IMAGE=i686-gnu-nopt
42     - env: IMAGE=x86_64-gnu
43     - env: IMAGE=x86_64-gnu-full-bootstrap
44     - env: IMAGE=x86_64-gnu-aux
45     - env: IMAGE=x86_64-gnu-debug
46     - env: IMAGE=x86_64-gnu-nopt
47     - env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
48     - env: IMAGE=x86_64-gnu-distcheck
49     - env: IMAGE=x86_64-gnu-incremental
50
51     # OSX builders running tests, these run the full test suite.
52     #
53     # Note that the compiler is compiled to target 10.8 here because the Xcode
54     # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
55     - env: >
56         RUST_CHECK_TARGET=check
57         RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
58         SRC=.
59         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
60         SCCACHE_ERROR_LOG=/tmp/sccache.log
61         MACOSX_DEPLOYMENT_TARGET=10.8
62         MACOSX_STD_DEPLOYMENT_TARGET=10.7
63       os: osx
64       osx_image: xcode8.2
65       install: &osx_install_sccache >
66         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-05-12-sccache-x86_64-apple-darwin &&
67           chmod +x /usr/local/bin/sccache &&
68         travis_retry curl -o /usr/local/bin/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
69           chmod +x /usr/local/bin/stamp
70     - env: >
71         RUST_CHECK_TARGET=check
72         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
73         SRC=.
74         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
75         SCCACHE_ERROR_LOG=/tmp/sccache.log
76         MACOSX_DEPLOYMENT_TARGET=10.8
77         MACOSX_STD_DEPLOYMENT_TARGET=10.7
78       os: osx
79       osx_image: xcode8.2
80       install: *osx_install_sccache
81
82     # OSX builders producing releases. These do not run the full test suite and
83     # just produce a bunch of artifacts.
84     #
85     # Note that these are running in the `xcode7` image instead of the
86     # `xcode8.2` image as above. That's because we want to build releases for
87     # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
88     - env: >
89         RUST_CHECK_TARGET=dist
90         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended --enable-profiler"
91         SRC=.
92         DEPLOY=1
93         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
94         SCCACHE_ERROR_LOG=/tmp/sccache.log
95         MACOSX_DEPLOYMENT_TARGET=10.7
96       os: osx
97       osx_image: xcode7
98       install:
99         - travis_retry brew update
100         - travis_retry brew install xz
101         - *osx_install_sccache
102     - env: >
103         RUST_CHECK_TARGET=dist
104         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"
105         SRC=.
106         DEPLOY=1
107         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
108         SCCACHE_ERROR_LOG=/tmp/sccache.log
109         MACOSX_DEPLOYMENT_TARGET=10.7
110       os: osx
111       osx_image: xcode7
112       install:
113         - travis_retry brew update
114         - travis_retry brew install xz
115         - *osx_install_sccache
116
117     # "alternate" deployments, these are "nightlies" but don't have assertions
118     # turned on, they're deployed to a different location primarily for projects
119     # which are stuck on nightly and don't want llvm assertions in the artifacts
120     # that they use.
121     - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
122     - env: >
123         RUST_CHECK_TARGET=dist
124         RUST_CONFIGURE_ARGS="--enable-extended"
125         SRC=.
126         DEPLOY_ALT=1
127         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
128         SCCACHE_ERROR_LOG=/tmp/sccache.log
129         MACOSX_DEPLOYMENT_TARGET=10.7
130       os: osx
131       osx_image: xcode7
132       install:
133         - travis_retry brew update
134         - travis_retry brew install xz
135         - *osx_install_sccache
136
137 env:
138   global:
139     - SCCACHE_BUCKET=rust-lang-ci-sccache
140     - AWS_ACCESS_KEY_ID=AKIAIMX7VLAS3PZAVLUQ
141     # AWS_SECRET_ACCESS_KEY=...
142     - secure: "Pixhh0hXDqGCdOyLtGFjli3J2AtDWIpyb2btIrLe956nCBDRutRoMm6rv5DI9sFZN07Mms7VzNNvhc9wCW1y63JAm414d2Co7Ob8kWMZlz9l9t7ACHuktUiis8yr+S4Quq1Vqd6pqi7pf2J++UxC8R/uLeqVrubzr6+X7AbmEFE="
143
144 # Note that this is overridden on OSX builders
145 install: >
146   travis_retry curl -o $HOME/stamp https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl &&
147     chmod +x $HOME/stamp &&
148     export PATH=$PATH:$HOME
149
150 before_script:
151   - >
152       echo "#### Disk usage before running script:";
153       df -h;
154       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
157   - >
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
173           RUN_SCRIPT="stamp src/ci/init_repo.sh . $HOME/rustsrc";
174           if [ "$TRAVIS_OS_NAME" = "osx" ]; then
175               export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/run.sh";
176           else
177               export RUN_SCRIPT="$RUN_SCRIPT && stamp src/ci/docker/run.sh $IMAGE";
178           fi
179       fi
180
181 script:
182   - sh -x -c "$RUN_SCRIPT"
183
184 after_success:
185   - >
186       echo "#### Build successful; Disk usage after running script:";
187       df -h;
188       du . | sort -nr | head -n100
189
190 after_failure:
191   - >
192       echo "#### Build failed; Disk usage after running script:";
193       df -h;
194       du . | sort -nr | head -n100
195
196   # One of these is the linux sccache log, one is the OSX sccache log. Instead
197   # of worrying about what system we are just cat both. One of these commands
198   # will fail but that's ok, they'll both get executed.
199   - cat obj/tmp/sccache.log
200   - cat /tmp/sccache.log
201
202   # Random attempt at debugging currently. Just poking around in here to see if
203   # anything shows up.
204   - ls $HOME/Library/Logs/DiagnosticReports/
205
206   # attempt to debug anything killed by the oom killer on linux, just to see if
207   # it happened
208   - dmesg | grep -i kill
209
210 # Save tagged docker images we created and load them if they're available
211 # Travis saves caches whether the build failed or not, nuke rustsrc if
212 # the failure was while updating it (as it may be in a bad state)
213 # https://github.com/travis-ci/travis-ci/issues/4472
214 before_cache:
215   - docker history -q rust-ci |
216     grep -v missing |
217     xargs docker save |
218     gzip > $HOME/docker/rust-ci.tar.gz
219 before_install:
220   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
221   - mkdir -p $HOME/rustsrc
222
223 notifications:
224   email: false
225
226 cache:
227   directories:
228     - $HOME/docker
229
230 before_deploy:
231   - mkdir -p deploy/$TRAVIS_COMMIT
232   - >
233       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
234           rm -rf build/dist/doc &&
235           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
236       else
237           rm -rf obj/build/dist/doc &&
238           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
239       fi
240
241 deploy:
242   - provider: s3
243     bucket: rust-lang-ci
244     skip_cleanup: true
245     local_dir: deploy
246     upload_dir: rustc-builds
247     acl: public_read
248     region: us-east-1
249     access_key_id: AKIAIPQVNYF2T3DTYIWQ
250     secret_access_key:
251       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
252     on:
253       branch: auto
254       condition: $DEPLOY = 1
255
256   - provider: s3
257     bucket: rust-lang-ci
258     skip_cleanup: true
259     local_dir: deploy
260     upload_dir: rustc-builds-try
261     acl: public_read
262     region: us-east-1
263     access_key_id: AKIAIPQVNYF2T3DTYIWQ
264     secret_access_key:
265       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
266     on:
267       branch: try
268       condition: $DEPLOY = 1 && $ALLOW_TRY = 1
269
270   # this is the same as the above deployment provider except that it uploads to
271   # a slightly different directory and has a different trigger
272   - provider: s3
273     bucket: rust-lang-ci
274     skip_cleanup: true
275     local_dir: deploy
276     upload_dir: rustc-builds-alt
277     acl: public_read
278     region: us-east-1
279     access_key_id: AKIAIPQVNYF2T3DTYIWQ
280     secret_access_key:
281       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
282     on:
283       branch: auto
284       condition: $DEPLOY_ALT = 1