17 - CI_JOB_NAME=$TRAVIS_JOB_NAME
22 # Images used in testing PR and try-build should be run first.
23 - env: IMAGE=x86_64-gnu-llvm-6.0 RUST_BACKTRACE=1
24 name: x86_64-gnu-llvm-6.0
25 if: type = pull_request OR branch = auto
27 - env: IMAGE=dist-x86_64-linux DEPLOY=1
28 name: dist-x86_64-linux
29 if: branch = try OR branch = auto
31 # "alternate" deployments, these are "nightlies" but have LLVM assertions
32 # turned on, they're deployed to a different location primarily for
34 - env: IMAGE=dist-x86_64-linux DEPLOY_ALT=1
35 name: dist-x86_64-linux-alt
36 if: branch = try OR branch = auto
39 RUST_CHECK_TARGET=dist
40 RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb --set rust.jemalloc"
43 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
44 MACOSX_DEPLOYMENT_TARGET=10.7
48 osx_image: xcode9.3-moar
49 name: dist-x86_64-apple-alt
52 # macOS builders. These are placed near the beginning because they are very
55 # OSX builders running tests, these run the full test suite.
56 # NO_DEBUG_ASSERTIONS=1 to make them go faster, but also do have some
57 # runners that run `//ignore-debug` tests.
59 # Note that the compiler is compiled to target 10.8 here because the Xcode
60 # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
62 RUST_CHECK_TARGET=check
63 RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler --set rust.jemalloc"
65 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
66 MACOSX_DEPLOYMENT_TARGET=10.8
67 MACOSX_STD_DEPLOYMENT_TARGET=10.7
71 osx_image: xcode9.3-moar
76 RUST_CHECK_TARGET=check
77 RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --set rust.jemalloc"
79 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
80 MACOSX_DEPLOYMENT_TARGET=10.8
81 MACOSX_STD_DEPLOYMENT_TARGET=10.7
85 osx_image: xcode9.3-moar
89 # OSX builders producing releases. These do not run the full test suite and
90 # just produce a bunch of artifacts.
92 # Note that these are running in the `xcode7` image instead of the
93 # `xcode8.2` image as above. That's because we want to build releases for
94 # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
96 RUST_CHECK_TARGET=dist
97 RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb --set rust.jemalloc"
100 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
101 MACOSX_DEPLOYMENT_TARGET=10.7
103 NO_DEBUG_ASSERTIONS=1
104 DIST_REQUIRE_ALL_TOOLS=1
106 osx_image: xcode9.3-moar
107 name: dist-i686-apple
111 RUST_CHECK_TARGET=dist
112 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 --set rust.jemalloc"
115 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
116 MACOSX_DEPLOYMENT_TARGET=10.7
118 NO_DEBUG_ASSERTIONS=1
119 DIST_REQUIRE_ALL_TOOLS=1
121 osx_image: xcode9.3-moar
122 name: dist-x86_64-apple
125 # Linux builders, remaining docker images
126 - env: IMAGE=arm-android
129 - env: IMAGE=armhf-gnu
132 - env: IMAGE=dist-various-1 DEPLOY=1
135 - env: IMAGE=dist-various-2 DEPLOY=1
138 - env: IMAGE=dist-aarch64-linux DEPLOY=1
139 name: dist-aarch64-linux
141 - env: IMAGE=dist-android DEPLOY=1
144 - env: IMAGE=dist-arm-linux DEPLOY=1
147 - env: IMAGE=dist-armhf-linux DEPLOY=1
148 name: dist-armhf-linux
150 - env: IMAGE=dist-armv7-linux DEPLOY=1
151 name: dist-armv7-linux
153 - env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
154 name: dist-i586-gnu-i586-i686-musl
156 - env: IMAGE=dist-i686-freebsd DEPLOY=1
157 name: dist-i686-freebsd
159 - env: IMAGE=dist-i686-linux DEPLOY=1
160 name: dist-i686-linux
162 - env: IMAGE=dist-mips-linux DEPLOY=1
163 name: dist-mips-linux
165 - env: IMAGE=dist-mips64-linux DEPLOY=1
166 name: dist-mips64-linux
168 - env: IMAGE=dist-mips64el-linux DEPLOY=1
169 name: dist-mips64el-linux
171 - env: IMAGE=dist-mipsel-linux DEPLOY=1
172 name: dist-mipsel-linux
174 - env: IMAGE=dist-powerpc-linux DEPLOY=1
175 name: dist-powerpc-linux
177 - env: IMAGE=dist-powerpc64-linux DEPLOY=1
178 name: dist-powerpc64-linux
180 - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
181 name: dist-powerpc64le-linux
183 - env: IMAGE=dist-s390x-linux DEPLOY=1
184 name: dist-s390x-linux
186 - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
187 name: dist-x86_64-freebsd
189 - env: IMAGE=dist-x86_64-musl DEPLOY=1
190 name: dist-x86_64-musl
192 - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
193 name: dist-x86_64-netbsd
198 - env: IMAGE=i686-gnu
201 - env: IMAGE=i686-gnu-nopt
204 - env: IMAGE=test-various
207 - env: IMAGE=x86_64-gnu
210 - env: IMAGE=x86_64-gnu-full-bootstrap
211 name: x86_64-gnu-full-bootstrap
213 - env: IMAGE=x86_64-gnu-aux
216 - env: IMAGE=x86_64-gnu-tools
217 name: x86_64-gnu-tools
218 if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri|cargo)\b)/)
219 - env: IMAGE=x86_64-gnu-debug
220 name: x86_64-gnu-debug
222 - env: IMAGE=x86_64-gnu-nopt
223 name: x86_64-gnu-nopt
225 - env: IMAGE=x86_64-gnu-distcheck
226 name: x86_64-gnu-distcheck
228 - env: IMAGE=mingw-check
230 if: type = pull_request OR branch = auto
232 - stage: publish toolstate
233 if: branch = master AND type = push
238 MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
239 . src/ci/docker/x86_64-gnu-tools/repo.sh;
240 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";
243 # We'll use the AWS cli to download/upload cached docker layers as well as
244 # push our deployments, so download that here.
245 - pip install --user awscli; export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
246 - mkdir -p $HOME/rustsrc
247 # FIXME(#46924): these two commands are required to enable IPv6,
248 # they shouldn't exist, please revert once more official solutions appeared.
249 # see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
250 - if [ "$TRAVIS_OS_NAME" = linux ]; then
251 echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
252 sudo service docker restart;
256 - case "$TRAVIS_OS_NAME" in
258 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 &&
259 chmod +x $HOME/stamp &&
260 export PATH=$PATH:$HOME
263 if [[ "$RUST_CHECK_TARGET" == dist ]]; then
264 travis_retry brew update &&
265 travis_retry brew install xz &&
266 travis_retry brew install swig;
268 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 &&
269 chmod +x /usr/local/bin/sccache &&
270 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 &&
271 chmod +x /usr/local/bin/stamp &&
272 travis_retry curl -f http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz | tar xJf - &&
273 export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang &&
274 export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++ &&
281 echo "#### Disk usage before running script:";
283 du . | sort -nr | head -n100
285 RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
286 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
287 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
289 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
290 # Enable core dump on Linux.
291 sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
294 if [ "$IMAGE" = mingw-check ]; then
295 # verify the publish_toolstate script works.
296 git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git;
298 python2.7 "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" "";
300 rm -rf rust-toolstate;
303 # Log time information from this machine and an external machine for insight into possible
304 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
307 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
308 - stamp sh -x -c "$RUN_SCRIPT"
310 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
314 echo "#### Build successful; Disk usage after running script:";
316 du . | sort -nr | head -n100
318 if [ "$DEPLOY$DEPLOY_ALT" == "1" ]; then
319 mkdir -p deploy/$TRAVIS_COMMIT;
320 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
321 rm -rf build/dist/doc &&
322 cp -r build/dist/* deploy/$TRAVIS_COMMIT;
324 rm -rf obj/build/dist/doc &&
325 cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
327 ls -la deploy/$TRAVIS_COMMIT;
328 deploy_dir=rustc-builds;
329 if [ "$DEPLOY_ALT" == "1" ]; then
330 deploy_dir=rustc-builds-alt;
332 travis_retry aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://rust-lang-ci2/$deploy_dir
337 echo "#### Build failed; Disk usage after running script:";
339 du . | sort -nr | head -n100
341 # Random attempt at debugging currently. Just poking around in here to see if
344 # Dump backtrace for macOS
345 - ls -lat $HOME/Library/Logs/DiagnosticReports/
346 - find $HOME/Library/Logs/DiagnosticReports
349 -not -name '*.stage2-*.crash'
350 -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
351 -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
352 -exec head -750 {} \;
353 -exec echo travis_fold":"end:crashlog \; || true
355 # Dump backtrace for Linux
356 - ln -s . checkout &&
357 for CORE in obj/cores/core.*; do
358 EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|');
359 if [ -f "$EXE" ]; then
360 printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE";
361 gdb --batch -q -c "$CORE" "$EXE"
362 -iex 'set auto-load off'
367 echo travis_fold":"end:crashlog;
372 - cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
374 # attempt to debug anything killed by the oom killer on linux, just to see if
376 - dmesg | grep -i kill