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.
49 # NO_DEBUG_ASSERTIONS=1 to make them go faster, but also do have some
50 # runners that run `//ignore-debug` tests.
52 # Note that the compiler is compiled to target 10.8 here because the Xcode
53 # version that we're using, 8.2, cannot compile LLVM for OSX 10.7.
55 RUST_CHECK_TARGET=check
56 RUST_CONFIGURE_ARGS="--build=x86_64-apple-darwin --enable-sanitizers --enable-profiler"
58 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
59 MACOSX_DEPLOYMENT_TARGET=10.8
60 MACOSX_STD_DEPLOYMENT_TARGET=10.7
63 CI_JOB_NAME=x86_64-apple
65 osx_image: xcode9.3-moar
69 RUST_CHECK_TARGET=check
70 RUST_CONFIGURE_ARGS=--build=i686-apple-darwin
72 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
73 MACOSX_DEPLOYMENT_TARGET=10.8
74 MACOSX_STD_DEPLOYMENT_TARGET=10.7
77 CI_JOB_NAME=i686-apple
79 osx_image: xcode9.3-moar
82 # OSX builders producing releases. These do not run the full test suite and
83 # just produce a bunch of artifacts.
85 # Note that these are running in the `xcode7` image instead of the
86 # `xcode8.2` image as above. That's because we want to build releases for
87 # OSX 10.7 and `xcode7` is the latest Xcode able to compile LLVM for 10.7.
89 RUST_CHECK_TARGET=dist
90 RUST_CONFIGURE_ARGS="--build=i686-apple-darwin --enable-full-tools --enable-profiler --enable-lldb"
93 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
94 MACOSX_DEPLOYMENT_TARGET=10.7
97 DIST_REQUIRE_ALL_TOOLS=1
98 CI_JOB_NAME=dist-i686-apple
100 osx_image: xcode9.3-moar
104 RUST_CHECK_TARGET=dist
105 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"
108 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
109 MACOSX_DEPLOYMENT_TARGET=10.7
111 NO_DEBUG_ASSERTIONS=1
112 DIST_REQUIRE_ALL_TOOLS=1
113 CI_JOB_NAME=dist-x86_64-apple
115 osx_image: xcode9.3-moar
118 # Linux builders, remaining docker images
119 - env: IMAGE=arm-android
121 - env: IMAGE=armhf-gnu
123 - env: IMAGE=dist-various-1 DEPLOY=1
125 - env: IMAGE=dist-various-2 DEPLOY=1
127 - env: IMAGE=dist-aarch64-linux DEPLOY=1
129 - env: IMAGE=dist-android DEPLOY=1
131 - env: IMAGE=dist-arm-linux DEPLOY=1
133 - env: IMAGE=dist-armhf-linux DEPLOY=1
135 - env: IMAGE=dist-armv7-linux DEPLOY=1
137 - env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
139 - env: IMAGE=dist-i686-freebsd DEPLOY=1
141 - env: IMAGE=dist-i686-linux DEPLOY=1
143 - env: IMAGE=dist-mips-linux DEPLOY=1
145 - env: IMAGE=dist-mips64-linux DEPLOY=1
147 - env: IMAGE=dist-mips64el-linux DEPLOY=1
149 - env: IMAGE=dist-mipsel-linux DEPLOY=1
151 - env: IMAGE=dist-powerpc-linux DEPLOY=1
153 - env: IMAGE=dist-powerpc64-linux DEPLOY=1
155 - env: IMAGE=dist-powerpc64le-linux DEPLOY=1
157 - env: IMAGE=dist-s390x-linux DEPLOY=1
159 - env: IMAGE=dist-x86_64-freebsd DEPLOY=1
161 - env: IMAGE=dist-x86_64-musl DEPLOY=1
163 - env: IMAGE=dist-x86_64-netbsd DEPLOY=1
167 - env: IMAGE=i686-gnu
169 - env: IMAGE=i686-gnu-nopt
171 - env: IMAGE=wasm32-unknown
173 - env: IMAGE=x86_64-gnu
175 - env: IMAGE=x86_64-gnu-full-bootstrap
177 - env: IMAGE=x86_64-gnu-aux
179 - env: IMAGE=x86_64-gnu-tools
180 if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri)\b)/)
181 - env: IMAGE=x86_64-gnu-debug
183 - env: IMAGE=x86_64-gnu-nopt
185 - env: IMAGE=x86_64-gnu-distcheck
187 - env: IMAGE=mingw-check
188 if: type = pull_request OR branch = auto
190 - stage: publish toolstate
191 if: branch = master AND type = push
196 MESSAGE_FILE=$(mktemp -t msg.XXXXXX);
197 . src/ci/docker/x86_64-gnu-tools/repo.sh;
198 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";
201 # We'll use the AWS cli to download/upload cached docker layers as well as
202 # push our deployments, so download that here.
203 - pip install --user awscli; export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
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;
214 - case "$TRAVIS_OS_NAME" in
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
221 if [[ "$RUST_CHECK_TARGET" == dist ]]; then
222 travis_retry brew update &&
223 travis_retry brew install xz &&
224 travis_retry brew install swig;
226 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 &&
227 chmod +x /usr/local/bin/sccache &&
228 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 &&
229 chmod +x /usr/local/bin/stamp &&
230 travis_retry curl -f http://releases.llvm.org/6.0.0/clang+llvm-6.0.0-x86_64-apple-darwin.tar.xz | tar xJf - &&
231 export CC=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang &&
232 export CXX=`pwd`/clang+llvm-6.0.0-x86_64-apple-darwin/bin/clang++ &&
239 echo "#### Disk usage before running script:";
241 du . | sort -nr | head -n100
243 RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
244 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
245 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
247 export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
248 # Enable core dump on Linux.
249 sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
252 # Log time information from this machine and an external machine for insight into possible
253 # clock drift. Timezones don't matter since relative deltas give all the necessary info.
256 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
257 - stamp sh -x -c "$RUN_SCRIPT"
259 date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
263 echo "#### Build successful; Disk usage after running script:";
265 du . | sort -nr | head -n100
267 if [ "$DEPLOY$DEPLOY_ALT" == "1" ]; then
268 mkdir -p deploy/$TRAVIS_COMMIT;
269 if [ "$TRAVIS_OS_NAME" == "osx" ]; then
270 rm -rf build/dist/doc &&
271 cp -r build/dist/* deploy/$TRAVIS_COMMIT;
273 rm -rf obj/build/dist/doc &&
274 cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
276 ls -la deploy/$TRAVIS_COMMIT;
277 deploy_dir=rustc-builds;
278 if [ "$DEPLOY_ALT" == "1" ]; then
279 deploy_dir=rustc-builds-alt;
281 travis_retry aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://rust-lang-ci2/$deploy_dir
286 echo "#### Build failed; Disk usage after running script:";
288 du . | sort -nr | head -n100
290 # Random attempt at debugging currently. Just poking around in here to see if
293 # Dump backtrace for macOS
294 - ls -lat $HOME/Library/Logs/DiagnosticReports/
295 - find $HOME/Library/Logs/DiagnosticReports
298 -not -name '*.stage2-*.crash'
299 -not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
300 -exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
301 -exec head -750 {} \;
302 -exec echo travis_fold":"end:crashlog \; || true
304 # Dump backtrace for Linux
305 - ln -s . checkout &&
306 for CORE in obj/cores/core.*; do
307 EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|');
308 if [ -f "$EXE" ]; then
309 printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE";
310 gdb --batch -q -c "$CORE" "$EXE"
311 -iex 'set auto-load off'
316 echo travis_fold":"end:crashlog;
321 - cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
323 # attempt to debug anything killed by the oom killer on linux, just to see if
325 - dmesg | grep -i kill