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