]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Auto merge of #46144 - nrc:rls-update, r=alexcrichton
[rust.git] / .travis.yml
1 language: shell
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     # Images used in testing PR and try-build should be run first.
15     - env: IMAGE=x86_64-gnu-llvm-3.9 RUST_BACKTRACE=1
16       if: type = pull_request OR branch = auto
17
18     - env: IMAGE=dist-x86_64-linux DEPLOY=1
19       if: branch = try OR branch = auto
20
21     # "alternate" deployments, these are "nightlies" but have LLVM assertions
22     # turned on, they're deployed to a different location primarily for
23     # additional testing.
24     - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
25       if: branch = try OR branch = auto
26
27     # FIXME: The macOS dist images are temporarily disabled until Travis bug is fixed
28     # https://github.com/travis-ci/travis-ci/issues/8821
29     - env: >
30         RUST_CHECK_TARGET=dist
31         RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler"
32         SRC=.
33         DEPLOY_ALT=1
34         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
35         SCCACHE_ERROR_LOG=/tmp/sccache.log
36         MACOSX_DEPLOYMENT_TARGET=10.7
37         NO_LLVM_ASSERTIONS=1
38         NO_DEBUG_ASSERTIONS=1
39       os: osx
40       osx_image: xcode7.3
41       if: branch = disabled
42
43     # macOS builders. These are placed near the beginning because they are very
44     # slow to run.
45
46     # OSX builders running tests, these run the full test suite.
47     #
48     # Note that the compiler is compiled to target 10.8 here because the Xcode
49     # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
50     - env: >
51         RUST_CHECK_TARGET=check
52         RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
53         SRC=.
54         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
55         SCCACHE_ERROR_LOG=/tmp/sccache.log
56         MACOSX_DEPLOYMENT_TARGET=10.8
57         MACOSX_STD_DEPLOYMENT_TARGET=10.7
58         NO_LLVM_ASSERTIONS=1
59         NO_DEBUG_ASSERTIONS=1
60       os: osx
61       osx_image: xcode8.3
62       if: branch = auto
63
64     - env: >
65         RUST_CHECK_TARGET=check
66         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
67         SRC=.
68         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
69         SCCACHE_ERROR_LOG=/tmp/sccache.log
70         MACOSX_DEPLOYMENT_TARGET=10.8
71         MACOSX_STD_DEPLOYMENT_TARGET=10.7
72         NO_LLVM_ASSERTIONS=1
73         NO_DEBUG_ASSERTIONS=1
74       os: osx
75       osx_image: xcode8.3
76       if: branch = auto
77
78     # OSX builders producing releases. These do not run the full test suite and
79     # just produce a bunch of artifacts.
80     #
81     # Note that these are running in the `xcode7` image instead of the
82     # `xcode8.2` image as above. That's because we want to build releases for
83     # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
84     - env: >
85         RUST_CHECK_TARGET=dist
86         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-extended --enable-profiler"
87         SRC=.
88         DEPLOY=1
89         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
90         SCCACHE_ERROR_LOG=/tmp/sccache.log
91         MACOSX_DEPLOYMENT_TARGET=10.7
92         NO_LLVM_ASSERTIONS=1
93         NO_DEBUG_ASSERTIONS=1
94       os: osx
95       osx_image: xcode7.3
96       if: branch = disabled
97
98     - env: >
99         RUST_CHECK_TARGET=dist
100         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"
101         SRC=.
102         DEPLOY=1
103         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
104         SCCACHE_ERROR_LOG=/tmp/sccache.log
105         MACOSX_DEPLOYMENT_TARGET=10.7
106         NO_LLVM_ASSERTIONS=1
107         NO_DEBUG_ASSERTIONS=1
108       os: osx
109       osx_image: xcode7.3
110       if: branch = disabled
111
112     # Linux builders, remaining docker images
113     - env: IMAGE=arm-android
114       if: branch = auto
115     - env: IMAGE=armhf-gnu
116       if: branch = auto
117     - env: IMAGE=cross DEPLOY=1
118       if: branch = auto
119     - env: IMAGE=cross2 DEPLOY=1
120       if: branch = auto
121     - env: IMAGE=dist-aarch64-linux DEPLOY=1
122       if: branch = auto
123     - env: IMAGE=dist-android DEPLOY=1
124       if: branch = auto
125     - env: IMAGE=dist-arm-linux DEPLOY=1
126       if: branch = auto
127     - env: IMAGE=dist-armhf-linux DEPLOY=1
128       if: branch = auto
129     - env: IMAGE=dist-armv7-linux DEPLOY=1
130       if: branch = auto
131     - env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
132       if: branch = auto
133     - env: IMAGE=dist-i686-freebsd DEPLOY=1
134       if: branch = auto
135     - env: IMAGE=dist-i686-linux DEPLOY=1
136       if: branch = auto
137     - env: IMAGE=dist-mips-linux DEPLOY=1
138       if: branch = auto
139     - env: IMAGE=dist-mips64-linux DEPLOY=1
140       if: branch = auto
141     - env: IMAGE=dist-mips64el-linux DEPLOY=1
142       if: branch = auto
143     - env: IMAGE=dist-mipsel-linux DEPLOY=1
144       if: branch = auto
145     - env: IMAGE=dist-powerpc-linux DEPLOY=1
146       if: branch = auto
147     - env: IMAGE=dist-powerpc64-linux DEPLOY=1
148       if: branch = auto
149     - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
150       if: branch = auto
151     - env: IMAGE=dist-s390x-linux DEPLOY=1
152       if: branch = auto
153     - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
154       if: branch = auto
155     - env: IMAGE=dist-x86_64-musl DEPLOY=1
156       if: branch = auto
157     - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
158       if: branch = auto
159     - env: IMAGE=asmjs
160       if: branch = auto
161     - env: IMAGE=i686-gnu
162       if: branch = auto
163     - env: IMAGE=i686-gnu-nopt
164       if: branch = auto
165     - env: IMAGE=wasm32-unknown
166       if: branch = auto
167     - env: IMAGE=x86_64-gnu
168       if: branch = auto
169     - env: IMAGE=x86_64-gnu-full-bootstrap
170       if: branch = auto
171     - env: IMAGE=x86_64-gnu-aux
172       if: branch = auto
173     - env: IMAGE=x86_64-gnu-cargotest
174       if: branch = auto
175     - env: IMAGE=x86_64-gnu-debug
176       if: branch = auto
177     - env: IMAGE=x86_64-gnu-nopt
178       if: branch = auto
179     - env: IMAGE=x86_64-gnu-distcheck
180       if: branch = auto
181     - env: IMAGE=x86_64-gnu-incremental
182       if: branch = auto
183
184 env:
185   global:
186     - SCCACHE_BUCKET=rust-lang-ci-sccache2
187     - SCCACHE_REGION=us-west-1
188     - AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
189     # AWS_SECRET_ACCESS_KEY=...
190     - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
191
192 before_install:
193   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
194   - mkdir -p $HOME/rustsrc
195
196 install:
197   - case "$TRAVIS_OS_NAME" in
198         linux)
199           travis_retry curl -fo $HOME/stamp https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-17-stamp-x86_64-unknown-linux-musl &&
200             chmod +x $HOME/stamp &&
201             export PATH=$PATH:$HOME
202           ;;
203         osx)
204           if [[ "$RUST_CHECK_TARGET" == dist ]]; then
205             travis_retry brew update &&
206             travis_retry brew install xz;
207           fi &&
208           travis_retry curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-05-12-sccache-x86_64-apple-darwin &&
209             chmod +x /usr/local/bin/sccache &&
210           travis_retry curl -fo /usr/local/bin/stamp https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin &&
211             chmod +x /usr/local/bin/stamp
212           ;;
213     esac
214
215 before_script:
216   - >
217       echo "#### Disk usage before running script:";
218       df -h;
219       du . | sort -nr | head -n100
220   - >
221       RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
222       if [ "$TRAVIS_OS_NAME" = "osx" ]; then
223           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
224       else
225           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
226       fi
227
228 # Log time information from this machine and an external machine for insight into possible
229 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
230 script:
231   - >
232       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
233   - stamp sh -x -c "$RUN_SCRIPT"
234   - >
235       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
236
237 after_success:
238   - >
239       echo "#### Build successful; Disk usage after running script:";
240       df -h;
241       du . | sort -nr | head -n100
242
243 after_failure:
244   - >
245       echo "#### Build failed; Disk usage after running script:";
246       df -h;
247       du . | sort -nr | head -n100
248
249   # One of these is the linux sccache log, one is the OSX sccache log. Instead
250   # of worrying about what system we are just cat both. One of these commands
251   # will fail but that's ok, they'll both get executed.
252   - cat obj/tmp/sccache.log
253   - cat /tmp/sccache.log
254
255   # Random attempt at debugging currently. Just poking around in here to see if
256   # anything shows up.
257   - ls -lat $HOME/Library/Logs/DiagnosticReports/
258   - find $HOME/Library/Logs/DiagnosticReports
259       -type f
260       -not -name '*.stage2-*.crash'
261       -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
262       -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
263       -exec head -750 {} \;
264       -exec echo travis_fold":"end:crashlog \;
265
266   # attempt to debug anything killed by the oom killer on linux, just to see if
267   # it happened
268   - dmesg | grep -i kill
269
270 # Save tagged docker images we created and load them if they're available
271 # Travis saves caches whether the build failed or not, nuke rustsrc if
272 # the failure was while updating it (as it may be in a bad state)
273 # https://github.com/travis-ci/travis-ci/issues/4472
274 before_cache:
275   - docker history -q rust-ci |
276     grep -v missing |
277     xargs docker save |
278     gzip > $HOME/docker/rust-ci.tar.gz
279
280 notifications:
281   email: false
282
283 cache:
284   directories:
285     - $HOME/docker
286
287 before_deploy:
288   - mkdir -p deploy/$TRAVIS_COMMIT
289   - >
290       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
291           rm -rf build/dist/doc &&
292           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
293       else
294           rm -rf obj/build/dist/doc &&
295           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
296       fi
297   - travis_retry gem update --system
298
299 deploy:
300   - provider: s3
301     bucket: rust-lang-ci2
302     skip_cleanup: true
303     local_dir: deploy
304     upload_dir: rustc-builds
305     acl: public_read
306     region: us-west-1
307     access_key_id: AKIAJVBODR3IA4O72THQ
308     secret_access_key:
309       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
310     on:
311       branch: auto
312       condition: $DEPLOY = 1
313
314   # this is the same as the above deployment provider except that it uploads to
315   # a slightly different directory and has a different trigger
316   - provider: s3
317     bucket: rust-lang-ci2
318     skip_cleanup: true
319     local_dir: deploy
320     upload_dir: rustc-builds-alt
321     acl: public_read
322     region: us-west-1
323     access_key_id: AKIAJVBODR3IA4O72THQ
324     secret_access_key:
325       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
326     on:
327       branch: auto
328       condition: $DEPLOY_ALT = 1
329
330   # These two providers are the same as the two above, except deploy on the
331   # try branch. Travis does not appear to provide a way to use "or" in these
332   # conditions.
333   - provider: s3
334     bucket: rust-lang-ci2
335     skip_cleanup: true
336     local_dir: deploy
337     upload_dir: rustc-builds
338     acl: public_read
339     region: us-west-1
340     access_key_id: AKIAJVBODR3IA4O72THQ
341     secret_access_key:
342       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
343     on:
344       branch: try
345       condition: $DEPLOY = 1
346
347   - provider: s3
348     bucket: rust-lang-ci2
349     skip_cleanup: true
350     local_dir: deploy
351     upload_dir: rustc-builds-alt
352     acl: public_read
353     region: us-west-1
354     access_key_id: AKIAJVBODR3IA4O72THQ
355     secret_access_key:
356       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
357     on:
358       branch: try
359       condition: $DEPLOY_ALT = 1