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