]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Add IMAGE `thumb-none` to .travis.yml
[rust.git] / .travis.yml
1 language: shell
2 sudo: required
3 dist: trusty
4 services:
5   - docker
6
7 git:
8   depth: 2
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 CI_JOB_NAME=dist-x86_64-linux-alt
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         MACOSX_DEPLOYMENT_TARGET=10.7
34         NO_LLVM_ASSERTIONS=1
35         NO_DEBUG_ASSERTIONS=1
36         CI_JOB_NAME=dist-x86_64-apple-alt
37       os: osx
38       osx_image: xcode9.3-moar
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         MACOSX_DEPLOYMENT_TARGET=10.8
54         MACOSX_STD_DEPLOYMENT_TARGET=10.7
55         NO_LLVM_ASSERTIONS=1
56         NO_DEBUG_ASSERTIONS=1
57         CI_JOB_NAME=x86_64-apple
58       os: osx
59       osx_image: xcode9.3-moar
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         MACOSX_DEPLOYMENT_TARGET=10.8
68         MACOSX_STD_DEPLOYMENT_TARGET=10.7
69         NO_LLVM_ASSERTIONS=1
70         NO_DEBUG_ASSERTIONS=1
71         CI_JOB_NAME=i686-apple
72       os: osx
73       osx_image: xcode9.3-moar
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-full-tools --enable-profiler"
85         SRC=.
86         DEPLOY=1
87         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
88         MACOSX_DEPLOYMENT_TARGET=10.7
89         NO_LLVM_ASSERTIONS=1
90         NO_DEBUG_ASSERTIONS=1
91         CI_JOB_NAME=dist-i686-apple
92       os: osx
93       osx_image: xcode9.3-moar
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-full-tools --enable-sanitizers --enable-profiler"
99         SRC=.
100         DEPLOY=1
101         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
102         MACOSX_DEPLOYMENT_TARGET=10.7
103         NO_LLVM_ASSERTIONS=1
104         NO_DEBUG_ASSERTIONS=1
105         CI_JOB_NAME=dist-x86_64-apple
106       os: osx
107       osx_image: xcode9.3-moar
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-i586-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=thumb-none
166       if: branch = auto
167     - env: IMAGE=x86_64-gnu
168       if: branch = auto
169     - env: IMAGE=x86_64-gnu-full-bootstrap
170       if: branch = auto
171     - env: IMAGE=x86_64-gnu-aux
172       if: branch = auto
173     - env: IMAGE=x86_64-gnu-tools
174       if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri)\b)/)
175     - env: IMAGE=x86_64-gnu-debug
176       if: branch = auto
177     - env: IMAGE=x86_64-gnu-nopt
178       if: branch = auto
179     - env: IMAGE=x86_64-gnu-distcheck
180       if: branch = auto
181     - env: IMAGE=mingw-check
182       if: type = pull_request OR branch = auto
183
184     - stage: publish toolstate
185       if: branch = master AND type = push
186       before_install: []
187       install: []
188       sudo: false
189       script:
190         MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
191         . src/ci/docker/x86_64-gnu-tools/repo.sh;
192         commit_toolstate_change "$MESSAGE_FILE" "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "$MESSAGE_FILE" "$TOOLSTATE_REPO_ACCESS_TOKEN";
193
194 env:
195   global:
196     - SCCACHE_BUCKET=rust-lang-ci-sccache2
197     - SCCACHE_REGION=us-west-1
198     - AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
199     # AWS_SECRET_ACCESS_KEY=...
200     - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
201     # TOOLSTATE_REPO_ACCESS_TOKEN=...
202     - secure: "ESfcXqv4N2VMhqi2iIyw6da9VrsA78I4iR1asouCaq4hzTTrkB4WNRrfURy6xg72gQ4nMhtRJbB0/2jmc9Cu1+g2CzXtyiL223aJ5CKrXdcvbitopQSDfp07dMWm+UED+hNFEanpErKAeU/6FM3A+J+60PMk8MCF1h9tqNRISJw="
203
204 before_install:
205   # We'll use the AWS cli to download/upload cached docker layers, so install
206   # that here.
207   - if [ "$TRAVIS_OS_NAME" = linux ]; then
208       pip install --user awscli;
209       export PATH=$PATH:$HOME/.local/bin;
210     fi
211   - mkdir -p $HOME/rustsrc
212   # FIXME(#46924): these two commands are required to enable IPv6,
213   # they shouldn't exist, please revert once more official solutions appeared.
214   # see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
215   - if [ "$TRAVIS_OS_NAME" = linux ]; then
216       echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
217       sudo service docker restart;
218     fi
219
220 install:
221   - case "$TRAVIS_OS_NAME" in
222         linux)
223           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 &&
224             chmod +x $HOME/stamp &&
225             export PATH=$PATH:$HOME
226           ;;
227         osx)
228           if [[ "$RUST_CHECK_TARGET" == dist ]]; then
229             travis_retry brew update &&
230             travis_retry brew install xz;
231           fi &&
232           travis_retry curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin &&
233             chmod +x /usr/local/bin/sccache &&
234           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 &&
235             chmod +x /usr/local/bin/stamp &&
236           travis_retry curl -f http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz | tar xJf - &&
237             export CC=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang &&
238             export CXX=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang++ &&
239             export AR=ar
240           ;;
241     esac
242
243 before_script:
244   - >
245       echo "#### Disk usage before running script:";
246       df -h;
247       du . | sort -nr | head -n100
248   - >
249       RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
250       if [ "$TRAVIS_OS_NAME" = "osx" ]; then
251           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
252       else
253           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
254       fi
255
256 # Log time information from this machine and an external machine for insight into possible
257 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
258 script:
259   - >
260       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
261   - stamp sh -x -c "$RUN_SCRIPT"
262   - >
263       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
264
265 after_success:
266   - >
267       echo "#### Build successful; Disk usage after running script:";
268       df -h;
269       du . | sort -nr | head -n100
270
271 after_failure:
272   - >
273       echo "#### Build failed; Disk usage after running script:";
274       df -h;
275       du . | sort -nr | head -n100
276
277   # Random attempt at debugging currently. Just poking around in here to see if
278   # anything shows up.
279   - ls -lat $HOME/Library/Logs/DiagnosticReports/
280   - find $HOME/Library/Logs/DiagnosticReports
281       -type f
282       -name '*.crash'
283       -not -name '*.stage2-*.crash'
284       -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
285       -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
286       -exec head -750 {} \;
287       -exec echo travis_fold":"end:crashlog \; || true
288
289   # see #50887
290   - head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
291
292   # attempt to debug anything killed by the oom killer on linux, just to see if
293   # it happened
294   - dmesg | grep -i kill
295
296 notifications:
297   email: false
298
299 before_deploy:
300   - mkdir -p deploy/$TRAVIS_COMMIT
301   - >
302       if [ "$TRAVIS_OS_NAME" == "osx" ]; then
303           rm -rf build/dist/doc &&
304           cp -r build/dist/* deploy/$TRAVIS_COMMIT;
305       else
306           rm -rf obj/build/dist/doc &&
307           cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
308       fi
309   - ls -la deploy/$TRAVIS_COMMIT
310
311 deploy:
312   - provider: s3
313     bucket: rust-lang-ci2
314     skip_cleanup: true
315     local_dir: deploy
316     upload_dir: rustc-builds
317     acl: public_read
318     region: us-west-1
319     access_key_id: AKIAJVBODR3IA4O72THQ
320     secret_access_key:
321       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
322     on:
323       branch: auto
324       condition: $DEPLOY = 1
325
326   # this is the same as the above deployment provider except that it uploads to
327   # a slightly different directory and has a different trigger
328   - provider: s3
329     bucket: rust-lang-ci2
330     skip_cleanup: true
331     local_dir: deploy
332     upload_dir: rustc-builds-alt
333     acl: public_read
334     region: us-west-1
335     access_key_id: AKIAJVBODR3IA4O72THQ
336     secret_access_key:
337       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
338     on:
339       branch: auto
340       condition: $DEPLOY_ALT = 1
341
342   # These two providers are the same as the two above, except deploy on the
343   # try branch. Travis does not appear to provide a way to use "or" in these
344   # conditions.
345   - provider: s3
346     bucket: rust-lang-ci2
347     skip_cleanup: true
348     local_dir: deploy
349     upload_dir: rustc-builds
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 = 1
358
359   - provider: s3
360     bucket: rust-lang-ci2
361     skip_cleanup: true
362     local_dir: deploy
363     upload_dir: rustc-builds-alt
364     acl: public_read
365     region: us-west-1
366     access_key_id: AKIAJVBODR3IA4O72THQ
367     secret_access_key:
368       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
369     on:
370       branch: try
371       condition: $DEPLOY_ALT = 1