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'))
38 - template: install-windows-build-deps.yml
40 # Check out all our submodules, but more quickly than using git by using one of
44 mkdir -p $HOME/rustsrc
45 $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
46 condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
47 displayName: Check out submodules (Unix)
49 if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
50 sh src/ci/init_repo.sh . /d/cache/rustsrc
51 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
52 displayName: Check out submodules (Windows)
54 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
58 sudo apt-get install -y python3-setuptools
59 pip3 install awscli --upgrade --user
60 echo "##vso[task.prependpath]$HOME/.local/bin"
61 displayName: Install awscli (Linux)
62 condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
63 - script: pip install awscli
64 displayName: Install awscli (non-Linux)
65 condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
67 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
68 # step to see what's going on.
69 - bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
70 displayName: Configure Job Name
72 # As a quick smoke check on the otherwise very fast mingw-check linux builder
73 # check our own internal scripts.
76 git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
78 python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
81 condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check'))
82 displayName: Verify the publish_toolstate script works
86 if [ "$IMAGE" = "" ]; then
89 src/ci/docker/run.sh $IMAGE
95 AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
96 displayName: Run build
100 deploy_dir=rustc-builds
101 if [ "$DEPLOY_ALT" == "1" ]; then
102 deploy_dir=rustc-builds-alt
104 aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir
106 AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
107 condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
108 displayName: Upload artifacts