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