1 # FIXME(linux): need to configure core dumps, enable them, and then dump
2 # backtraces on failure from all core dumps:
4 # - bash: sudo apt install gdb
5 # - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
7 # Check travis config for `gdb --batch` command to print all crash logs
14 - bash: printenv | sort
15 displayName: Show environment variables
20 du . | sort -nr | head -n100
21 displayName: Show disk usage
22 # FIXME: this hasn't been tested, but maybe it works on Windows? Should test!
23 condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
25 - template: install-sccache.yml
26 - template: install-clang.yml
28 # Install some dependencies needed to build LLDB/Clang, currently only needed
29 # during the `dist` target
35 displayName: Install build dependencies (OSX)
36 condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['SCRIPT'],'./x.py dist'))
38 # Switch to XCode 9.3 on OSX since it seems to be the last version that supports
39 # i686-apple-darwin. We'll eventually want to upgrade this and it will probably
40 # force us to drop i686-apple-darwin, but let's keep the wheels turning for now.
43 sudo xcode-select --switch /Applications/Xcode_9.3.app
44 displayName: Switch to Xcode 9.3 (OSX)
45 condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
47 - template: install-windows-build-deps.yml
49 # Looks like docker containers have IPv6 disabled by default, so let's turn it
50 # on since libstd tests require it
53 echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
54 sudo service docker restart
55 displayName: Enable IPv6
56 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
58 # Check out all our submodules, but more quickly than using git by using one of
62 mkdir -p $HOME/rustsrc
63 $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
64 condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
65 displayName: Check out submodules (Unix)
67 if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
68 sh src/ci/init_repo.sh . /d/cache/rustsrc
69 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
70 displayName: Check out submodules (Windows)
72 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
76 sudo apt-get install -y python3-setuptools
77 pip3 install awscli --upgrade --user
78 echo "##vso[task.prependpath]$HOME/.local/bin"
79 displayName: Install awscli (Linux)
80 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
81 - script: pip install awscli
82 displayName: Install awscli (non-Linux)
83 condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
85 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
86 # step to see what's going on.
87 - bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
88 displayName: Configure Job Name
90 # As a quick smoke check on the otherwise very fast mingw-check linux builder
91 # check our own internal scripts.
94 git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
96 python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
99 condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check'))
100 displayName: Verify the publish_toolstate script works
104 if [ "$IMAGE" = "" ]; then
107 src/ci/docker/run.sh $IMAGE
109 #timeoutInMinutes: 180
110 timeoutInMinutes: 600
114 AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
115 displayName: Run build
117 # If we're a deploy builder, use the `aws` command to publish everything to our
121 if [ "$AGENT_OS" = "Linux" ]; then
122 rm -rf obj/build/dist/doc
123 upload_dir=obj/build/dist
125 rm -rf build/dist/doc
126 upload_dir=build/dist
129 deploy_dir=rustc-builds
130 if [ "$DEPLOY_ALT" == "1" ]; then
131 deploy_dir=rustc-builds-alt
133 aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
135 AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
136 condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
137 displayName: Upload artifacts