2017-07-12 16:34:18 -06:00
|
|
|
language: shell
|
2015-09-18 10:19:23 -07:00
|
|
|
sudo: required
|
2018-12-18 13:32:09 -08:00
|
|
|
dist: xenial
|
2016-06-02 00:14:22 +09:00
|
|
|
services:
|
|
|
|
- docker
|
2018-07-13 01:56:17 +08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- gdb
|
2014-02-20 15:37:44 -08:00
|
|
|
|
2015-09-18 10:19:23 -07:00
|
|
|
git:
|
2017-12-30 00:05:15 +08:00
|
|
|
depth: 2
|
2016-10-11 12:21:40 -07:00
|
|
|
submodules: false
|
2015-07-13 17:29:01 -07:00
|
|
|
|
2019-03-09 15:48:58 -08:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- CI_JOB_NAME=$TRAVIS_JOB_NAME
|
|
|
|
|
2016-10-11 12:21:40 -07:00
|
|
|
matrix:
|
2017-01-19 17:18:12 -08:00
|
|
|
fast_finish: true
|
2016-10-11 12:21:40 -07:00
|
|
|
include:
|
2017-11-28 23:19:54 +08:00
|
|
|
- env: IMAGE=x86_64-gnu-tools
|
2019-03-09 15:48:58 -08:00
|
|
|
name: x86_64-gnu-tools
|
2018-12-02 23:09:47 -08:00
|
|
|
if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri|cargo)\b)/)
|
2017-02-11 17:28:29 -08:00
|
|
|
|
2017-07-16 00:10:26 +08:00
|
|
|
before_install:
|
2018-10-24 02:29:53 -07:00
|
|
|
# We'll use the AWS cli to download/upload cached docker layers as well as
|
|
|
|
# push our deployments, so download that here.
|
2018-11-01 15:30:30 +08:00
|
|
|
- pip install --user awscli; export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
|
2017-07-16 00:10:26 +08:00
|
|
|
- mkdir -p $HOME/rustsrc
|
2017-12-22 03:14:21 +08:00
|
|
|
# FIXME(#46924): these two commands are required to enable IPv6,
|
|
|
|
# they shouldn't exist, please revert once more official solutions appeared.
|
|
|
|
# see https://github.com/travis-ci/travis-ci/issues/8891#issuecomment-353403729
|
|
|
|
- if [ "$TRAVIS_OS_NAME" = linux ]; then
|
2017-12-26 02:36:17 +08:00
|
|
|
echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
|
2017-12-22 03:14:21 +08:00
|
|
|
sudo service docker restart;
|
|
|
|
fi
|
2017-07-16 00:10:26 +08:00
|
|
|
|
|
|
|
install:
|
2017-09-16 19:28:08 +08:00
|
|
|
- case "$TRAVIS_OS_NAME" in
|
2017-07-16 00:10:26 +08:00
|
|
|
linux)
|
2017-09-15 16:04:13 -07:00
|
|
|
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 &&
|
2017-07-16 00:10:26 +08:00
|
|
|
chmod +x $HOME/stamp &&
|
|
|
|
export PATH=$PATH:$HOME
|
|
|
|
;;
|
|
|
|
osx)
|
2019-05-30 07:22:53 -07:00
|
|
|
if [[ "$SCRIPT" == "./x.py dist" ]]; then
|
2017-07-16 00:10:26 +08:00
|
|
|
travis_retry brew update &&
|
2018-07-03 12:24:24 -06:00
|
|
|
travis_retry brew install xz &&
|
2019-06-15 20:17:42 +09:00
|
|
|
travis_retry brew install swig@3 &&
|
|
|
|
brew link --force swig@3;
|
2017-07-16 00:10:26 +08:00
|
|
|
fi &&
|
2018-03-01 14:50:50 -08:00
|
|
|
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 &&
|
2017-07-16 00:10:26 +08:00
|
|
|
chmod +x /usr/local/bin/sccache &&
|
2017-09-15 16:04:13 -07:00
|
|
|
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 &&
|
2018-04-24 08:34:14 -07:00
|
|
|
chmod +x /usr/local/bin/stamp &&
|
2018-11-14 17:42:53 +01:00
|
|
|
travis_retry curl -f http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz | tar xJf - &&
|
|
|
|
export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang &&
|
|
|
|
export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++ &&
|
2018-04-24 08:34:14 -07:00
|
|
|
export AR=ar
|
2017-07-16 00:10:26 +08:00
|
|
|
;;
|
2017-09-16 19:28:08 +08:00
|
|
|
esac
|
2017-03-17 09:31:28 -07:00
|
|
|
|
2017-03-08 22:19:33 +02:00
|
|
|
before_script:
|
|
|
|
- >
|
|
|
|
echo "#### Disk usage before running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2016-11-16 12:31:19 -08:00
|
|
|
- >
|
2017-07-16 00:10:26 +08:00
|
|
|
RUN_SCRIPT="src/ci/init_repo.sh . $HOME/rustsrc";
|
|
|
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
|
|
export RUN_SCRIPT="$RUN_SCRIPT && src/ci/run.sh";
|
2017-06-03 12:49:03 -06:00
|
|
|
else
|
2017-07-16 00:10:26 +08:00
|
|
|
export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
|
2018-07-13 01:56:17 +08:00
|
|
|
# Enable core dump on Linux.
|
|
|
|
sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
|
2016-11-16 12:31:19 -08:00
|
|
|
fi
|
2018-12-15 23:44:46 +08:00
|
|
|
- >
|
|
|
|
if [ "$IMAGE" = mingw-check ]; then
|
|
|
|
# verify the publish_toolstate script works.
|
|
|
|
git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git;
|
|
|
|
cd rust-toolstate;
|
|
|
|
python2.7 "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" "";
|
|
|
|
cd ..;
|
|
|
|
rm -rf rust-toolstate;
|
|
|
|
fi
|
2014-03-05 21:17:15 -08:00
|
|
|
|
2017-06-28 23:05:29 +01:00
|
|
|
# Log time information from this machine and an external machine for insight into possible
|
|
|
|
# clock drift. Timezones don't matter since relative deltas give all the necessary info.
|
2017-05-18 00:33:20 +08:00
|
|
|
script:
|
2017-06-28 23:05:29 +01:00
|
|
|
- >
|
2017-07-17 10:55:27 -07:00
|
|
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
2017-06-28 22:54:05 +01:00
|
|
|
- stamp sh -x -c "$RUN_SCRIPT"
|
2017-06-28 23:05:29 +01:00
|
|
|
- >
|
2017-07-17 10:55:27 -07:00
|
|
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
2017-05-18 00:33:20 +08:00
|
|
|
|
2017-03-08 22:19:33 +02:00
|
|
|
after_success:
|
|
|
|
- >
|
|
|
|
echo "#### Build successful; Disk usage after running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2018-10-24 02:29:53 -07:00
|
|
|
- >
|
|
|
|
if [ "$DEPLOY$DEPLOY_ALT" == "1" ]; then
|
|
|
|
mkdir -p deploy/$TRAVIS_COMMIT;
|
|
|
|
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
|
|
|
rm -rf build/dist/doc &&
|
|
|
|
cp -r build/dist/* deploy/$TRAVIS_COMMIT;
|
|
|
|
else
|
|
|
|
rm -rf obj/build/dist/doc &&
|
|
|
|
cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
|
|
|
|
fi;
|
|
|
|
ls -la deploy/$TRAVIS_COMMIT;
|
|
|
|
deploy_dir=rustc-builds;
|
|
|
|
if [ "$DEPLOY_ALT" == "1" ]; then
|
|
|
|
deploy_dir=rustc-builds-alt;
|
|
|
|
fi;
|
|
|
|
travis_retry aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://rust-lang-ci2/$deploy_dir
|
|
|
|
fi
|
2017-03-08 22:19:33 +02:00
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- >
|
|
|
|
echo "#### Build failed; Disk usage after running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2017-03-23 12:00:50 -07:00
|
|
|
|
|
|
|
# Random attempt at debugging currently. Just poking around in here to see if
|
|
|
|
# anything shows up.
|
2018-07-13 01:56:17 +08:00
|
|
|
|
|
|
|
# Dump backtrace for macOS
|
2017-11-06 01:10:09 +08:00
|
|
|
- ls -lat $HOME/Library/Logs/DiagnosticReports/
|
2017-11-16 00:54:39 +08:00
|
|
|
- find $HOME/Library/Logs/DiagnosticReports
|
|
|
|
-type f
|
2018-03-10 18:38:27 +08:00
|
|
|
-name '*.crash'
|
2017-11-16 00:54:39 +08:00
|
|
|
-not -name '*.stage2-*.crash'
|
|
|
|
-not -name 'com.apple.CoreSimulator.CoreSimulatorService-*.crash'
|
|
|
|
-exec printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" {} \;
|
2017-11-06 01:10:09 +08:00
|
|
|
-exec head -750 {} \;
|
2018-03-10 18:38:27 +08:00
|
|
|
-exec echo travis_fold":"end:crashlog \; || true
|
2017-03-23 12:00:50 -07:00
|
|
|
|
2018-07-13 01:56:17 +08:00
|
|
|
# Dump backtrace for Linux
|
|
|
|
- ln -s . checkout &&
|
|
|
|
for CORE in obj/cores/core.*; do
|
|
|
|
EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|');
|
|
|
|
if [ -f "$EXE" ]; then
|
|
|
|
printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE";
|
2018-09-19 09:46:22 -06:00
|
|
|
gdb --batch -q -c "$CORE" "$EXE"
|
2018-07-13 01:56:17 +08:00
|
|
|
-iex 'set auto-load off'
|
|
|
|
-iex 'dir src/'
|
|
|
|
-iex 'set sysroot .'
|
|
|
|
-ex bt
|
|
|
|
-ex q;
|
|
|
|
echo travis_fold":"end:crashlog;
|
|
|
|
fi;
|
|
|
|
done || true
|
|
|
|
|
2018-06-10 01:31:55 +08:00
|
|
|
# see #50887
|
2018-07-13 01:56:17 +08:00
|
|
|
- cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
|
2018-06-10 01:31:55 +08:00
|
|
|
|
2017-03-23 12:33:24 -07:00
|
|
|
# attempt to debug anything killed by the oom killer on linux, just to see if
|
|
|
|
# it happened
|
|
|
|
- dmesg | grep -i kill
|
|
|
|
|
2014-03-05 21:17:15 -08:00
|
|
|
notifications:
|
|
|
|
email: false
|