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['RUST_CHECK_TARGET'],'dist'))
40 sudo xcode-select --switch /Applications/Xcode_9.3.app
41 displayName: Switch to Xcode 9.3 (OSX)
42 condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
44 - template: install-windows-build-deps.yml
46 # Looks like docker containers have IPv6 disabled by default, so let's turn it
47 # on since libstd tests require it
50 echo '{"ipv6":true,"fixed-cidr-v6":"fd9a:8454:6789:13f7::/64"}' | sudo tee /etc/docker/daemon.json
51 sudo service docker restart
52 displayName: Enable IPv6
53 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
55 # Check out all our submodules, but more quickly than using git by using one of
59 mkdir -p $HOME/rustsrc
60 $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
61 condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
62 displayName: Check out submodules (Unix)
64 if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
65 sh src/ci/init_repo.sh . /d/cache/rustsrc
66 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
67 displayName: Check out submodules (Windows)
69 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
73 sudo apt-get install -y python3-setuptools
74 pip3 install awscli --upgrade --user
75 echo "##vso[task.prependpath]$HOME/.local/bin"
76 displayName: Install awscli (Linux)
77 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
78 - script: pip install awscli
79 displayName: Install awscli (non-Linux)
80 condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
82 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
83 # step to see what's going on.
84 - bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
85 displayName: Configure Job Name
87 # As a quick smoke check on the otherwise very fast mingw-check linux builder
88 # check our own internal scripts.
91 git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
93 python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
96 condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check'))
97 displayName: Verify the publish_toolstate script works
101 if [ "$IMAGE" = "" ]; then
104 src/ci/docker/run.sh $IMAGE
106 #timeoutInMinutes: 180
107 timeoutInMinutes: 600
111 AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
112 displayName: Run build
116 if [ "$AGENT_OS" = "Linux" ]; then
117 rm -rf obj/build/dist/doc
118 upload_dir=obj/build/dist deploy/$BUILD_SOURCEVERSION
120 rm -rf build/dist/doc
121 upload_dir=build/dist
124 deploy_dir=rustc-builds
125 if [ "$DEPLOY_ALT" == "1" ]; then
126 deploy_dir=rustc-builds-alt
128 aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
130 AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
131 condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
132 displayName: Upload artifacts