Skip to content

Commit c3b7fcf

Browse files
authored
Move official build pipelines to OneBranch (#1295)
* Add OneBranch pipelines
1 parent 6162c9d commit c3b7fcf

File tree

8 files changed

+764
-0
lines changed

8 files changed

+764
-0
lines changed

.pipelines/OneBranch.Official.yml

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
parameters: # parameters are shown up in ADO UI in a build queue time
2+
- name: 'debug'
3+
displayName: 'Enable debug output'
4+
type: boolean
5+
default: false
6+
7+
variables:
8+
- template: variables/version.yml
9+
- template: variables/OneBranchVariables.yml
10+
parameters:
11+
debug: ${{ parameters.debug }}
12+
13+
name: 2.0.$(date:yyMMdd)$(rev:.r)
14+
15+
trigger: none
16+
17+
resources:
18+
repositories:
19+
- repository: templates
20+
type: git
21+
name: OneBranch.Pipelines/GovernedTemplates
22+
ref: refs/heads/main
23+
24+
extends:
25+
template: v2/Microsoft.Official.yml@templates
26+
parameters:
27+
platform:
28+
name: 'windows_undocked'
29+
product: 'build_tools'
30+
31+
cloudvault:
32+
enabled: false
33+
34+
globalSdl:
35+
tsa:
36+
enabled: false
37+
38+
nugetPublishing:
39+
feeds:
40+
name: CppWinRT
41+
42+
stages:
43+
- stage: build
44+
pool:
45+
type: windows
46+
47+
jobs:
48+
- template: .pipelines/jobs/OneBranchBuild.yml@self
49+
parameters:
50+
BuildConfiguration: $(BuildConfiguration)
51+
BuildVersion: $(BuildVersion)
52+
OfficialBuild: true
53+
54+
- stage: vpack
55+
dependsOn: build
56+
jobs:
57+
- job: Compiler_vpack
58+
pool:
59+
type: windows
60+
variables:
61+
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
62+
63+
ob_createvpack_enabled: true
64+
ob_createvpack_packagename: CppWinRT.Compiler
65+
ob_createvpack_owneralias: cpp4uwpt
66+
ob_createvpack_description: C++/WinRT Compiler
67+
ob_createvpack_provData: true
68+
ob_createvpack_versionAs: parts
69+
ob_createvpack_majorVer: $(MajorVersion)
70+
ob_createvpack_minorVer: $(MinorVersion)
71+
ob_createvpack_patchVer: $(PatchVersion)
72+
ob_createvpack_metadata: $(Build.SourceBranchName).x86.$(Build.BuildNumber).$(Build.SourceVersion)
73+
ob_createvpack_target: $(OSBuildToolsRoot)\cppwinrt
74+
75+
steps:
76+
- task: UseDotNet@2
77+
continueOnError: true
78+
inputs:
79+
packageType: 'runtime'
80+
version: '6.x'
81+
performMultiLevelLookup: true
82+
83+
- task: DownloadPipelineArtifact@2
84+
displayName: 'Download x86 artifacts'
85+
inputs:
86+
artifactName: 'drop_build_x86'
87+
targetPath: '$(Build.SourcesDirectory)/x86'
88+
89+
- task: CopyFiles@2
90+
displayName: 'Stage compiler vpack contents'
91+
inputs:
92+
SourceFolder: $(Build.SourcesDirectory)/x86
93+
Contents: |
94+
cppwinrt/cppwinrt.exe
95+
cppwinrt/cppwinrt.pdb
96+
TargetFolder: $(ob_outputDirectory)
97+
98+
- job: MSBuild_vpack
99+
pool:
100+
type: windows
101+
variables:
102+
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
103+
104+
ob_createvpack_enabled: true
105+
ob_createvpack_packagename: CppWinRT.MSBuild
106+
ob_createvpack_owneralias: cpp4uwpt
107+
ob_createvpack_description: C++/WinRT MSBuild
108+
ob_createvpack_provData: true
109+
ob_createvpack_versionAs: parts
110+
ob_createvpack_majorVer: $(MajorVersion)
111+
ob_createvpack_minorVer: $(MinorVersion)
112+
ob_createvpack_patchVer: $(PatchVersion)
113+
ob_createvpack_metadata: $(Build.SourceBranchName).$(Build.BuildNumber).$(Build.SourceVersion)
114+
ob_createvpack_verbose: true
115+
ob_createvpack_target: $(OSBuildToolsRoot)\cppwinrt
116+
117+
steps:
118+
- task: UseDotNet@2
119+
continueOnError: true
120+
inputs:
121+
packageType: 'runtime'
122+
version: '6.x'
123+
performMultiLevelLookup: true
124+
125+
- task: DownloadPipelineArtifact@2
126+
displayName: 'Download x86 artifacts'
127+
inputs:
128+
artifactName: 'drop_build_x86'
129+
targetPath: '$(Build.SourcesDirectory)/x86'
130+
131+
- task: DownloadPipelineArtifact@2
132+
displayName: 'Download x64 artifacts'
133+
inputs:
134+
artifactName: 'drop_build_x64'
135+
targetPath: '$(Build.SourcesDirectory)/x64'
136+
137+
- task: DownloadPipelineArtifact@2
138+
displayName: 'Download arm artifacts'
139+
inputs:
140+
artifactName: 'drop_build_arm'
141+
targetPath: '$(Build.SourcesDirectory)/arm'
142+
143+
- task: DownloadPipelineArtifact@2
144+
displayName: 'Download arm64 artifacts'
145+
inputs:
146+
artifactName: 'drop_build_arm64'
147+
targetPath: '$(Build.SourcesDirectory)/arm64'
148+
149+
- task: CmdLine@2
150+
displayName: 'Stage MSBuild vpack contents'
151+
inputs:
152+
script: |
153+
set TargetDir=$(ob_outputDirectory)
154+
rd /s /q %TargetDir% >nul 2>&1
155+
md %TargetDir%
156+
cd %TargetDir%
157+
158+
copy $(Build.SourcesDirectory)\vsix\Microsoft.Cpp.CppWinRT.props
159+
copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.props Microsoft.Cpp.CppWinRTEnabled.props
160+
copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.targets Microsoft.Cpp.CppWinRTEnabled.targets
161+
copy $(Build.SourcesDirectory)\nuget\CppWinrtRules.Project.xml CppWinrtRules.Project.xml
162+
echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\i386
163+
echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\Win32
164+
echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\amd64
165+
echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\x64
166+
echo d | xcopy $(Build.SourcesDirectory)\arm\cppwinrt_fast_forwarder.lib build\native\lib\arm
167+
echo d | xcopy $(Build.SourcesDirectory)\arm64\cppwinrt_fast_forwarder.lib build\native\lib\arm64
168+
169+
- stage: NuGet
170+
dependsOn: build
171+
jobs:
172+
- template: .pipelines/jobs/OneBranchNuGet.yml@self
173+
parameters:
174+
BuildConfiguration: $(BuildConfiguration)
175+
BuildVersion: $(BuildVersion)
176+
OfficialBuild: true
177+
178+
- stage: Test
179+
dependsOn: build
180+
jobs:
181+
- template: .pipelines/jobs/OneBranchTest.yml@self
182+
parameters:
183+
BuildConfiguration: $(BuildConfiguration)
184+
BuildVersion: $(BuildVersion)
185+
186+
- stage: Vsix
187+
dependsOn: NuGet
188+
jobs:
189+
- template: .pipelines/jobs/OneBranchVsix.yml@self
190+
parameters:
191+
BuildConfiguration: $(BuildConfiguration)
192+
BuildVersion: $(BuildVersion)
193+
OfficialBuild: true
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
parameters:
2+
- name: 'debug'
3+
displayName: 'Enable debug output'
4+
type: boolean
5+
default: false
6+
7+
variables:
8+
- template: variables/version.yml
9+
- template: variables/OneBranchVariables.yml
10+
parameters:
11+
debug: ${{ parameters.debug }}
12+
13+
name: PullRequest_2.0.$(date:yyMMdd)$(rev:.r)
14+
15+
trigger: none
16+
17+
pool:
18+
type: windows
19+
20+
resources:
21+
repositories:
22+
- repository: templates
23+
type: git
24+
name: OneBranch.Pipelines/GovernedTemplates
25+
ref: refs/heads/main
26+
27+
extends:
28+
template: v2/Microsoft.NonOfficial.yml@templates
29+
parameters:
30+
platform:
31+
name: 'windows_undocked'
32+
product: 'build_tools'
33+
34+
globalSdl:
35+
tsa:
36+
enabled: false
37+
sbom:
38+
enabled: true
39+
40+
stages:
41+
- stage: build
42+
jobs:
43+
- template: .pipelines/jobs/OneBranchBuild.yml@self
44+
parameters:
45+
BuildConfiguration: $(BuildConfiguration)
46+
BuildVersion: $(BuildVersion)
47+
48+
- stage: NuGet
49+
dependsOn: build
50+
jobs:
51+
- template: .pipelines/jobs/OneBranchNuGet.yml@self
52+
parameters:
53+
BuildConfiguration: $(BuildConfiguration)
54+
BuildVersion: $(BuildVersion)
55+
56+
- stage: Test
57+
dependsOn: build
58+
jobs:
59+
- template: .pipelines/jobs/OneBranchTest.yml@self
60+
parameters:
61+
BuildConfiguration: $(BuildConfiguration)
62+
BuildVersion: $(BuildVersion)
63+
64+
- stage: Vsix
65+
dependsOn: NuGet
66+
jobs:
67+
- template: .pipelines/jobs/OneBranchVsix.yml@self
68+
parameters:
69+
BuildConfiguration: $(BuildConfiguration)
70+
BuildVersion: $(BuildVersion)

0 commit comments

Comments
 (0)