forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
234 lines (216 loc) · 9.42 KB
/
azure-pipelines.yml
File metadata and controls
234 lines (216 loc) · 9.42 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
trigger:
batch: true
branches:
include:
- dotnet/main*
- dotnet/release/*
pr: none
variables:
- template: /eng/common-variables.yml@self
- template: /eng/common/templates-official/variables/pool-providers.yml@self
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
parameters:
- name: linuxBuilds
type: object
default:
- arch: x64
assetManifestOS: linux
imagename: azurelinux3crossamd64
rootfs: /crossrootfs/x64
ExtraArgs: -p:LibsRoot=/crossrootfs/x64/usr/lib/x86_64-linux-gnu
ClangTargetArg: /p:ClangTarget=x86_64-linux-gnu
ClangBinDirArg: /p:ClangBinDir=/usr/local/bin
- arch: arm64
assetManifestOS: linux
imagename: azurelinux3crossarm64
rootfs: /crossrootfs/arm64
ExtraArgs: -p:LibsRoot=/crossrootfs/arm64/usr/lib/aarch64-linux-gnu
ClangTargetArg: /p:ClangTarget=aarch64-linux-gnu
ClangBinDirArg: /p:ClangBinDir=/usr/local/bin
- arch: arm
assetManifestOS: linux
imagename: azurelinux3crossarm
rootfs: /crossrootfs/arm
ExtraArgs: -p:LibsRoot=/crossrootfs/arm/usr/lib/arm-linux-gnueabihf
ClangTargetArg: /p:ClangTarget=arm-linux-gnueabihf
ClangBinDirArg: /p:ClangBinDir=/usr/local/bin
- arch: x64
assetManifestOS: linux-musl
imagename: azurelinux3crossamd64alpine
rootfs: /crossrootfs/x64
ExtraArgs: -p:LibsRoot=/crossrootfs/x64/lib -p:OutputRid=linux-musl-x64
ClangTargetArg: /p:ClangTarget=x86_64-alpine-linux-musl
ClangBinDirArg: /p:ClangBinDir=/usr/local/bin
- arch: arm64
assetManifestOS: linux-musl
imagename: azurelinux3crossarm64alpine
rootfs: /crossrootfs/arm64
ExtraArgs: -p:LibsRoot=/crossrootfs/arm64/lib -p:OutputRid=linux-musl-arm64
ClangTargetArg: /p:ClangTarget=aarch64-alpine-linux-musl
ClangBinDirArg: /p:ClangBinDir=/usr/local/bin
- name: macBuilds
type: object
default:
- arch: x64
ClangTargetArg: /p:ClangTarget=x86_64-apple-darwin
- arch: arm64
ClangTargetArg: /p:ClangTarget=aarch64-apple-darwin
- name: windowsBuilds
type: object
default:
- arch: x64
BuildConfig: Release
- arch: arm64
BuildConfig: Release
- arch: x64
BuildConfig: Debug
- arch: arm64
BuildConfig: Debug
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
sdl:
policheck:
enabled: true
exclusionsFile: $(Build.SourcesDirectory)\.config\PoliCheckExclusions.xml
tsa:
enabled: true
codeql:
runSourceLanguagesInSourceAnalysis: true
sourceAnalysisPool:
name: $(DncEngInternalBuildPool)
image: 1es-windows-2022
os: windows
credscan:
suppressionsFile: $(Build.SourcesDirectory)/.config/CredScanSuppressions.json
containers:
azurelinux3crossamd64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64
azurelinux3crossarm64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64
azurelinux3crossarm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm
azurelinux3crossamd64alpine:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64-alpine
azurelinux3crossarm64alpine:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-arm64-alpine
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
jobs:
############ LINUX BUILD ############
- ${{ each buildjob in parameters.linuxBuilds }}:
- job: Build_${{ replace(buildjob.assetManifestOS, '-', '_') }}_${{ buildjob.arch }}
displayName: ${{ buildjob.assetManifestOS }} ${{ buildjob.arch }}
timeoutInMinutes: 600
variables:
- _BuildConfig: Release
pool:
name: $(DncEngInternalBuildPool)
image: 1es-ubuntu-2204
os: linux
container: ${{ buildjob.imagename }}
templateContext:
sdl:
codeql:
compiled:
enabled: false
justificationForDisabling: CodeQL times out on Windows even after 10 hours timeout and we have a separate pipeline for CodeQL
steps:
- bash: |
set -ex
git clean -ffdx
git reset --hard HEAD
displayName: 'Clean up working directory'
- bash: |
su -c "tdnf install -y zlib-devel"
displayName: 'Install build dependencies'
- bash: |
./build.sh --ci --restore --build --pack --arch ${{ buildjob.arch }} --configuration $(_BuildConfig) $(_InternalBuildArgs) ${{ buildjob.ClangBinDirArg }} ${{ buildjob.ClangTargetArg }} ${{ buildjob.ExtraArgs }}
displayName: 'Build and package'
env:
ROOTFS_DIR: ${{ buildjob.rootfs }}
- bash: |
./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=${{ buildjob.assetManifestOS }} /p:PlatformName=${{ buildjob.arch }} --projects $(Build.SourcesDirectory)/llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
############ MACOS BUILD ############
- ${{ each buildjob in parameters.macBuilds }}:
- job: Build_macOS_${{ buildjob.arch }}
displayName: macOS ${{ buildjob.arch }}
timeoutInMinutes: 600
variables:
- _BuildConfig: Release
pool:
name: Azure Pipelines
image: macos-13
os: macOS
templateContext:
sdl:
codeql:
compiled:
enabled: false
justificationForDisabling: CodeQL times out on Windows even after 10 hours timeout and we have a separate pipeline for CodeQL
steps:
- bash: |
set -ex
git clean -ffdx
git reset --hard HEAD
displayName: 'Clean up working directory'
- bash: |
./build.sh --ci --restore --build --pack --arch ${{ buildjob.arch }} --configuration $(_BuildConfig) ${{ buildjob.ClangTargetArg }} $(_InternalBuildArgs)
displayName: 'Build and package'
- bash: |
./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=osx /p:PlatformName=${{ buildjob.arch }} --projects $(Build.SourcesDirectory)/llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
############ WINDOWS BUILD ############
- ${{ each buildjob in parameters.windowsBuilds }}:
- job: Build_Windows_${{ buildjob.arch }}_${{ buildjob.BuildConfig }}
displayName: Windows ${{ buildjob.arch }} ${{ buildjob.BuildConfig }}
timeoutInMinutes: 600
variables:
- _BuildConfig: ${{ buildjob.BuildConfig }}
pool:
name: $(DncEngInternalBuildPool)
image: windows.vs2022.amd64
os: windows
templateContext:
sdl:
codeql:
compiled:
enabled: false
justificationForDisabling: CodeQL times out on Windows even after 10 hours timeout and we have a separate pipeline for CodeQL
steps:
- checkout: self
clean: true
fetchDepth: 2
- script: |
git clean -ffdx
git reset --hard HEAD
displayName: 'Clean up working directory'
- powershell: eng\build.ps1 -ci -restore -build -arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
displayName: 'Build host llvm-tblgen for cross-compiling'
- powershell: eng\build.ps1 -ci -restore -build -pack -arch ${{ buildjob.arch }} -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:NativeTablegenDir=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin
displayName: 'Build and package'
- powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(_BuildConfig)-win /p:PlatformName=${{ buildjob.arch }} -projects $(Build.SourcesDirectory)\llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
############ POST BUILD ARCADE LOGIC ############
- template: /eng/common/templates-official/post-build/post-build.yml@self
parameters:
enableSourceLinkValidation: false
enableSigningValidation: false
enableSymbolValidation: false
enableNugetValidation: true