]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Fix ICE with `main`'s return type containing lifetimes
[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
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       os: osx
37       osx_image: xcode9.3-moar
38       if: branch = auto
39
40     # macOS builders. These are placed near the beginning because they are very
41     # slow to run.
42
43     # OSX builders running tests, these run the full test suite.
44     #
45     # Note that the compiler is compiled to target 10.8 here because the Xcode
46     # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
47     - env: >
48         RUST_CHECK_TARGET=check
49         RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
50         SRC=.
51         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
52         MACOSX_DEPLOYMENT_TARGET=10.8
53         MACOSX_STD_DEPLOYMENT_TARGET=10.7
54         NO_LLVM_ASSERTIONS=1
55         NO_DEBUG_ASSERTIONS=1
56       os: osx
57       osx_image: xcode9.3-moar
58       if: branch = auto
59
60     - env: >
61         RUST_CHECK_TARGET=check
62         RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
63         SRC=.
64         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
65         MACOSX_DEPLOYMENT_TARGET=10.8
66         MACOSX_STD_DEPLOYMENT_TARGET=10.7
67         NO_LLVM_ASSERTIONS=1
68         NO_DEBUG_ASSERTIONS=1
69       os: osx
70       osx_image: xcode9.3-moar
71       if: branch = auto
72
73     # OSX builders producing releases. These do not run the full test suite and
74     # just produce a bunch of artifacts.
75     #
76     # Note that these are running in the `xcode7` image instead of the
77     # `xcode8.2` image as above. That's because we want to build releases for
78     # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
79     - env: >
80         RUST_CHECK_TARGET=dist
81         RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler"
82         SRC=.
83         DEPLOY=1
84         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
85         MACOSX_DEPLOYMENT_TARGET=10.7
86         NO_LLVM_ASSERTIONS=1
87         NO_DEBUG_ASSERTIONS=1
88       os: osx
89       osx_image: xcode9.3-moar
90       if: branch = auto
91
92     - env: >
93         RUST_CHECK_TARGET=dist
94         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"
95         SRC=.
96         DEPLOY=1
97         RUSTC_RETRY_LINKER_ON_SEGFAULT=1
98         MACOSX_DEPLOYMENT_TARGET=10.7
99         NO_LLVM_ASSERTIONS=1
100         NO_DEBUG_ASSERTIONS=1
101       os: osx
102       osx_image: xcode9.3-moar
103       if: branch = auto
104
105     # Linux builders, remaining docker images
106     - env: IMAGE=arm-android
107       if: branch = auto
108     - env: IMAGE=armhf-gnu
109       if: branch = auto
110     - env: IMAGE=dist-various-1 DEPLOY=1
111       if: branch = auto
112     - env: IMAGE=dist-various-2 DEPLOY=1
113       if: branch = auto
114     - env: IMAGE=dist-aarch64-linux DEPLOY=1
115       if: branch = auto
116     - env: IMAGE=dist-android DEPLOY=1
117       if: branch = auto
118     - env: IMAGE=dist-arm-linux DEPLOY=1
119       if: branch = auto
120     - env: IMAGE=dist-armhf-linux DEPLOY=1
121       if: branch = auto
122     - env: IMAGE=dist-armv7-linux DEPLOY=1
123       if: branch = auto
124     - env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
125       if: branch = auto
126     - env: IMAGE=dist-i686-freebsd DEPLOY=1
127       if: branch = auto
128     - env: IMAGE=dist-i686-linux DEPLOY=1
129       if: branch = auto
130     - env: IMAGE=dist-mips-linux DEPLOY=1
131       if: branch = auto
132     - env: IMAGE=dist-mips64-linux DEPLOY=1
133       if: branch = auto
134     - env: IMAGE=dist-mips64el-linux DEPLOY=1
135       if: branch = auto
136     - env: IMAGE=dist-mipsel-linux DEPLOY=1
137       if: branch = auto
138     - env: IMAGE=dist-powerpc-linux DEPLOY=1
139       if: branch = auto
140     - env: IMAGE=dist-powerpc64-linux DEPLOY=1
141       if: branch = auto
142     - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
143       if: branch = auto
144     - env: IMAGE=dist-s390x-linux DEPLOY=1
145       if: branch = auto
146     - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
147       if: branch = auto
148     - env: IMAGE=dist-x86_64-musl DEPLOY=1
149       if: branch = auto
150     - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
151       if: branch = auto
152     - env: IMAGE=asmjs
153       if: branch = auto
154     - env: IMAGE=i686-gnu
155       if: branch = auto
156     - env: IMAGE=i686-gnu-nopt
157       if: branch = auto
158     - env: IMAGE=wasm32-unknown
159       if: branch = auto
160     - env: IMAGE=x86_64-gnu
161       if: branch = auto
162     - env: IMAGE=x86_64-gnu-full-bootstrap
163       if: branch = auto
164     - env: IMAGE=x86_64-gnu-aux
165       if: branch = auto
166     - env: IMAGE=x86_64-gnu-tools
167       if: branch = auto
168     - env: IMAGE=x86_64-gnu-debug
169       if: branch = auto
170     - env: IMAGE=x86_64-gnu-nopt
171       if: branch = auto
172     - env: IMAGE=x86_64-gnu-distcheck
173       if: branch = auto
174     - env: IMAGE=x86_64-gnu-incremental
175       if: branch = auto
176
177     - stage: publish toolstate
178       if: branch = master AND type = push
179       before_install: []
180       install: []
181       sudo: false
182       script:
183         MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
184         . src/ci/docker/x86_64-gnu-tools/repo.sh;
185         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";
186
187 env:
188   global:
189     - SCCACHE_BUCKET=rust-lang-ci-sccache2
190     - SCCACHE_REGION=us-west-1
191     - AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
192     # AWS_SECRET_ACCESS_KEY=...
193     - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
194     # TOOLSTATE_REPO_ACCESS_TOKEN=...
195     - secure: "cFh8thThqEJLC98XKI5pfqflUzOlxsYPRW20AWRaYOOgYHPTiGWypTXiPbGSKaeAXTZoOA+DpQtEmefc0U6lt9dHc7a/MIaK6isFurjlnKYiLOeTruzyu1z7PWCeZ/jKXsU2RK/88DBtlNwfMdaMIeuKj14IVfpepPPL71ETbuk="
196
197 before_install:
198   # We'll use the AWS cli to download/upload cached docker layers, so install
199   # that here.
200   - if [ "$TRAVIS_OS_NAME" = linux ]; then
201       pip install --user awscli;
202       export PATH=$PATH:$HOME/.local/bin;
203     fi
204   - mkdir -p $HOME/rustsrc
205   # FIXME(#46924): these two commands are required to enable IPv6,
206   # they shouldn't exist, please revert once more official solutions appeared.
207   # see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
208   - if [ "$TRAVIS_OS_NAME" = linux ]; then
209       echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
210       sudo service docker restart;
211     fi
212
213 install:
214   - case "$TRAVIS_OS_NAME" in
215         linux)
216           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 &&
217             chmod +x $HOME/stamp &&
218             export PATH=$PATH:$HOME
219           ;;
220         osx)
221           if [[ "$RUST_CHECK_TARGET" == dist ]]; then
222             travis_retry brew update &&
223             travis_retry brew install xz;
224           fi &&
225           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 &&
226             chmod +x /usr/local/bin/sccache &&
227           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 &&
228             chmod +x /usr/local/bin/stamp
229           ;;
230     esac
231
232 before_script:
233   - >
234       echo "#### Disk usage before running script:";
235       df -h;
236       du . | sort -nr | head -n100
237   - >
238       RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
239       if [ "$TRAVIS_OS_NAME" = "osx" ]; then
240           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
241       else
242           export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
243       fi
244
245 # Log time information from this machine and an external machine for insight into possible
246 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
247 script:
248   - >
249       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
250   - stamp sh -x -c "$RUN_SCRIPT"
251   - >
252       date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
253
254 after_success:
255   - >
256       echo "#### Build successful; Disk usage after running script:";
257       df -h;
258       du . | sort -nr | head -n100
259
260 after_failure:
261   - >
262       echo "#### Build failed; Disk usage after running script:";
263       df -h;
264       du . | sort -nr | head -n100
265
266   # Random attempt at debugging currently. Just poking around in here to see if
267   # anything shows up.
268   - ls -lat $HOME/Library/Logs/DiagnosticReports/
269   - find $HOME/Library/Logs/DiagnosticReports
270       -type f
271       -name '*.crash'
272       -not -name '*.stage2-*.crash'
273       -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
274       -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
275       -exec head -750 {} \;
276       -exec echo travis_fold":"end:crashlog \; || true
277
278   # attempt to debug anything killed by the oom killer on linux, just to see if
279   # it happened
280   - dmesg | grep -i kill
281
282 notifications:
283   email: false
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   - ls -la deploy/$TRAVIS_COMMIT
297
298 deploy:
299   - provider: s3
300     bucket: rust-lang-ci2
301     skip_cleanup: true
302     local_dir: deploy
303     upload_dir: rustc-builds
304     acl: public_read
305     region: us-west-1
306     access_key_id: AKIAJVBODR3IA4O72THQ
307     secret_access_key:
308       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
309     on:
310       branch: auto
311       condition: $DEPLOY = 1
312
313   # this is the same as the above deployment provider except that it uploads to
314   # a slightly different directory and has a different trigger
315   - provider: s3
316     bucket: rust-lang-ci2
317     skip_cleanup: true
318     local_dir: deploy
319     upload_dir: rustc-builds-alt
320     acl: public_read
321     region: us-west-1
322     access_key_id: AKIAJVBODR3IA4O72THQ
323     secret_access_key:
324       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
325     on:
326       branch: auto
327       condition: $DEPLOY_ALT = 1
328
329   # These two providers are the same as the two above, except deploy on the
330   # try branch. Travis does not appear to provide a way to use "or" in these
331   # conditions.
332   - provider: s3
333     bucket: rust-lang-ci2
334     skip_cleanup: true
335     local_dir: deploy
336     upload_dir: rustc-builds
337     acl: public_read
338     region: us-west-1
339     access_key_id: AKIAJVBODR3IA4O72THQ
340     secret_access_key:
341       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
342     on:
343       branch: try
344       condition: $DEPLOY = 1
345
346   - provider: s3
347     bucket: rust-lang-ci2
348     skip_cleanup: true
349     local_dir: deploy
350     upload_dir: rustc-builds-alt
351     acl: public_read
352     region: us-west-1
353     access_key_id: AKIAJVBODR3IA4O72THQ
354     secret_access_key:
355       secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
356     on:
357       branch: try
358       condition: $DEPLOY_ALT = 1