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