]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Use 64 bits emulator to run android tests
[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       else
138           stamp src/ci/init_repo.sh . "$HOME/rustsrc" &&
139           if [ "$TRAVIS_OS_NAME" = "osx" ]; then
140               stamp src/ci/run.sh;
141           else
142               stamp src/ci/docker/run.sh $IMAGE;
143           fi
144       fi
145
146 after_success:
147   - >
148       echo "#### Build successful; Disk usage after running script:";
149       df -h;
150       du . | sort -nr | head -n100
151
152 after_failure:
153   - >
154       echo "#### Build failed; Disk usage after running script:";
155       df -h;
156       du . | sort -nr | head -n100
157
158   # One of these is the linux sccache log, one is the OSX sccache log. Instead
159   # of worrying about what system we are just cat both. One of these commands
160   # will fail but that's ok, they'll both get executed.
161   - cat obj/tmp/sccache.log
162   - cat /tmp/sccache.log
163
164   # Random attempt at debugging currently. Just poking around in here to see if
165   # anything shows up.
166   - ls $HOME/Library/Logs/DiagnosticReports/
167
168   # attempt to debug anything killed by the oom killer on linux, just to see if
169   # it happened
170   - dmesg | grep -i kill
171
172 # Save tagged docker images we created and load them if they're available
173 # Travis saves caches whether the build failed or not, nuke rustsrc if
174 # the failure was while updating it (as it may be in an bad state)
175 # https://github.com/travis-ci/travis-ci/issues/4472
176 before_cache:
177   - docker history -q rust-ci |
178     grep -v missing |
179     xargs docker save |
180     gzip > $HOME/docker/rust-ci.tar.gz
181   - if [ ! -f $HOME/rustsrc/cache_valid1 ]; then
182         echo "WARNING rustsrc cache was invalid when saving";
183         rm -rf $HOME/rustsrc && mkdir $HOME/rustsrc;
184     fi
185 before_install:
186   - zcat $HOME/docker/rust-ci.tar.gz | docker load || true
187   - mkdir -p $HOME/rustsrc
188
189 notifications:
190   email: false
191
192 cache:
193   directories:
194     - $HOME/docker
195     - $HOME/rustsrc
196
197 before_deploy:
198   - mkdir -p deploy/$TRAVIS_COMMIT
199   - >
200       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
201           rm -rf build/dist/doc &&
202           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
203       else
204           rm -rf obj/build/dist/doc &&
205           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
206       fi
207
208 deploy:
209   - provider: s3
210     bucket: rust-lang-ci
211     skip_cleanup: true
212     local_dir: deploy
213     upload_dir: rustc-builds
214     acl: public_read
215     region: us-east-1
216     access_key_id: AKIAIPQVNYF2T3DTYIWQ
217     secret_access_key:
218       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
219     on:
220       branch: auto
221       condition: $DEPLOY = 1
222
223   # this is the same as the above deployment provider except that it uploads to
224   # a slightly different directory and has a different trigger
225   - provider: s3
226     bucket: rust-lang-ci
227     skip_cleanup: true
228     local_dir: deploy
229     upload_dir: rustc-builds-alt
230     acl: public_read
231     region: us-east-1
232     access_key_id: AKIAIPQVNYF2T3DTYIWQ
233     secret_access_key:
234       secure: "FBqDqOTeIPMu6v/WYPf4CFSlh9rLRZGKVtpLa5KkyuOhXRTrnEzBduEtS8/FMIxdQImvurhSvxWvqRybMOi4qoVfjMqqpHAI7uBbidbrvAcJoHNsx6BgUNVCIoH6a0UsAjTUtm6/YPIpzbHoLZXPL0GrHPMk6Mu04qVSmcYNWn4="
235     on:
236       branch: auto
237       condition: $DEPLOY_ALT = 1