-
Notifications
You must be signed in to change notification settings - Fork 274
Expand file tree
/
Copy pathOneBranch.Official.yml
More file actions
157 lines (137 loc) · 5.26 KB
/
OneBranch.Official.yml
File metadata and controls
157 lines (137 loc) · 5.26 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
parameters: # parameters are shown up in ADO UI in a build queue time
- name: 'debug'
displayName: 'Enable debug output'
type: boolean
default: false
variables:
- template: variables/version.yml
parameters:
OfficialBuild: true
- template: variables/OneBranchVariables.yml
parameters:
debug: ${{ parameters.debug }}
name: 3.0.$(date:yyMMdd)$(rev:.r)
trigger: none
resources:
repositories:
- repository: templates
type: git
name: OneBranch.Pipelines/GovernedTemplates
ref: refs/heads/main
extends:
template: v2/Microsoft.Official.yml@templates
parameters:
platform:
name: 'windows_undocked'
product: 'build_tools'
featureFlags:
WindowsHostVersion:
Version: 2022
cloudvault:
enabled: false
globalSdl:
isNativeCode: true
asyncSdl:
enabled: true
tsa:
enabled: true
codeql:
compiled:
enabled: true
tsaEnabled: true
stages:
- stage: build
jobs:
- template: .pipelines/jobs/OneBranchBuild.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
OfficialBuild: true
- stage: vpack
dependsOn: build
jobs:
- job: Compiler_vpack
pool:
type: windows
variables:
ob_outputDirectory: '$(Build.SourcesDirectory)\out'
ob_createvpack_enabled: true
ob_createvpack_packagename: CppWinRT.Compiler
ob_createvpack_owneralias: cpp4uwpt
ob_createvpack_description: C++/WinRT Compiler
ob_createvpack_provData: true
ob_createvpack_versionAs: parts
ob_createvpack_majorVer: $(MajorVersion)
ob_createvpack_minorVer: $(MinorVersion)
ob_createvpack_patchVer: $(PatchVersion)
ob_createvpack_metadata: $(Build.SourceBranchName).x86.$(Build.BuildNumber).$(Build.SourceVersion)
ob_createvpack_target: $(OSBuildToolsRoot)\cppwinrt
steps:
- task: UseDotNet@2
continueOnError: true
inputs:
packageType: 'runtime'
version: '6.x'
performMultiLevelLookup: true
- task: DownloadPipelineArtifact@2
displayName: 'Download x86 artifacts'
inputs:
artifactName: 'drop_build_x86'
targetPath: '$(Build.SourcesDirectory)/x86'
- task: DownloadPipelineArtifact@2
displayName: 'Download x64 artifacts'
inputs:
artifactName: 'drop_build_x64'
targetPath: '$(Build.SourcesDirectory)/x64'
- task: DownloadPipelineArtifact@2
displayName: 'Download arm64 artifacts'
inputs:
artifactName: 'drop_build_arm64'
targetPath: '$(Build.SourcesDirectory)/arm64'
- task: CopyFiles@2
displayName: 'Stage compiler vpack contents'
inputs:
SourceFolder: $(Build.SourcesDirectory)/x86/cppwinrt
Contents: |
cppwinrt.exe
cppwinrt.pdb
TargetFolder: $(ob_outputDirectory)
- task: CmdLine@2
displayName: 'Stage MSBuild vpack contents'
inputs:
script: |
set TargetDir=$(ob_outputDirectory)
cd %TargetDir%
copy $(Build.SourcesDirectory)\vsix\Microsoft.Cpp.CppWinRT.props
copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.props Microsoft.Cpp.CppWinRTEnabled.props
copy $(Build.SourcesDirectory)\nuget\Microsoft.Windows.CppWinRT.targets Microsoft.Cpp.CppWinRTEnabled.targets
copy $(Build.SourcesDirectory)\nuget\CppWinrtRules.Project.xml CppWinrtRules.Project.xml
echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\i386
echo d | xcopy $(Build.SourcesDirectory)\x86\cppwinrt_fast_forwarder.lib build\native\lib\Win32
echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\amd64
echo d | xcopy $(Build.SourcesDirectory)\x64\cppwinrt_fast_forwarder.lib build\native\lib\x64
echo d | xcopy $(Build.SourcesDirectory)\arm64\cppwinrt_fast_forwarder.lib build\native\lib\arm64
- stage: NuGet
dependsOn: build
jobs:
- template: .pipelines/jobs/OneBranchNuGet.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
NugetPackageVersion: $(NugetPackageVersion)
OfficialBuild: true
- stage: Test
dependsOn: build
jobs:
- template: .pipelines/jobs/OneBranchTest.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
- stage: Vsix
dependsOn: NuGet
jobs:
- template: .pipelines/jobs/OneBranchVsix.yml@self
parameters:
BuildConfiguration: $(BuildConfiguration)
BuildVersion: $(BuildVersion)
NugetPackageVersion: $(NugetPackageVersion)
OfficialBuild: true