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