]> git.lizzy.rs Git - rust.git/blob - src/ci/azure-pipelines/steps/run.yml
Rollup merge of #66461 - clemencetbk:master, r=GuillaumeGomez
[rust.git] / src / ci / 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
11 # Configure our CI_JOB_NAME variable which log analyzers can use for the main
12 # step to see what's going on.
13 - bash: |
14     builder=$(echo $AGENT_JOBNAME | cut -d ' ' -f 2)
15     echo "##vso[task.setvariable variable=CI_JOB_NAME]$builder"
16   displayName: Configure Job Name
17
18 # Disable automatic line ending conversion, which is enabled by default on
19 # Azure's Windows image. Having the conversion enabled caused regressions both
20 # in our test suite (it broke miri tests) and in the ecosystem, since we
21 # started shipping install scripts with CRLF endings instead of the old LF.
22 #
23 # Note that we do this a couple times during the build as the PATH and current
24 # user/directory change, e.g. when mingw is enabled.
25 - bash: git config --global core.autocrlf false
26   displayName: "Disable git automatic line ending conversion"
27
28 - checkout: self
29   fetchDepth: 2
30
31 - bash: src/ci/scripts/should-skip-this.sh
32   displayName: Decide whether to run this job
33
34 - bash: src/ci/scripts/collect-cpu-stats.sh
35   displayName: Collect CPU-usage statistics in the background
36
37 - bash: src/ci/scripts/dump-environment.sh
38   displayName: Show the current environment
39
40 - bash: src/ci/scripts/install-sccache.sh
41   env:
42     AGENT_OS: $(Agent.OS)
43   displayName: Install sccache
44   condition: and(succeeded(), not(variables.SKIP_JOB))
45
46 - bash: src/ci/scripts/install-clang.sh
47   env:
48     AGENT_OS: $(Agent.OS)
49   displayName: Install clang
50   condition: and(succeeded(), not(variables.SKIP_JOB))
51
52 - bash: src/ci/scripts/switch-xcode.sh
53   env:
54     AGENT_OS: $(Agent.OS)
55   displayName: Switch to Xcode 9.3
56   condition: and(succeeded(), not(variables.SKIP_JOB))
57
58 - bash: src/ci/scripts/install-wix.sh
59   env:
60     AGENT_OS: $(Agent.OS)
61   displayName: Install wix
62   condition: and(succeeded(), not(variables.SKIP_JOB))
63
64 - bash: src/ci/scripts/install-innosetup.sh
65   env:
66     AGENT_OS: $(Agent.OS)
67   displayName: Install InnoSetup
68   condition: and(succeeded(), not(variables.SKIP_JOB))
69
70 - bash: src/ci/scripts/windows-symlink-build-dir.sh
71   env:
72     AGENT_OS: $(Agent.OS)
73   displayName: Ensure the build happens on C:\ instead of D:\
74   condition: and(succeeded(), not(variables.SKIP_JOB))
75
76 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
77   displayName: "Disable git automatic line ending conversion (on C:/)"
78   condition: and(succeeded(), not(variables.SKIP_JOB))
79
80 - bash: src/ci/scripts/install-msys2.sh
81   env:
82     AGENT_OS: $(Agent.OS)
83     SYSTEM_WORKFOLDER: $(System.Workfolder)
84   displayName: Install msys2
85   condition: and(succeeded(), not(variables.SKIP_JOB))
86
87 - bash: src/ci/scripts/install-msys2-packages.sh
88   env:
89     AGENT_OS: $(Agent.OS)
90     SYSTEM_WORKFOLDER: $(System.Workfolder)
91   displayName: Install msys2 packages
92   condition: and(succeeded(), not(variables.SKIP_JOB))
93
94 - bash: src/ci/scripts/install-mingw.sh
95   env:
96     AGENT_OS: $(Agent.OS)
97     SYSTEM_WORKFOLDER: $(System.Workfolder)
98   displayName: Install MinGW
99   condition: and(succeeded(), not(variables.SKIP_JOB))
100
101 - bash: src/ci/scripts/install-ninja.sh
102   env:
103     AGENT_OS: $(Agent.OS)
104   displayName: Install ninja
105   condition: and(succeeded(), not(variables.SKIP_JOB))
106
107 - bash: src/ci/scripts/enable-docker-ipv6.sh
108   env:
109     AGENT_OS: $(Agent.OS)
110   displayName: Enable IPv6 on Docker
111   condition: and(succeeded(), not(variables.SKIP_JOB))
112
113 # Disable automatic line ending conversion (again). On Windows, when we're
114 # installing dependencies, something switches the git configuration directory or
115 # re-enables autocrlf. We've not tracked down the exact cause -- and there may
116 # be multiple -- but this should ensure submodules are checked out with the
117 # appropriate line endings.
118 - bash: src/ci/scripts/disable-git-crlf-conversion.sh
119   displayName: Disable git automatic line ending conversion
120   condition: and(succeeded(), not(variables.SKIP_JOB))
121
122 - bash: src/ci/scripts/checkout-submodules.sh
123   env:
124     AGENT_OS: $(Agent.OS)
125   displayName: Checkout submodules
126   condition: and(succeeded(), not(variables.SKIP_JOB))
127
128 - bash: src/ci/scripts/verify-line-endings.sh
129   env:
130     AGENT_OS: $(Agent.OS)
131   displayName: Verify line endings
132   condition: and(succeeded(), not(variables.SKIP_JOB))
133
134 # Ensure the `aws` CLI is installed so we can deploy later on, cache docker
135 # images, etc.
136 - bash: src/ci/scripts/install-awscli.sh
137   env:
138     AGENT_OS: $(Agent.OS)
139   condition: and(succeeded(), not(variables.SKIP_JOB))
140   displayName: Install awscli
141
142 - bash: src/ci/scripts/run-build-from-ci.sh
143   timeoutInMinutes: 600
144   env:
145     AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
146     AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
147     TOOLSTATE_REPO_ACCESS_TOKEN: $(TOOLSTATE_REPO_ACCESS_TOKEN)
148   condition: and(succeeded(), not(variables.SKIP_JOB))
149   displayName: Run build
150
151 - bash: src/ci/scripts/upload-artifacts.sh
152   env:
153     AWS_ACCESS_KEY_ID: $(UPLOAD_AWS_ACCESS_KEY_ID)
154     AWS_SECRET_ACCESS_KEY: $(UPLOAD_AWS_SECRET_ACCESS_KEY)
155   displayName: Upload artifacts
156   # Adding a condition on DEPLOY=1 or DEPLOY_ALT=1 is not needed as all deploy
157   # builders *should* have the AWS credentials available. Still, explicitly
158   # adding the condition is helpful as this way CI will not silently skip
159   # deploying artifacts from a dist builder if the variables are misconfigured,
160   # erroring about invalid credentials instead.
161   condition: |
162     and(
163       succeeded(), not(variables.SKIP_JOB),
164       or(
165         variables.UPLOAD_AWS_SECRET_ACCESS_KEY,
166         eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')
167       )
168     )