]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Auto merge of #40919 - GuillaumeGomez:fix-new-rustdoc, r=frewsxcv,steveklabnik
[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 running tests, these run the full test suite.
44     #
45     # Note that the compiler is compiled to target 10.8 here because the Xcode
46     # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
47     - env: >
48         RUST_CHECK_TARGET=check
49         RUST_CONFIGURE_ARGS=--build=x86_64-apple-darwin
50         SRC=.
51         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
52         SCCACHE_ERROR_LOG=/tmp/sccache.log
53         MACOSX_DEPLOYMENT_TARGET=10.8
54         MACOSX_STD_DEPLOYMENT_TARGET=10.7
55       os: osx
56       osx_image: xcode8.2
57       install: &osx_install_sccache >
58         travis_retry curl -o /usr/local/bin/sccache https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-24-sccache-x86_64-apple-darwin &&
59           chmod +x /usr/local/bin/sccache &&
60         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 &&
61           chmod +x /usr/local/bin/stamp
62     - env: >
63         RUST_CHECK_TARGET=check
64         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
65         SRC=.
66         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
67         SCCACHE_ERROR_LOG=/tmp/sccache.log
68         MACOSX_DEPLOYMENT_TARGET=10.8
69         MACOSX_STD_DEPLOYMENT_TARGET=10.7
70       os: osx
71       osx_image: xcode8.2
72       install: *osx_install_sccache
73
74     # OSX builders producing releases. These do not run the full test suite and
75     # just produce a bunch of artifacts.
76     #
77     # Note that these are running in the `xcode7` image instead of the
78     # `xcode8.2` image as above. That's because we want to build releases for
79     # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
80     - env: >
81         RUST_CHECK_TARGET=dist
82         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended"
83         SRC=.
84         DEPLOY=1
85         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
86         SCCACHE_ERROR_LOG=/tmp/sccache.log
87         MACOSX_DEPLOYMENT_TARGET=10.7
88       os: osx
89       osx_image: xcode7
90       install: *osx_install_sccache
91     - env: >
92         RUST_CHECK_TARGET=dist
93         RUST_CONFIGURE_ARGS="--target=aarch64-apple-ios,armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,x86_64-apple-ios --enable-extended"
94         SRC=.
95         DEPLOY=1
96         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
97         SCCACHE_ERROR_LOG=/tmp/sccache.log
98         MACOSX_DEPLOYMENT_TARGET=10.7
99       os: osx
100       osx_image: xcode7
101       install: *osx_install_sccache
102
103     # "alternate" deployments, these are "nightlies" but don't have assertions
104     # turned on, they're deployed to a different location primarily for projects
105     # which are stuck on nightly and don't want llvm assertions in the artifacts
106     # that they use.
107     - env: IMAGE=dist-x86-linux DEPLOY_ALT=1
108     - env: >
109         RUST_CHECK_TARGET=dist
110         RUST_CONFIGURE_ARGS="--enable-extended"
111         SRC=.
112         DEPLOY_ALT=1
113         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
114         SCCACHE_ERROR_LOG=/tmp/sccache.log
115         MACOSX_DEPLOYMENT_TARGET=10.7
116       os: osx
117       osx_image: xcode7
118       install: *osx_install_sccache
119
120 env:
121   global:
122     - SCCACHE_BUCKET=rust-lang-ci-sccache
123     - AWS_ACCESS_KEY_ID=AKIAIMX7VLAS3PZAVLUQ
124     # AWS_SECRET_ACCESS_KEY=...
125     - secure: "Pixhh0hXDqGCdOyLtGFjli3J2AtDWIpyb2btIrLe956nCBDRutRoMm6rv5DI9sFZN07Mms7VzNNvhc9wCW1y63JAm414d2Co7Ob8kWMZlz9l9t7ACHuktUiis8yr+S4Quq1Vqd6pqi7pf2J++UxC8R/uLeqVrubzr6+X7AbmEFE="
126
127 # Note that this is overridden on OSX builders
128 install: >
129   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 &&
130     chmod +x $HOME/stamp &&
131     export PATH=$PATH:$HOME
132
133 before_script:
134   - >
135       echo "#### Disk usage before running script:";
136       df -h;
137       du . | sort -nr | head -n100
138
139 script:
140   - >
141       if [ "$ALLOW_PR" = "" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
142           echo skipping, not a full build
143       else
144           stamp src/ci/init_repo.sh . "$HOME/rustsrc" &&
145           if [ "$TRAVIS_OS_NAME" = "osx" ]; then
146               stamp src/ci/run.sh;
147           else
148               stamp src/ci/docker/run.sh $IMAGE;
149           fi
150       fi
151
152 after_success:
153   - >
154       echo "#### Build successful; Disk usage after running script:";
155       df -h;
156       du . | sort -nr | head -n100
157
158 after_failure:
159   - >
160       echo "#### Build failed; Disk usage after running script:";
161       df -h;
162       du . | sort -nr | head -n100
163
164   # One of these is the linux sccache log, one is the OSX sccache log. Instead
165   # of worrying about what system we are just cat both. One of these commands
166   # will fail but that's ok, they'll both get executed.
167   - cat obj/tmp/sccache.log
168   - cat /tmp/sccache.log
169
170   # Random attempt at debugging currently. Just poking around in here to see if
171   # anything shows up.
172   - ls $HOME/Library/Logs/DiagnosticReports/
173
174   # attempt to debug anything killed by the oom killer on linux, just to see if
175   # it happened
176   - dmesg | grep -i kill
177
178 # Save tagged docker images we created and load them if they're available
179 # Travis saves caches whether the build failed or not, nuke rustsrc if
180 # the failure was while updating it (as it may be in an bad state)
181 # https://github.com/travis-ci/travis-ci/issues/4472
182 before_cache:
183   - docker history -q rust-ci |
184     grep -v missing |
185     xargs docker save |
186     gzip > $HOME/docker/rust-ci.tar.gz
187   - if [ ! -f $HOME/rustsrc/cache_valid1 ]; then
188         echo "WARNING rustsrc cache was invalid when saving";
189         rm -rf $HOME/rustsrc && mkdir $HOME/rustsrc;
190     fi
191 before_install:
192   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
193   - mkdir -p $HOME/rustsrc
194
195 notifications:
196   email: false
197
198 cache:
199   directories:
200     - $HOME/docker
201     - $HOME/rustsrc
202
203 before_deploy:
204   - mkdir -p deploy/$TRAVIS_COMMIT
205   - >
206       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
207           rm -rf build/dist/doc &&
208           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
209       else
210           rm -rf obj/build/dist/doc &&
211           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
212       fi
213
214 deploy:
215   - provider: s3
216     bucket: rust-lang-ci
217     skip_cleanup: true
218     local_dir: deploy
219     upload_dir: rustc-builds
220     acl: public_read
221     region: us-east-1
222     access_key_id: AKIAIPQVNYF2T3DTYIWQ
223     secret_access_key:
224       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
225     on:
226       branch: auto
227       condition: $DEPLOY = 1
228
229   # this is the same as the above deployment provider except that it uploads to
230   # a slightly different directory and has a different trigger
231   - provider: s3
232     bucket: rust-lang-ci
233     skip_cleanup: true
234     local_dir: deploy
235     upload_dir: rustc-builds-alt
236     acl: public_read
237     region: us-east-1
238     access_key_id: AKIAIPQVNYF2T3DTYIWQ
239     secret_access_key:
240       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
241     on:
242       branch: auto
243       condition: $DEPLOY_ALT = 1