]> git.proxmox.com Git - rustc.git/blame - src/ci/azure-pipelines/steps/run.yml
New upstream version 1.47.0+dfsg1
[rustc.git] / src / ci / azure-pipelines / steps / run.yml
CommitLineData
ba9703b0
XL
1#####################################
2## READ BEFORE CHANGING THIS ##
3#####################################
4
5# We're in the process of evaluating GitHub Actions as a possible replacement
6# for Azure Pipelines, and at the moment the configuration is duplicated
7# between the two CI providers. Be sure to also change the configuration in
8# src/ci/github-actions when changing this file.
9
10#####################################
11
dc9dc135
XL
12# FIXME(linux): need to configure core dumps, enable them, and then dump
13# backtraces on failure from all core dumps:
14#
15# - bash: sudo apt install gdb
16# - bash: sudo sh -c 'echo "/checkout/obj/cores/core.%p.%E" > /proc/sys/kernel/core_pattern'
17#
18# Check travis config for `gdb --batch` command to print all crash logs
19
20steps:
21
60c5eb7d
XL
22# Configure our CI_JOB_NAME variable which log analyzers can use for the main
23# step to see what's going on.
24- bash: |
25 builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
26 echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
27 displayName: Configure Job Name
28
dc9dc135
XL
29# Disable automatic line ending conversion, which is enabled by default on
30# Azure's Windows image. Having the conversion enabled caused regressions both
31# in our test suite (it broke miri tests) and in the ecosystem, since we
32# started shipping install scripts with CRLF endings instead of the old LF.
33#
34# Note that we do this a couple times during the build as the PATH and current
35# user/directory change, e.g. when mingw is enabled.
36- bash: git config --global core.autocrlf false
37 displayName: "Disable git automatic line ending conversion"
38
39- checkout: self
40 fetchDepth: 2
41
60c5eb7d
XL
42- bash: src/ci/scripts/setup-environment.sh
43 displayName: Setup environment
44
45- bash: src/ci/scripts/clean-disk.sh
46 displayName: Clean disk
47
e74abb32
XL
48- bash: src/ci/scripts/should-skip-this.sh
49 displayName: Decide whether to run this job
416331ca 50
60c5eb7d
XL
51- bash: src/ci/scripts/collect-cpu-stats.sh
52 displayName: Collect CPU-usage statistics in the background
dc9dc135 53
e74abb32
XL
54- bash: src/ci/scripts/dump-environment.sh
55 displayName: Show the current environment
dc9dc135 56
e74abb32 57- bash: src/ci/scripts/install-sccache.sh
e74abb32
XL
58 displayName: Install sccache
59 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135 60
e74abb32 61- bash: src/ci/scripts/install-clang.sh
e74abb32
XL
62 displayName: Install clang
63 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135 64
e74abb32 65- bash: src/ci/scripts/install-wix.sh
e74abb32
XL
66 displayName: Install wix
67 condition: and(succeeded(), not(variables.SKIP_JOB))
68
ba9703b0
XL
69- bash: src/ci/scripts/symlink-build-dir.sh
70 displayName: Ensure the build happens on a partition with enough space
e74abb32
XL
71 condition: and(succeeded(), not(variables.SKIP_JOB))
72
73- bash: src/ci/scripts/disable-git-crlf-conversion.sh
74 displayName: "Disable git automatic line ending conversion (on C:/)"
75 condition: and(succeeded(), not(variables.SKIP_JOB))
76
77- bash: src/ci/scripts/install-msys2.sh
e74abb32
XL
78 displayName: Install msys2
79 condition: and(succeeded(), not(variables.SKIP_JOB))
80
e74abb32 81- bash: src/ci/scripts/install-mingw.sh
e74abb32
XL
82 displayName: Install MinGW
83 condition: and(succeeded(), not(variables.SKIP_JOB))
84
85- bash: src/ci/scripts/install-ninja.sh
e74abb32
XL
86 displayName: Install ninja
87 condition: and(succeeded(), not(variables.SKIP_JOB))
88
89- bash: src/ci/scripts/enable-docker-ipv6.sh
e74abb32
XL
90 displayName: Enable IPv6 on Docker
91 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135
XL
92
93# Disable automatic line ending conversion (again). On Windows, when we're
94# installing dependencies, something switches the git configuration directory or
95# re-enables autocrlf. We've not tracked down the exact cause -- and there may
96# be multiple -- but this should ensure submodules are checked out with the
97# appropriate line endings.
e74abb32
XL
98- bash: src/ci/scripts/disable-git-crlf-conversion.sh
99 displayName: Disable git automatic line ending conversion
100 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135 101
e74abb32 102- bash: src/ci/scripts/checkout-submodules.sh
e74abb32
XL
103 displayName: Checkout submodules
104 condition: and(succeeded(), not(variables.SKIP_JOB))
105
106- bash: src/ci/scripts/verify-line-endings.sh
e74abb32
XL
107 displayName: Verify line endings
108 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135
XL
109
110# Ensure the `aws` CLI is installed so we can deploy later on, cache docker
111# images, etc.
e74abb32 112- bash: src/ci/scripts/install-awscli.sh
416331ca
XL
113 condition: and(succeeded(), not(variables.SKIP_JOB))
114 displayName: Install awscli
dc9dc135 115
60c5eb7d 116- bash: src/ci/scripts/run-build-from-ci.sh
dc9dc135
XL
117 timeoutInMinutes: 600
118 env:
416331ca
XL
119 AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
120 AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
dc9dc135 121 TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
416331ca 122 condition: and(succeeded(), not(variables.SKIP_JOB))
dc9dc135
XL
123 displayName: Run build
124
e74abb32 125- bash: src/ci/scripts/upload-artifacts.sh
dc9dc135 126 env:
416331ca
XL
127 AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
128 AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
dc9dc135 129 displayName: Upload artifacts
e74abb32
XL
130 # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
131 # builders *should* have the AWS credentials available. Still, explicitly
132 # adding the condition is helpful as this way CI will not silently skip
133 # deploying artifacts from a dist builder if the variables are misconfigured,
134 # erroring about invalid credentials instead.
135 condition: |
136 and(
137 succeeded(), not(variables.SKIP_JOB),
138 or(
139 variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
140 eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')
141 )
142 )