]> git.lizzy.rs Git - rust.git/blob - .azure-pipelines/steps/run.yml
Fix a typo in the run script
[rust.git] / .azure-pipelines / steps / run.yml
1 # FIXME(linux): need to configure core dumps, enable them, and then dump
2 # backtraces on failure from all core dumps:
3 #
4 # - bash: sudo apt install gdb
5 # - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
6 #
7 # Check travis config for `gdb --batch` command to print all crash logs
8
9 steps:
10 - checkout: self
11   fetchDepth: 2
12
13 - bash: printenv | sort
14   displayName: Show environment variables
15
16 - bash: |
17     set -e
18     df -h
19     du . | sort -nr | head -n100
20   displayName: Show disk usage
21   # FIXME: this hasn't been tested, but maybe it works on Windows? Should test!
22   condition: ne(variables['Agent.OS'], 'Windows_NT')
23
24 - template: install-sccache.yml
25 - template: install-clang.yml
26
27 # Install some dependencies needed to build LLDB/Clang, currently only needed
28 # during the `dist` target
29 - bash: |
30     set -e
31     brew update
32     brew install xz
33     brew install swig
34   displayName: Install build dependencies (OSX)
35   condition: and(eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
36
37 - template: install-windows-build-deps.yml
38
39 # Check out all our submodules, but more quickly than using git by using one of
40 # our custom scripts
41 - bash: |
42     set -e
43     mkdir -p $HOME/rustsrc
44     $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
45   condition: ne(variables['Agent.OS'], 'Windows_NT')
46   displayName: Check out submodules (Unix)
47 - script: |
48     if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
49     sh src/ci/init_repo.sh . /d/cache/rustsrc
50   condition: eq(variables['Agent.OS'], 'Windows_NT')
51   displayName: Check out submodules (Windows)
52
53 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
54 # step to see what's going on.
55 - bash: echo "##vso[task.setvariable variable=CI_JOB_NAME]$SYSTEM_JOBNAME"
56   displayName: Configure Job Name
57
58 # As a quick smoke check on the otherwise very fast mingw-check linux builder
59 # check our own internal scripts.
60 - bash: |
61     set -e
62     git clone --depth=1 https://github.com/rust-lang-nursery/rust-toolstate.git
63     cd rust-toolstate
64     python2.7 "$BUILD_SOURCESDIRECTORY/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "" ""
65     cd ..
66     rm -rf rust-toolstate
67   condition: and(succeeded(), eq(variables['IMAGE'], 'mingw-check'))
68   displayName: Verify the publish_toolstate script works
69
70 - bash: |
71     set -e
72     if [ "$IMAGE" = "" ]; then
73       src/ci/run.sh
74     else
75       src/ci/docker/run.sh $IMAGE
76     fi
77   timeoutInMinutes: 180
78   env:
79     CI: true
80     SRC: .
81     AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
82   displayName: Run build
83
84 - bash: |
85     set -e
86     deploy_dir=rustc-builds
87     if [ "$DEPLOY_ALT" == "1" ]; then
88         deploy_dir=rustc-builds-alt
89     fi
90     aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://$DEPLOY_BUCKET/$deploy_dir
91   env:
92     AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
93   condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
94   displayName: Upload artifacts