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