forked from dotnet/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
178 lines (162 loc) · 7.24 KB
/
azure-pipelines.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
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
trigger:
batch: true
branches:
include:
- release/11.x
pr:
branches:
include:
- release/11.x
variables:
- template: eng/common-variables.yml
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: true
enablePublishBuildAssets: true
enablePublishUsingPipelines: true
variables:
- _BuildConfig: Release
jobs:
############ LINUX BUILD ############
- job: Build_Linux
displayName: Linux
timeoutInMinutes: 120
strategy:
matrix:
x64:
vmImageName: ubuntu-16.04
assetManifestOS: linux
assetManifestPlatform: x64
imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-bfcd90a-20200121150017
rootfs:
archflag: --arch x64
LLVMTableGenArg:
arm64:
vmImageName: ubuntu-16.04
assetManifestOS: linux
assetManifestPlatform: arm64
imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-cfdd435-20200121150126
rootfs: /crossrootfs/arm64
archflag: --arch arm64
LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
arm:
vmImageName: ubuntu-16.04
assetManifestOS: linux
assetManifestPlatform: arm
imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-09ec757-20200320131433
rootfs: /crossrootfs/arm
archflag: --arch arm
LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
pool:
vmImage: $(vmImageName)
container:
image: $(imagename)
steps:
- bash: |
set -ex
git clean -ffdx
git reset --hard HEAD
displayName: 'Clean up working directory'
- bash: |
./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
displayName: 'Build host llvm-tblgen for cross-compiling'
condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))
- bash: |
./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg)
displayName: 'Build and package'
env:
ROOTFS_DIR: $(rootfs)
- bash: |
./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
############ MACOS BUILD ############
- job: Build_macOS
displayName: macOS
timeoutInMinutes: 120
strategy:
matrix:
x64:
vmImageName: macOS-10.15
assetManifestOS: osx
assetManifestPlatform: x64
archflag: --arch x64
LLVMTableGenArg:
arm64:
vmImageName: macOS-10.15
assetManifestOS: osx
assetManifestPlatform: arm64
archflag: --arch arm64
LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen
pool:
vmImage: $(vmImageName)
steps:
- bash: |
set -ex
git clean -ffdx
git reset --hard HEAD
displayName: 'Clean up working directory'
- bash: |
./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true
displayName: 'Build host llvm-tblgen for cross-compiling'
condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))
- bash: |
./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg)
displayName: 'Build and package'
- bash:
./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
############ WINDOWS BUILD ############
- job: Build_Windows
displayName: Windows
timeoutInMinutes: 120
strategy:
matrix:
x64:
vmImageName: windows-2019
assetManifestOS: win
assetManifestPlatform: x64
archflag: -arch x64
LLVMTableGenArg:
arm64:
vmImageName: windows-2019
assetManifestOS: win
assetManifestPlatform: arm64
archflag: -arch arm64
LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe
arm:
vmImageName: windows-2019
assetManifestOS: win
assetManifestPlatform: arm
archflag: -arch arm
LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe
pool:
vmImage: $(vmImageName)
steps:
- bash: |
set -ex
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'
condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64'))
- powershell: eng\build.ps1 -ci -restore -build -pack $(archflag) -configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg)
displayName: 'Build and package'
- powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) -projects $(Build.SourcesDirectory)\llvm.proj
displayName: Publish packages
condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
############ POST BUILD ARCADE LOGIC ############
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
publishingInfraVersion: 3
enableSourceLinkValidation: false
enableSigningValidation: false
enableSymbolValidation: false
enableNugetValidation: true