Skip to content

Commit df29e31

Browse files
authored
Convert Foundation Build Pipelines to OneBranch (#3587)
1 parent b166e36 commit df29e31

28 files changed

+2797
-1071
lines changed

BuildAll.ps1

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,24 @@ $buildOverridePath = "build\override"
3232
$BasePath = "BuildOutput/FullNuget"
3333

3434
# FUTURE(YML2PS): Update build to no longer place generated files in sources directory
35-
if ($Clean)
35+
if ($Clean)
3636
{
3737
$CleanTargets = @(
3838
"BuildOutput",
3939
"obj",
40+
".user",
4041
$buildOverridePath
4142
)
42-
43+
4344
foreach ($CleanTarget in $CleanTargets)
4445
{
4546
$CleanTargetPath = (Join-Path $env:Build_SourcesDirectory $CleanTarget)
46-
47+
4748
if (Test-Path ($CleanTargetPath)) {
4849
Remove-Item $CleanTargetPath -recurse
4950
}
5051
}
51-
52+
5253
Exit
5354
}
5455

@@ -89,7 +90,7 @@ Try {
8990

9091
if ($AzureBuildStep -ne "all")
9192
{
92-
# Some builds have "-branchname" appended, but when this happens the environment variable
93+
# Some builds have "-branchname" appended, but when this happens the environment variable
9394
# TFS_BUILDNUMBER has the un-modified version.
9495
if ($env:TFS_BUILDNUMBER)
9596
{
@@ -99,17 +100,17 @@ Try {
99100
$yymm = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 10, 4)
100101
$dd = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 5, 2)
101102
$revision = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 3, 3)
102-
103+
103104
$WindowsAppSDKVersionProperty = "/p:WindowsAppSDKVersionBuild=$yymm /p:WindowsAppSDKVersionRevision=$dd$revision"
104-
105+
105106
# If $AzureBuildStep is not "all", that means we are in the pipeline
106107
$WindowsAppSDKBuildPipeline = 1
107108
}
108-
# PreFastSetup is specifically for use when preparing for PREFast scans. It triggers the same actions below as BuildBinaries or BuildMRT, except
109-
# PreFastSetup stops short of calling msBuild.exe to build the target, which the Guardian:PREFast task does _not_ support, so the caller of this
110-
# script needs to resort to calling the MSBuild/VSBuild task later to build the target, which the Guardian:PREFast task does support. Structuring
109+
# PreFastSetup is specifically for use when preparing for PREFast scans. It triggers the same actions below as BuildBinaries or BuildMRT, except
110+
# PreFastSetup stops short of calling msBuild.exe to build the target, which the Guardian:PREFast task does _not_ support, so the caller of this
111+
# script needs to resort to calling the MSBuild/VSBuild task later to build the target, which the Guardian:PREFast task does support. Structuring
111112
# the code this way allows minimally diveraging the flow while supporting building the target both via this script and the VSBuild/MSBuild task.
112-
if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildBinaries") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup")))
113+
if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildBinaries") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup")))
113114
{
114115
& .\.nuget\nuget.exe restore WindowsAppRuntime.sln -configfile NuGet.config
115116

@@ -148,7 +149,7 @@ Try {
148149
}
149150
}
150151
# PreFastSetup intentionally skips the call to MSBuild.exe below.
151-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildBinaries"))
152+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildBinaries"))
152153
{
153154
foreach($configurationToRun in $configuration.Split(","))
154155
{
@@ -172,7 +173,7 @@ Try {
172173
}
173174
}
174175
}
175-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup"))
176+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMRT") -Or ($AzureBuildStep -eq "PreFastSetup"))
176177
{
177178
#------------------
178179
# Build mrtcore.sln and move output to staging.
@@ -231,7 +232,7 @@ Try {
231232
}
232233

233234
# PreFastSetup intentionally skips the call to MSBuild.exe below.
234-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMRT"))
235+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMRT"))
235236
{
236237
# Build mrt core.
237238
foreach($configurationToRun in $configuration.Split(","))
@@ -253,7 +254,7 @@ Try {
253254
}
254255
}
255256
}
256-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildAnyCPU"))
257+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildAnyCPU"))
257258
{
258259
#------------------
259260
# Build windowsAppRuntime.sln (anyCPU) and move output to staging.
@@ -266,13 +267,13 @@ Try {
266267
exit 1
267268
}
268269
}
269-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageFiles"))
270+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageFiles"))
270271
{
271272
#------------------
272273
# Stage files for Packing
273-
#------------------
274+
#------------------
274275
if(-not (test-path "$BasePath"))
275-
{
276+
{
276277
new-item -path "$BasePath" -itemtype "directory"
277278
}
278279

@@ -322,7 +323,7 @@ Try {
322323
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\mrm\MRM.pdb" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
323324
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.pdb" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
324325
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.dll" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
325-
326+
326327
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\mrm\MRM.lib" -destination "$BasePath\lib\win10-$platformToRun" -force
327328

328329
if($platformToRun -eq "x86")
@@ -389,9 +390,9 @@ Try {
389390
exit 1
390391
}
391392
}
392-
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackNuget"))
393+
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackNuget"))
393394
{
394-
$nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Foundation.nuspec"
395+
$nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Foundation.nuspec"
395396
Copy-Item -Path ".\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec" -Destination $nuspecPath
396397

397398
# Add the version to the nuspec.
@@ -408,8 +409,8 @@ Try {
408409
exit 1
409410
}
410411
}
411-
}
412-
Catch
412+
}
413+
Catch
413414
{
414415
$formatstring = "`n{0}`n`n{1}`n`n"
415416
$fields = $_, $_.ScriptStackTrace

build/AzurePipelinesTemplates/WindowsAppSDK-BinaryAnalysis-steps.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

build/AzurePipelinesTemplates/WindowsAppSDK-BuildAndPublishPGONuGet-Job.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)