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