2017-07-12 17:34:18 -05:00
|
|
|
language: shell
|
2015-09-18 12:19:23 -05:00
|
|
|
sudo: required
|
2018-12-18 15:32:09 -06:00
|
|
|
dist: xenial
|
2016-06-01 10:14:22 -05:00
|
|
|
services:
|
|
|
|
- docker
|
2018-07-12 12:56:17 -05:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- gdb
|
2014-02-20 17:37:44 -06:00
|
|
|
|
2015-09-18 12:19:23 -05:00
|
|
|
git:
|
2017-12-29 10:05:15 -06:00
|
|
|
depth: 2
|
2016-10-11 14:21:40 -05:00
|
|
|
submodules: false
|
2015-07-13 19:29:01 -05:00
|
|
|
|
2019-03-09 17:48:58 -06:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- CI_JOB_NAME=$TRAVIS_JOB_NAME
|
|
|
|
|
2016-10-11 14:21:40 -05:00
|
|
|
matrix:
|
2017-01-19 19:18:12 -06:00
|
|
|
fast_finish: true
|
2016-10-11 14:21:40 -05:00
|
|
|
include:
|
2017-11-28 09:19:54 -06:00
|
|
|
- env: IMAGE=x86_64-gnu-tools
|
2019-03-09 17:48:58 -06:00
|
|
|
name: x86_64-gnu-tools
|
2018-12-03 01:09:47 -06:00
|
|
|
if: branch = auto OR (type = pull_request AND commit_message =~ /(?i:^update.*\b(rls|rustfmt|clippy|miri|cargo)\b)/)
|
2017-02-11 19:28:29 -06:00
|
|
|
|
2017-07-15 11:10:26 -05:00
|
|
|
before_install:
|
2018-10-24 04:29:53 -05: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 02:30:30 -05:00
|
|
|
- pip install --user awscli; export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
|
2017-07-15 11:10:26 -05:00
|
|
|
- mkdir -p $HOME/rustsrc
|
2017-12-21 13:14:21 -06: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-25 12:36:17 -06:00
|
|
|
echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json;
|
2017-12-21 13:14:21 -06:00
|
|
|
sudo service docker restart;
|
|
|
|
fi
|
2017-07-15 11:10:26 -05:00
|
|
|
|
|
|
|
install:
|
2017-09-16 06:28:08 -05:00
|
|
|
- case "$TRAVIS_OS_NAME" in
|
2017-07-15 11:10:26 -05:00
|
|
|
linux)
|
2017-09-15 18:04:13 -05: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-15 11:10:26 -05:00
|
|
|
chmod +x $HOME/stamp &&
|
|
|
|
export PATH=$PATH:$HOME
|
|
|
|
;;
|
|
|
|
osx)
|
2019-05-30 09:22:53 -05:00
|
|
|
if [[ "$SCRIPT" == "./x.py dist" ]]; then
|
2017-07-15 11:10:26 -05:00
|
|
|
travis_retry brew update &&
|
2018-07-03 13:24:24 -05:00
|
|
|
travis_retry brew install xz &&
|
2019-06-15 06:17:42 -05:00
|
|
|
travis_retry brew install swig@3 &&
|
|
|
|
brew link --force swig@3;
|
2017-07-15 11:10:26 -05:00
|
|
|
fi &&
|
2018-03-01 16:50:50 -06: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-15 11:10:26 -05:00
|
|
|
chmod +x /usr/local/bin/sccache &&
|
2017-09-15 18:04:13 -05: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 10:34:14 -05:00
|
|
|
chmod +x /usr/local/bin/stamp &&
|
2018-11-14 10:42:53 -06: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 10:34:14 -05:00
|
|
|
export AR=ar
|
2017-07-15 11:10:26 -05:00
|
|
|
;;
|
2017-09-16 06:28:08 -05:00
|
|
|
esac
|
2017-03-17 11:31:28 -05:00
|
|
|
|
2017-03-08 14:19:33 -06:00
|
|
|
before_script:
|
|
|
|
- >
|
|
|
|
echo "#### Disk usage before running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2016-11-16 14:31:19 -06:00
|
|
|
- >
|
2017-07-15 11:10:26 -05: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 13:49:03 -05:00
|
|
|
else
|
2017-07-15 11:10:26 -05:00
|
|
|
export RUN_SCRIPT="$RUN_SCRIPT && src/ci/docker/run.sh $IMAGE";
|
2018-07-12 12:56:17 -05:00
|
|
|
# Enable core dump on Linux.
|
|
|
|
sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern';
|
2016-11-16 14:31:19 -06:00
|
|
|
fi
|
2018-12-15 09:44:46 -06: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 23:17:15 -06:00
|
|
|
|
2017-06-28 17:05:29 -05: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-17 11:33:20 -05:00
|
|
|
script:
|
2017-06-28 17:05:29 -05:00
|
|
|
- >
|
2017-07-17 12:55:27 -05:00
|
|
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
2017-06-28 16:54:05 -05:00
|
|
|
- stamp sh -x -c "$RUN_SCRIPT"
|
2017-06-28 17:05:29 -05:00
|
|
|
- >
|
2017-07-17 12:55:27 -05:00
|
|
|
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
|
2017-05-17 11:33:20 -05:00
|
|
|
|
2017-03-08 14:19:33 -06:00
|
|
|
after_success:
|
|
|
|
- >
|
|
|
|
echo "#### Build successful; Disk usage after running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2018-10-24 04:29:53 -05: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 14:19:33 -06:00
|
|
|
|
|
|
|
after_failure:
|
|
|
|
- >
|
|
|
|
echo "#### Build failed; Disk usage after running script:";
|
|
|
|
df -h;
|
|
|
|
du . | sort -nr | head -n100
|
2017-03-23 14:00:50 -05:00
|
|
|
|
|
|
|
# Random attempt at debugging currently. Just poking around in here to see if
|
|
|
|
# anything shows up.
|
2018-07-12 12:56:17 -05:00
|
|
|
|
|
|
|
# Dump backtrace for macOS
|
2017-11-05 11:10:09 -06:00
|
|
|
- ls -lat $HOME/Library/Logs/DiagnosticReports/
|
2017-11-15 10:54:39 -06:00
|
|
|
- find $HOME/Library/Logs/DiagnosticReports
|
|
|
|
-type f
|
2018-03-10 04:38:27 -06:00
|
|
|
-name '*.crash'
|
2017-11-15 10:54:39 -06: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-05 11:10:09 -06:00
|
|
|
-exec head -750 {} \;
|
2018-03-10 04:38:27 -06:00
|
|
|
-exec echo travis_fold":"end:crashlog \; || true
|
2017-03-23 14:00:50 -05:00
|
|
|
|
2018-07-12 12:56:17 -05: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 10:46:22 -05:00
|
|
|
gdb --batch -q -c "$CORE" "$EXE"
|
2018-07-12 12:56:17 -05: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-09 12:31:55 -05:00
|
|
|
# see #50887
|
2018-07-12 12:56:17 -05:00
|
|
|
- cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
|
2018-06-09 12:31:55 -05:00
|
|
|
|
2017-03-23 14:33:24 -05: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 23:17:15 -06:00
|
|
|
notifications:
|
|
|
|
email: false
|