2019-05-20 14:21:14 -05:00
|
|
|
# FIXME(linux): need to configure core dumps, enable them, and then dump
|
|
|
|
# backtraces on failure from all core dumps:
|
|
|
|
#
|
|
|
|
# - bash: sudo apt install gdb
|
|
|
|
# - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
|
|
|
|
#
|
|
|
|
# Check travis config for `gdb --batch` command to print all crash logs
|
|
|
|
|
|
|
|
steps:
|
2019-05-20 15:16:16 -05:00
|
|
|
|
2019-05-20 14:21:14 -05:00
|
|
|
- checkout: self
|
|
|
|
fetchDepth: 2
|
|
|
|
|
|
|
|
- bash: printenv | sort
|
|
|
|
displayName: Show environment variables
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
df -h
|
|
|
|
du . | sort -nr | head -n100
|
|
|
|
displayName: Show disk usage
|
|
|
|
# FIXME: this hasn't been tested, but maybe it works on Windows? Should test!
|
2019-05-20 16:21:12 -05:00
|
|
|
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
|
2019-05-20 14:21:14 -05:00
|
|
|
|
|
|
|
- template: install-sccache.yml
|
|
|
|
- template: install-clang.yml
|
|
|
|
|
|
|
|
# Install some dependencies needed to build LLDB/Clang, currently only needed
|
|
|
|
# during the `dist` target
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
brew update
|
|
|
|
brew install xz
|
|
|
|
brew install swig
|
|
|
|
displayName: Install build dependencies (OSX)
|
2019-05-20 16:21:12 -05:00
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
|
2019-05-20 14:21:14 -05:00
|
|
|
|
2019-05-21 17:14:20 -05:00
|
|
|
# Switch to XCode 9.3 on OSX since it seems to be the last version that supports
|
|
|
|
# i686-apple-darwin. We'll eventually want to upgrade this and it will probably
|
|
|
|
# force us to drop i686-apple-darwin, but let's keep the wheels turning for now.
|
2019-05-21 14:24:34 -05:00
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
sudo xcode-select --switch /Applications/Xcode_9.3.app
|
|
|
|
displayName: Switch to Xcode 9.3 (OSX)
|
2019-05-21 17:14:20 -05:00
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
|
2019-05-21 14:24:34 -05:00
|
|
|
|
2019-05-20 14:21:14 -05:00
|
|
|
- template: install-windows-build-deps.yml
|
|
|
|
|
2019-05-21 12:33:19 -05:00
|
|
|
# Looks like docker containers have IPv6 disabled by default, so let's turn it
|
|
|
|
# on since libstd tests require it
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
|
|
|
|
sudo service docker restart
|
|
|
|
displayName: Enable IPv6
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
|
2019-05-20 14:21:14 -05:00
|
|
|
# Check out all our submodules, but more quickly than using git by using one of
|
|
|
|
# our custom scripts
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
mkdir -p $HOME/rustsrc
|
|
|
|
$BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
|
2019-05-20 16:21:12 -05:00
|
|
|
condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
|
2019-05-20 14:21:14 -05:00
|
|
|
displayName: Check out submodules (Unix)
|
|
|
|
- script: |
|
|
|
|
if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
|
|
|
|
sh src/ci/init_repo.sh . /d/cache/rustsrc
|
2019-05-20 16:21:12 -05:00
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
2019-05-20 14:21:14 -05:00
|
|
|
displayName: Check out submodules (Windows)
|
|
|
|
|
2019-05-20 16:37:24 -05:00
|
|
|
# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
|
|
|
|
# images, etc.
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
sudo apt-get install -y python3-setuptools
|
|
|
|
pip3 install awscli --upgrade --user
|
|
|
|
echo "##vso[task.prependpath]$HOME/.local/bin"
|
|
|
|
displayName: Install awscli (Linux)
|
|
|
|
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
|
|
|
- script: pip install awscli
|
|
|
|
displayName: Install awscli (non-Linux)
|
|
|
|
condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
|
|
|
|
|
2019-05-20 14:21:14 -05:00
|
|
|
# Configure our CI_JOB_NAME variable which log analyzers can use for the main
|
|
|
|
# step to see what's going on.
|
|
|
|
- bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
|
2019-05-20 14:37:18 -05:00
|
|
|
displayName: Configure Job Name
|
2019-05-20 14:21:14 -05:00
|
|
|
|
|
|
|
# As a quick smoke check on the otherwise very fast mingw-check linux builder
|
|
|
|
# check our own internal scripts.
|
|
|
|
- bash: |
|
|
|
|
set -e
|
|
|
|
git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
|
|
|
|
cd rust-toolstate
|
|
|
|
python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
|
|
|
|
cd ..
|
|
|
|
rm -rf rust-toolstate
|
|
|
|
condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check'))
|
|
|
|
displayName: Verify the publish_toolstate script works
|
|
|
|
|
2019-05-20 14:39:25 -05:00
|
|
|
- bash: |
|
|
|
|
set -e
|
2019-05-20 14:46:10 -05:00
|
|
|
if [ "$IMAGE" = "" ]; then
|
2019-05-20 14:39:25 -05:00
|
|
|
src/ci/run.sh
|
|
|
|
else
|
|
|
|
src/ci/docker/run.sh $IMAGE
|
|
|
|
fi
|
2019-05-21 03:27:41 -05:00
|
|
|
#timeoutInMinutes: 180
|
|
|
|
timeoutInMinutes: 600
|
2019-05-20 14:21:14 -05:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
SRC: .
|
2019-05-21 12:28:56 -05:00
|
|
|
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
2019-05-20 14:21:14 -05:00
|
|
|
displayName: Run build
|
|
|
|
|
|
|
|
- bash: |
|
|
|
|
set -e
|
2019-05-21 12:38:05 -05:00
|
|
|
if [ "$AGENT_OS" = "Linux" ]; then
|
|
|
|
rm -rf obj/build/dist/doc
|
2019-05-21 17:55:26 -05:00
|
|
|
upload_dir=obj/build/dist
|
2019-05-21 12:38:05 -05:00
|
|
|
else
|
|
|
|
rm -rf build/dist/doc
|
|
|
|
upload_dir=build/dist
|
|
|
|
fi
|
|
|
|
ls -la $upload_dir
|
2019-05-20 14:21:14 -05:00
|
|
|
deploy_dir=rustc-builds
|
|
|
|
if [ "$DEPLOY_ALT" == "1" ]; then
|
|
|
|
deploy_dir=rustc-builds-alt
|
|
|
|
fi
|
2019-05-21 12:38:05 -05:00
|
|
|
aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
|
2019-05-20 14:21:14 -05:00
|
|
|
env:
|
2019-05-21 12:28:56 -05:00
|
|
|
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
2019-05-20 14:21:14 -05:00
|
|
|
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
|
|
|
|
displayName: Upload artifacts
|