18 # Images used in testing PR and try-build should be run first.
19 - env: IMAGE=x86_64-gnu-llvm-5.0 RUST_BACKTRACE=1
20 if: type = pull_request OR branch = auto
22 - env: IMAGE=dist-x86_64-linux DEPLOY=1
23 if: branch = try OR branch = auto
25 # "alternate" deployments, these are "nightlies" but have LLVM assertions
26 # turned on, they're deployed to a different location primarily for
28 - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1 CI_JOB_NAME=dist-x86_64-linux-alt
29 if: branch = try OR branch = auto
32 RUST_CHECK_TARGET=dist
33 RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb"
36 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
37 MACOSX_DEPLOYMENT_TARGET=10.7
40 CI_JOB_NAME=dist-x86_64-apple-alt
42 osx_image: xcode9.3-moar
45 # macOS builders. These are placed near the beginning because they are very
48 # OSX builders running tests, these run the full test suite.
50 # Note that the compiler is compiled to target 10.8 here because the Xcode
51 # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
53 RUST_CHECK_TARGET=check
54 RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
56 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
57 MACOSX_DEPLOYMENT_TARGET=10.8
58 MACOSX_STD_DEPLOYMENT_TARGET=10.7
61 CI_JOB_NAME=x86_64-apple
63 osx_image: xcode9.3-moar
67 RUST_CHECK_TARGET=check
68 RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
70 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
71 MACOSX_DEPLOYMENT_TARGET=10.8
72 MACOSX_STD_DEPLOYMENT_TARGET=10.7
75 CI_JOB_NAME=i686-apple
77 osx_image: xcode9.3-moar
80 # OSX builders producing releases. These do not run the full test suite and
81 # just produce a bunch of artifacts.
83 # Note that these are running in the `xcode7` image instead of the
84 # `xcode8.2` image as above. That's because we want to build releases for
85 # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
87 RUST_CHECK_TARGET=dist
88 RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb"
91 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
92 MACOSX_DEPLOYMENT_TARGET=10.7
95 CI_JOB_NAME=dist-i686-apple
97 osx_image: xcode9.3-moar
101 RUST_CHECK_TARGET=dist
102 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 --enable-lldb"
105 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
106 MACOSX_DEPLOYMENT_TARGET=10.7
108 NO_DEBUG_ASSERTIONS=1
109 CI_JOB_NAME=dist-x86_64-apple
111 osx_image: xcode9.3-moar
114 # Linux builders, remaining docker images
115 - env: IMAGE=arm-android
117 - env: IMAGE=armhf-gnu
119 - env: IMAGE=dist-various-1 DEPLOY=1
121 - env: IMAGE=dist-various-2 DEPLOY=1
123 - env: IMAGE=dist-aarch64-linux DEPLOY=1
125 - env: IMAGE=dist-android DEPLOY=1
127 - env: IMAGE=dist-arm-linux DEPLOY=1
129 - env: IMAGE=dist-armhf-linux DEPLOY=1
131 - env: IMAGE=dist-armv7-linux DEPLOY=1
133 - env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
135 - env: IMAGE=dist-i686-freebsd DEPLOY=1
137 - env: IMAGE=dist-i686-linux DEPLOY=1
139 - env: IMAGE=dist-mips-linux DEPLOY=1
141 - env: IMAGE=dist-mips64-linux DEPLOY=1
143 - env: IMAGE=dist-mips64el-linux DEPLOY=1
145 - env: IMAGE=dist-mipsel-linux DEPLOY=1
147 - env: IMAGE=dist-powerpc-linux DEPLOY=1
149 - env: IMAGE=dist-powerpc64-linux DEPLOY=1
151 - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
153 - env: IMAGE=dist-s390x-linux DEPLOY=1
155 - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
157 - env: IMAGE=dist-x86_64-musl DEPLOY=1
159 - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
163 - env: IMAGE=i686-gnu
165 - env: IMAGE=i686-gnu-nopt
167 - env: IMAGE=wasm32-unknown
169 - env: IMAGE=x86_64-gnu
171 - env: IMAGE=x86_64-gnu-full-bootstrap
173 - env: IMAGE=x86_64-gnu-aux
175 - env: IMAGE=x86_64-gnu-tools
176 if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri)\b)/)
177 - env: IMAGE=x86_64-gnu-debug
179 - env: IMAGE=x86_64-gnu-nopt
181 - env: IMAGE=x86_64-gnu-distcheck
183 - env: IMAGE=mingw-check
184 if: type = pull_request OR branch = auto
186 - stage: publish toolstate
187 if: branch = master AND type = push
192 MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
193 . src/ci/docker/x86_64-gnu-tools/repo.sh;
194 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";
198 - SCCACHE_BUCKET=rust-lang-ci-sccache2
199 - SCCACHE_REGION=us-west-1
200 - AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
201 # AWS_SECRET_ACCESS_KEY=...
202 - secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
203 # TOOLSTATE_REPO_ACCESS_TOKEN=...
204 - secure: "ESfcXqv4N2VMhqi2iIyw6da9VrsA78I4iR1asouCaq4hzTTrkB4WNRrfURy6xg72gQ4nMhtRJbB0/2jmc9Cu1+g2CzXtyiL223aJ5CKrXdcvbitopQSDfp07dMWm+UED+hNFEanpErKAeU/6FM3A+J+60PMk8MCF1h9tqNRISJw="
207 # We'll use the AWS cli to download/upload cached docker layers, so install
209 - if [ "$TRAVIS_OS_NAME" = linux ]; then
210 pip install --user awscli;
211 export PATH=$PATH:$HOME/.local/bin;
213 - mkdir -p $HOME/rustsrc
214 # FIXME(#46924): these two commands are required to enable IPv6,
215 # they shouldn't exist, please revert once more official solutions appeared.
216 # see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
217 - if [ "$TRAVIS_OS_NAME" = linux ]; then
218 echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
219 sudo service docker restart;
223 - sudo grep -rE 'shutdown|poweroff|halt' /var/spool/cron || true
224 - sudo grep -E 'google-clock-skew|ntpd|startup-script' /var/log/syslog || true
227 - case "$TRAVIS_OS_NAME" in
229 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 &&
230 chmod +x $HOME/stamp &&
231 export PATH=$PATH:$HOME
234 if [[ "$RUST_CHECK_TARGET" == dist ]]; then
235 travis_retry brew update &&
236 travis_retry brew install xz &&
237 travis_retry brew install swig;
239 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 &&
240 chmod +x /usr/local/bin/sccache &&
241 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 &&
242 chmod +x /usr/local/bin/stamp &&
243 travis_retry curl -f http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz | tar xJf - &&
244 export CC=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang &&
245 export CXX=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang++ &&
252 echo "#### Disk usage before running script:";
254 du . | sort -nr | head -n100
256 RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
257 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
258 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
260 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
261 # Enable core dump on Linux.
262 sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
265 # Log time information from this machine and an external machine for insight into possible
266 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
269 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
270 - stamp sh -x -c "$RUN_SCRIPT"
272 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
276 echo "#### Build successful; Disk usage after running script:";
278 du . | sort -nr | head -n100
281 # Requested by travis to debug "shutting down NOW" errors
282 - sudo tail -n 500 /var/log/syslog
284 echo "#### Build failed; Disk usage after running script:";
286 du . | sort -nr | head -n100
288 # Random attempt at debugging currently. Just poking around in here to see if
291 # Dump backtrace for macOS
292 - ls -lat $HOME/Library/Logs/DiagnosticReports/
293 - find $HOME/Library/Logs/DiagnosticReports
296 -not -name '*.stage2-*.crash'
297 -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
298 -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
299 -exec head -750 {} \;
300 -exec echo travis_fold":"end:crashlog \; || true
302 # Dump backtrace for Linux
303 - ln -s . checkout &&
304 for CORE in obj/cores/core.*; do
305 EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|');
306 if [ -f "$EXE" ]; then
307 printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE";
308 gdb -q -c "$CORE" "$EXE"
309 -iex 'set auto-load off'
314 echo travis_fold":"end:crashlog;
319 - cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
321 # attempt to debug anything killed by the oom killer on linux, just to see if
323 - dmesg | grep -i kill
329 - mkdir -p deploy/$TRAVIS_COMMIT
331 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
332 rm -rf build/dist/doc &&
333 cp -r build/dist/* deploy/$TRAVIS_COMMIT;
335 rm -rf obj/build/dist/doc &&
336 cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
338 - ls -la deploy/$TRAVIS_COMMIT
342 bucket: rust-lang-ci2
345 upload_dir: rustc-builds
348 access_key_id: AKIAJVBODR3IA4O72THQ
350 secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
353 condition: $DEPLOY = 1
355 # this is the same as the above deployment provider except that it uploads to
356 # a slightly different directory and has a different trigger
358 bucket: rust-lang-ci2
361 upload_dir: rustc-builds-alt
364 access_key_id: AKIAJVBODR3IA4O72THQ
366 secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
369 condition: $DEPLOY_ALT = 1
371 # These two providers are the same as the two above, except deploy on the
372 # try branch. Travis does not appear to provide a way to use "or" in these
375 bucket: rust-lang-ci2
378 upload_dir: rustc-builds
381 access_key_id: AKIAJVBODR3IA4O72THQ
383 secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
386 condition: $DEPLOY = 1
389 bucket: rust-lang-ci2
392 upload_dir: rustc-builds-alt
395 access_key_id: AKIAJVBODR3IA4O72THQ
397 secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
400 condition: $DEPLOY_ALT = 1