Update pipelines to use BuildTransportPackage.ps1 (#3062)

This commit is contained in:
Kyaw Thant 2022-10-20 12:31:25 -07:00 коммит произвёл GitHub
Родитель 757d8c2cac
Коммит 8224ec5c7d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 717 добавлений и 1523 удалений

Просмотреть файл

@ -15,9 +15,13 @@ Main branch points to the external feed.
#>
Param(
[string]$Platform,
[string]$Configuration,
[string]$LocalPackagesPath = $null,
[string]$PackageVersion = "1.1.1.1",
[string]$Platform = "x64",
[string]$Configuration = "Release",
[string]$AzureBuildStep = "all",
[string]$OutputDirectory = "",
[string]$PGOBuildMode = "Optimize",
[string]$BasePath = "BuildOutput/FullNuget",
[string]$UpdateVersionDetailsPath = $null
)
@ -33,210 +37,250 @@ if(-not (test-path ".nuget\nuget.exe"))
Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile .nuget\nuget.exe
}
# Restore nuget packages for everything in WIndowsAppRuntime.sln and other files.
& .\.nuget\nuget.exe restore "build\packages.config" -PackagesDirectory packages -ConfigFile "build\licensing.nuget.config"
& .\.nuget\nuget.exe restore WindowsAppRuntime.sln -configfile nuget.config
& .\.nuget\nuget.exe restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" -configfile nuget.config
# If the call to restore WindowsAppRuntime_Insights fails check to make sure all Window SDK's from 17760 are installed.
& .\.nuget\nuget.exe restore "dev\WindowsAppRuntime_Insights\packages.config" -ConfigFile "dev\WindowsAppRuntime_Insights\nuget.config" -PackagesDirectory "dev\WindowsAppRuntime_Insights\packages"
$configurationForMrtAndAnyCPU = "Release"
$MRTSourcesDirectory = "dev\MRTCore"
$VCToolsInstallDir = . "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath
write-host "VCToolsInstallDir: $VCToolsInstallDir"
$msBuildPath = "$VCToolsInstallDir\MSBuild\Current\Bin\msbuild.exe"
write-host "msBuildPath: $msBuildPath"
#------------------
# Build windowsAppRuntime.sln and move output to staging.
#------------------
# Generate package config and copy over misc files.
& .\build\Scripts\ConvertVersionDetailsToPackageConfig.ps1 -versionDetailsPath "eng\Version.Details.xml" -packageConfigPath "build\packages.config"
$buildOverridePath = "build\override"
# Generate overrides
# Make sure override directory exists.
$buildOverridePath = "build\override"
if(-not (test-path "$buildOverridePath"))
{
new-item -path "$buildOverridePath" -itemtype "directory"
}
.\tools\GenerateDynamicDependencyOverrides.ps1 -Path "$buildOverridePath"
.\tools\GeneratePushNotificationsOverrides.ps1 -Path "$buildOverridePath"
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse
if (($srcPath -ne $null)){
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse
if (($destinationPaths -ne $null)) {
foreach ($destPath in $destinationPaths) {
Write-Host 'SourcePath:' $srcPath.FullName
Write-Host 'DestinationPath:' $destPath.FullName
Copy-Item -Force $srcPath.FullName $destPath.FullName
}
}
}
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
Try {
$WindowsAppSDKBuildPipeline = 0
if ($AzureBuildStep -ne "all")
{
write-host "Building WindowsAppRuntime.sln for configuration $configurationToRun and platform:$platformToRun"
& $msBuildPath /restore WindowsAppRuntime.sln /p:Configuration=$configurationToRun,Platform=$platformToRun
# Some builds have "-branchname" appended, but when this happens the environment variable
# TFS_BUILDNUMBER has the un-modified version.
if ($env:TFS_BUILDNUMBER)
{
$env:BUILD_BUILDNUMBER = $env:TFS_BUILDNUMBER
}
Write-Host "BuildNumber : " $env:BUILD_BUILDNUMBER
$yymm = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 10, 4)
$dd = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 5, 2)
$revision = $env:BUILD_BUILDNUMBER.substring($env:BUILD_BUILDNUMBER.length - 3, 3)
$WindowsAppSDKVersionProperty = "/p:WindowsAppSDKVersionBuild=$yymm /p:WindowsAppSDKVersionRevision=$dd$revision"
# If $AzureBuildStep is not "all", that means we are in the pipeline
$WindowsAppSDKBuildPipeline = 1
#------------------
# Build windowsAppRuntime.sln and move output to staging.
#------------------
.\tools\GenerateDynamicDependencyOverrides.ps1 -Path "$buildOverridePath"
.\tools\GeneratePushNotificationsOverrides.ps1 -Path "$buildOverridePath"
}
}
# Make sure fullnuget path exists.
$fullNugetPath = "build\fullnuget"
if(-not (test-path "$fullNugetPath"))
{
new-item -path "$fullNugetPath" -itemtype "directory"
}
if(-not (test-path "$fullNugetPath\build\native"))
{
new-item -path "$fullNugetPath\build\native" -itemtype "directory"
}
# Copy WindowsAppRuntime.sln files
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
if (($AzureBuildStep -eq "all") -Or (($AzureBuildStep -eq "BuildBinaries") -Or ($AzureBuildStep -eq "BuildMRT")))
{
write-host "Moving items to staging directory for Configuration:$configurationToRun and Platform:$platformToRun"
.\build\CopyFilesToStagingDir.ps1 -BuildOutputDir 'BuildOutput' -OverrideDir "$buildOverridePath" -PublishDir "$windowsAppSdkBinariesPath" -NugetDir "$fullNugetPath" -Platform $PlatformToRun -Configuration $ConfigurationToRun
& .\.nuget\nuget.exe restore WindowsAppRuntime.sln -configfile nuget.config
& .\.nuget\nuget.exe restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" -configfile nuget.config
# If the call to restore WindowsAppRuntime_Insights fails check to make sure all Window SDK's from 17760 are installed.
& .\.nuget\nuget.exe restore "dev\WindowsAppRuntime_Insights\packages.config" -ConfigFile "dev\WindowsAppRuntime_Insights\nuget.config" -PackagesDirectory "dev\WindowsAppRuntime_Insights\packages"
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse
if (($srcPath -ne $null)){
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse
if (($destinationPaths -ne $null)) {
foreach ($destPath in $destinationPaths) {
Write-Host 'SourcePath:' $srcPath.FullName
Write-Host 'DestinationPath:' $destPath.FullName
Copy-Item -Force $srcPath.FullName $destPath.FullName
}
}
}
}
}
$nuSpecsPath = "build\NuSpecs"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.targets" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.props" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.C.props" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.WinRt.props" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.props" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.Bootstrap.targets" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.DeploymentManager.targets" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$fullNugetPath\AppxManifest.xml"
#------------------
# Build mrtcore.sln and move output to staging.
#------------------
#Restore packages from mrt.
$MRTSourcesDirectory = "dev\MRTCore"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\core\src\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmex\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmmin\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\unittests\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
# Init mrtcore
foreach($platformToRun in $platform.Split(","))
{
& $MRTSourcesDirectory\build\init.cmd /envonly $platformToRun\fre
}
# Build mrt core.
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildBinaries"))
{
write-host "Building MrtCore.sln for configuration $configurationToRun and platform:$platformToRun"
& $msBuildPath /restore "$MRTSourcesDirectory\mrt\MrtCore.sln" /p:Configuration=$configurationToRun,Platform=$platformToRun
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
{
write-host "Building WindowsAppRuntime.sln for configuration $configurationToRun and platform:$platformToRun"
& $msBuildPath /restore `
WindowsAppRuntime.sln `
/p:Configuration=$configurationToRun,Platform=$platformToRun `
/binaryLogger:"BuildOutput/WindowsAppRuntime.$platformToRun.$configurationToRun.binlog" `
$WindowsAppSDKVersionProperty `
/p:PGOBuildMode=$PGOBuildMode `
/p:WindowsAppSDKCleanIntermediateFiles=true `
/p:AppxSymbolPackageEnabled=false `
/p:WindowsAppSDKBuildPipeline=$WindowsAppSDKBuildPipeline
}
}
}
}
$configurationForMrtAndAnyCPU = "release"
$MRTBinariesDirectory = "BuildOutput"
# Copy over mrt files
foreach($platformToRun in $platform.Split(","))
{
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\mrm\mrm.dll" -destination "$fullNugetPath\runtimes\win10-$platformToRun\native" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\mrm\mrm.pdb" -destination "$fullNugetPath\runtimes\win10-$platformToRun\native" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.pdb" -destination "$fullNugetPath\runtimes\win10-$platformToRun\native" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.dll" -destination "$fullNugetPath\runtimes\win10-$platformToRun\native" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\mrm\mrm.lib" -destination "$fullNugetPath\lib\win10-$platformToRun" -force
if($platformToRun -eq "x86")
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildMRT"))
{
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources.Projection\Microsoft.Windows.ApplicationModel.Resources.Projection.dll" -destination "$fullNugetPath\lib\net6.0-windows10.0.17763.0" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources.Projection\Microsoft.Windows.ApplicationModel.Resources.Projection.pdb" -destination "$fullNugetPath\lib\net6.0-windows10.0.17763.0" -force
copy-item -path "$MRTBinariesDirectory\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.winmd" -destination "$fullNugetPath\lib\uap10.0" -force
#------------------
# Build mrtcore.sln and move output to staging.
#------------------
#Restore packages from mrt.
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\MrtCore.sln" -ConfigFile nuget.config
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmex\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\mrmmin\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
& .\.nuget\nuget.exe restore "$MRTSourcesDirectory\mrt\mrm\unittests\packages.config" -ConfigFile nuget.config -PackagesDirectory "$MRTSourcesDirectory\mrt\packages"
# Init mrtcore
foreach($platformToRun in $platform.Split(","))
{
& $MRTSourcesDirectory\build\init.cmd /envonly $platformToRun\fre
}
# Build mrt core.
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
{
write-host "Building MrtCore.sln for configuration $configurationToRun and platform:$platformToRun"
& $msBuildPath /restore `
"$MRTSourcesDirectory\mrt\MrtCore.sln" `
/p:Configuration=$configurationToRun,Platform=$platformToRun `
/p:PGOBuildMode=$PGOBuildMode `
/binaryLogger:"BuildOutput/mrtcore.$platformToRun.$configurationToRun.binlog"
}
}
}
}
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildAnyCPU"))
{
#------------------
# Build windowsAppRuntime.sln (anyCPU) and move output to staging.
#------------------
# build AnyCPU
& $msBuildPath /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU,Platform=AnyCPU
}
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "StageFiles"))
{
#------------------
# Stage files for Packing
#------------------
if(-not (test-path "$BasePath"))
{
new-item -path "$BasePath" -itemtype "directory"
}
# copy MRT IDL over.
copy-item -path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -destination "$fullNugetPath\include" -force
if(-not (test-path "$BasePath\build\native"))
{
new-item -path "$BasePath\build\native" -itemtype "directory"
}
# Copy MRT metadata files.
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.props" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.PriGen.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.References.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.targets" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.C.props" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.props" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.targets" -Destination "$fullNugetPath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\ProjectItemsSchema.xaml" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\README.md" -Destination "$fullNugetPath\build"
Copy-Item -Path "$MRTSourcesDirectory\mrt\core\src\mrm.h" -Destination "$fullNugetPath\include"
Copy-Item -Path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -Destination "$fullNugetPath\include"
# Copy WindowsAppRuntime.sln files
foreach($configurationToRun in $configuration.Split(","))
{
foreach($platformToRun in $platform.Split(","))
{
.\build\CopyFilesToStagingDir.ps1 -BuildOutputDir 'BuildOutput' -OverrideDir "$buildOverridePath" -PublishDir "$windowsAppSdkBinariesPath" -NugetDir "$BasePath" -Platform $PlatformToRun -Configuration $ConfigurationToRun
}
}
$nuSpecsPath = "build\NuSpecs"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.targets" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.props" -Destination "$BasePath\build\native\Microsoft.WindowsAppSDK.Foundation.props"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.C.props" -Destination "$BasePath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.WinRt.props" -Destination "$BasePath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.Bootstrap.targets" -Destination "$BasePath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.DeploymentManager.targets" -Destination "$BasePath\build\native"
Copy-Item -Path "$nuSpecsPath\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets" -Destination "$BasePath\build\native"
#------------------
# Build windowsAppRuntime.sln (anyCPU) and move output to staging.
#------------------
# build AnyCPU
msbuild /restore "dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj" /p:Configuration=$configurationForMrtAndAnyCPU,Platform=anycpu
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Foundation.props" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$BasePath\build"
Copy-Item -Path "$nuSpecsPath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$BasePath\build"
# If AnyCPU generates another dll it needs to be added here.
copy-item -path "buildoutput\$configurationToUseForSingleConfiguration\anycpu\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$fullNugetPath\lib\net6.0-windows10.0.17763.0"
Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$BasePath\AppxManifest.xml"
#------------------
# Move other files and prepare manifest and appxmanifest.xml
#------------------
# Copy over mrt files
foreach($platformToRun in $platform.Split(","))
{
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\mrm\MRM.dll" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\mrm\MRM.pdb" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.pdb" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.dll" -destination "$BasePath\runtimes\win10-$platformToRun\native" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\mrm\MRM.lib" -destination "$BasePath\lib\win10-$platformToRun" -force
Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$fullNugetPath"
Copy-Item -Path "LICENSE" -Destination "$fullNugetPath" -force
if($platformToRun -eq "x86")
{
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources.Projection\Microsoft.Windows.ApplicationModel.Resources.Projection.dll" -destination "$BasePath\lib\net6.0-windows10.0.17763.0" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources.Projection\Microsoft.Windows.ApplicationModel.Resources.Projection.pdb" -destination "$BasePath\lib\net6.0-windows10.0.17763.0" -force
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\$platformToRun\Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.winmd" -destination "$BasePath\lib\uap10.0" -force
}
}
# for some reason xslt.load changes the working directory to C:\windows\system32.
# store the current working directory here.
$workingDirectory = get-location
$manifestPath = "$fullNugetPath\manifests"
# copy MRT IDL over.
Copy-Item -path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -destination "$BasePath\include" -force
# Make Microsoft.WindowsAppSDK.Foundation.manifest.
$newitem = New-Item -ItemType Directory -Force -Path $manifestPath
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform
$xslt.Load("$workingDirectory\build\TransformAppxManifest.xslt")
$xslt.Transform("$workingDirectory\$fullNugetPath\AppxManifest.xml", "$workingDirectory\$manifestPath\Microsoft.WindowsAppSdk.Foundation.manifest")
# Copy MRT metadata files.
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.props" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.PriGen.targets" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.References.targets" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\MrtCore.targets" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.C.props" -Destination "$BasePath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.props" -Destination "$BasePath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\native\MrtCore.targets" -Destination "$BasePath\build\native"
Copy-Item -Path "$MRTSourcesDirectory\packaging\ProjectItemsSchema.xaml" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\packaging\README.md" -Destination "$BasePath\build"
Copy-Item -Path "$MRTSourcesDirectory\mrt\core\src\MRM.h" -Destination "$BasePath\include"
Copy-Item -Path "$MRTSourcesDirectory\mrt\Microsoft.Windows.ApplicationModel.Resources\src\Microsoft.Windows.ApplicationModel.Resources.idl" -Destination "$BasePath\include"
# any version will do here.
$packageVersion = '1.1.1.1'
# If AnyCPU generates another dll it needs to be added here.
Copy-Item -path "BuildOutput\$configurationForMrtAndAnyCPU\anycpu\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll" -destination "$BasePath\lib\net6.0-windows10.0.17763.0"
# Add the version to the nuspec.
[xml]$publicNuspec = Get-Content -Path ".\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec"
$publicNuspec.package.metadata.version = $packageVersion
Set-Content -Value $publicNuspec.OuterXml ".\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec"
#------------------
# Move other files and prepare manifest and appxmanifest.xml
#------------------
# Make the foundation transport package.
nuget pack ".\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec" -BasePath $fullNugetPath -OutputDirectory $LocalPackagesPath
Copy-Item -Path "$nuSpecsPath\AppxManifest.xml" -Destination "$BasePath"
Copy-Item -Path "LICENSE" -Destination "$BasePath" -force
# Update the details in eng/version.details.xml
$packageName = "Microsoft.WindowsAppSDK.Foundation.TransportPackage"
&"$UpdateVersionDetailsPath" -dependencyName $packageName -dependencyVersion $packageVersion
# for some reason xslt.load changes the working directory to C:\windows\system32.
# store the current working directory here.
$workingDirectory = get-location
$manifestPath = "$BasePath\manifests"
if(test-path("$env:Build_SourcesDirectory\build\packages\Microsoft.WindowsAppSDK.Foundation.TransportPackage.$packageVersion"))
# Make Microsoft.WindowsAppSDK.Foundation.manifest.
$newitem = New-Item -ItemType Directory -Force -Path $manifestPath
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform
$xslt.Load("$workingDirectory\build\TransformAppxManifest.xslt")
$xslt.Transform("$workingDirectory\$BasePath\AppxManifest.xml", "$workingDirectory\$manifestPath\Microsoft.WindowsAppSdk.Foundation.manifest")
}
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "PackNuget"))
{
$nuspecPath = "BuildOutput\Microsoft.WindowsAppSDK.Foundation.nuspec"
Copy-Item -Path ".\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec" -Destination $nuspecPath
# Add the version to the nuspec.
[xml]$publicNuspec = Get-Content -Path $nuspecPath
$publicNuspec.package.metadata.version = $PackageVersion
Set-Content -Value $publicNuspec.OuterXml $nuspecPath
# Make the foundation transport package.
& .\.nuget\nuget.exe pack $nuspecPath -BasePath $BasePath -OutputDirectory $OutputDirectory
}
}
Catch
{
remove-item "$env:Build_SourcesDirectory\build\packages\Microsoft.WindowsAppSDK.Foundation.TransportPackage.$packageVersion" -force -recurse
}
$formatstring = "`n{0}`n`n{1}`n`n"
$fields = $_, $_.ScriptStackTrace
Write-Host ($formatstring -f $fields) -ForegroundColor RED
exit 1
}

5
DevCheck.cmd Normal file
Просмотреть файл

@ -0,0 +1,5 @@
@echo off
powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -File %~dp0\DevCheck.ps1 %*
exit /b %ERRORLEVEL%

Просмотреть файл

@ -113,7 +113,7 @@ function Get-IsAdmin
function Get-ProjectRoot
{
return Split-Path -Path $PSScriptRoot -Parent
return $PSScriptRoot
}
function Get-TempPath

Просмотреть файл

@ -27,8 +27,8 @@
<Target Name="DirectoryBuildPropsInfo">
<Message Condition="'$(WindowsAppSDKBuildPipeline)' == '1'" Importance="High" Text="Directory.Build.props detects WindowsAppSDKBuildPipeline=$(WindowsAppSDKBuildPipeline)"/>
<Error Condition="!Exists('$(RepoTestCertificatePFX)')" Text="$(RepoTestCertificatePFX) not found. Run '$(RepoRoot)\tools\DevCheck.cmd' to generate the test certificate." />
<Error Condition="!Exists('$(RepoTestCertificatePWD)')" Text="$(RepoTestCertificatePWD) not found. Run '$(RepoRoot)\tools\DevCheck.cmd' to generate the test certificate." />
<Error Condition="!Exists('$(RepoTestCertificatePFX)')" Text="$(RepoTestCertificatePFX) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
<Error Condition="!Exists('$(RepoTestCertificatePWD)')" Text="$(RepoTestCertificatePWD) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
</Target>
<!-- Conditional behavior for build pipeline vs local development -->

Просмотреть файл

@ -72,8 +72,8 @@
<Exec Command="$(_MakeMsixCommand)" />
<!-- Sign the MSIX -->
<Error Condition="('$(MakeMsixSigned)' == 'true') and !Exists('$(RepoTestCertificatePFX)')" Text="$(RepoTestCertificatePFX) not found. Run '$(RepoRoot)\tools\DevCheck.cmd' to generate the test certificate." />
<Error Condition="('$(MakeMsixSigned)' == 'true') and !Exists('$(RepoTestCertificatePWD)')" Text="$(RepoTestCertificatePWD) not found. Run '$(RepoRoot)\tools\DevCheck.cmd' to generate the test certificate." />
<Error Condition="('$(MakeMsixSigned)' == 'true') and !Exists('$(RepoTestCertificatePFX)')" Text="$(RepoTestCertificatePFX) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
<Error Condition="('$(MakeMsixSigned)' == 'true') and !Exists('$(RepoTestCertificatePWD)')" Text="$(RepoTestCertificatePWD) not found. Run '$(RepoRoot)\DevCheck.cmd' to generate the test certificate." />
<PropertyGroup Condition="'$(MakeMsixSigned)' == 'true'">
<_SignMsix_Executable>signtool.exe</_SignMsix_Executable>
<_SignMsix_Parameters>/fd SHA256</_SignMsix_Parameters>

Просмотреть файл

@ -0,0 +1,63 @@
steps:
- template: WindowsAppSDK-SetupBuildEnvironment-Steps.yml
- task: PowerShell@2
name: BuildBinaries
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "$(buildPlatform)" -Configuration "$(buildConfiguration)" -AzureBuildStep "BuildMRT"
# component detection must happen *within* the build task
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
- task: PublishBuildArtifacts@1
displayName: 'Publish mrtcore binlog'
condition: succeededOrFailed()
inputs:
PathtoPublish: $(Build.SourcesDirectory)/BuildOutput/mrtcore.$(buildPlatform).$(buildConfiguration).binlog
artifactName: binlogs
# Run the test locally on the Azure VM.
- task: VSTest@2
displayName: 'test MRT: ManagedTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrtCoreManagedTest.build.appxrecipe'
searchFolder: 'BuildOutput\$(buildConfiguration)\$(buildPlatform)\MrtCoreManagedTest'
testRunTitle: 'test MRT: ManagedTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: UnitTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrmUnitTest.dll'
searchFolder: 'BuildOutput\$(buildConfiguration)\$(buildPlatform)\MrmUnitTest'
testRunTitle: 'test MRT: UnitTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: BaseUnitTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrmBaseUnitTests.dll'
searchFolder: 'BuildOutput\$(buildConfiguration)\$(buildPlatform)\MrmBaseUnitTests'
testRunTitle: 'test MRT: BaseUnitTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: UnpackagedTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MRTCoreUnpackagedTests.dll'
searchFolder: 'BuildOutput\$(buildConfiguration)\$(buildPlatform)\MrtCoreUnpackagedTests'
testRunTitle: 'test MRT: UnpackagedTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

Просмотреть файл

@ -1,17 +0,0 @@
parameters:
channel: 'experimental'
enableLicenseInstall: false
runSDLBinaryAnalysis: false
enablePREFast: true
steps:
- template: WindowsAppSDK-BuildProject-Steps.yml
parameters:
solutionPath: WindowsAppRuntime.sln
nugetConfigPath: nuget.config
buildOutputDir: $(buildOutputDir)
publishDir: $(publishDir)
channel: ${{ parameters.channel }}
enableLicenseInstall: ${{ parameters.enableLicenseInstall }}
runSDLBinaryAnalysis: ${{ parameters.runSDLBinaryAnalysis }}
enablePREFast: ${{ parameters.enablePREFast }}

Просмотреть файл

@ -1,238 +0,0 @@
parameters:
solutionPath: ''
nugetConfigPath: ''
buildOutputDir: '$(Build.SourcesDirectory)\BuildOutput'
WindowsAppSDKCleanIntermediateFiles: 'true'
artifactName: 'drop'
channel: 'experimental'
enableLicenseInstall: false
# license installation assets are only accessible in internal builds, but are only
# needed in release-signed stable builds. Only enble this functionality in the private
# pipeline builds. Otherwise, default to an inert placeholder implementation.
runSDLBinaryAnalysis: false
enablePREFast: true
steps:
- ${{ if eq(parameters.enableLicenseInstall, true) }}:
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'ProjectReunionInternal'
# Restore transport package dependencies. This is only enbaled in release-signed builds.
- task: PowerShell@2
name: ConvertVersionDetailsToPackageConfig
displayName: "Convert VersionDetails To PackageConfig"
inputs:
filePath: '$(Build.SourcesDirectory)\build\Scripts\ConvertVersionDetailsToPackageConfig.ps1'
arguments: -versionDetailsPath '$(Build.SourcesDirectory)\eng\Version.Details.xml' -packageConfigPath '$(Build.SourcesDirectory)\build\packages.config'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: RestoreNuGetPackages
inputs:
restoreSolution: build/packages.config
feedsToUse: config
nugetConfigPath: build/licensing.nuget.config
restoreDirectory: packages
- template: WindowsAppSDK-PopulateBuildDateAndRevision-Steps.yml
- script: |
echo parameters.solutionPath = '${{ parameters.solutionPath }}'
echo parameters.nugetConfigPath = '${{ parameters.nugetConfigPath }}'
echo parameters.buildOutputDir = '${{ parameters.buildOutputDir }}'
displayName: 'BuildProject: Display parameters'
- template: WindowsAppSDK-InstallWindowsSDK-Steps.yml
- template: WindowsAppSDK-InstallNuget-Steps.yml
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves.
- script: |
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
displayName: 'Retrieve VC tools directory'
- task: CmdLine@1
displayName: 'Display build machine environment variables'
inputs:
filename: 'set'
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'WindowsES'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore ${{ parameters.solutionPath }}'
inputs:
restoreSolution: ${{ parameters.solutionPath }}
feedsToUse: config
nugetConfigPath: ${{ parameters.nugetConfigPath }}
- task: powershell@2
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create DynamicDependencies overrides'
inputs:
targetType: filePath
filePath: tools\GenerateDynamicDependencyOverrides.ps1
arguments: -Path $(Build.SourcesDirectory)\build\override
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create PushNotifications overrides'
inputs:
targetType: filePath
filePath: tools\GeneratePushNotificationsOverrides.ps1
arguments: -Path $(Build.SourcesDirectory)\build\override
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create DynamicDependencies TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DynamicDependency.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.ApplicationModel.DynamicDependency -Output $(Build.SourcesDirectory)\dev\common\MddTerminalVelocityFeatures.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create DeploymentAPI TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create AppNotifications TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.AppNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create PushNotifications TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.PushNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create EnvironmentManager TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.xml -Channel ${{ parameters.channel }} -Language C++ -Namespace Microsoft.Windows.System -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
name: UpdateTraceloggingConfig
inputs:
targetType: 'inline'
script: |
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse
if (($srcPath -ne $null)){
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse
if (($destinationPaths -ne $null)) {
foreach ($destPath in $destinationPaths) {
Write-Host 'SourcePath:' $srcPath.FullName
Write-Host 'DestinationPath:' $destPath.FullName
Copy-Item -Force $srcPath.FullName $destPath.FullName
}
}
}
# Copy MSIX license installation header into the correct source location.
- ${{ if eq(parameters.enableLicenseInstall, true) }}:
- task: CopyFiles@2
displayName: 'Extract license header to source location'
inputs:
SourceFolder: '$(Build.SourcesDirectory)\build\packages\$(AppLicensingInternalPackageName).$(AppLicensingInternalPackageVersion)\src'
Contents: |
*.h
TargetFolder: '$(Build.SourcesDirectory)\dev\Licensing'
flattenFolders: false
overWrite: true
- task: VSBuild@1
displayName: 'Build solution ${{ parameters.solutionPath }}'
inputs:
solution: ${{ parameters.solutionPath }}
vsVersion: 16.0
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/restore /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog /p:WindowsAppSDKVersionBuild=$(builddate_yymm) /p:WindowsAppSDKVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:PGOBuildMode=$(PGOBuildMode) /p:WindowsAppSDKBuildPipeline=1 /p:WindowsAppSDKCleanIntermediateFiles=${{ parameters.WindowsAppSDKCleanIntermediateFiles }}'
- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- template: WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: '${{ parameters.buildOutputDir }}'
enablePREFast: ${{ parameters.enablePREFast }}
- task: powershell@2
displayName: 'Install test certificate for MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CheckTestCert
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Setup TAEF Service (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -Offline -Verbose -NoInteractive -CheckTAEFService
workingDirectory: '$(Build.SourcesDirectory)'
#DISABLED - GitHub runs as a a built-in Administrator (thus Elevated and no split-token)
# TAEF Service can't RunAs:RestrictedUser from this account thus all tests Failed or Blocked
# and Dynamic Dependencies doesn't support Elevation so it's impossible for this test to
# work correctly today. Disabling until we move off GitHub's pipeline for test execution
# - task: CmdLine@2
# displayName: 'Run AppLifeCycleTest'
# inputs:
# script: 'te.exe CppTest.dll'
# workingDirectory: '$(Build.SourcesDirectory)\BuildOutput\$(buildConfiguration)\$(buildPlatform)\CppTest'
# condition: or(eq(variables.buildPlatform, 'x64'), eq(variables.buildPlatform, 'x86'))
- task: PublishBuildArtifacts@1
displayName: 'Publish ${{ parameters.solutionPath }} binlog'
condition: succeededOrFailed()
inputs:
PathtoPublish: $(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog
artifactName: binlogs
#UNDONE - subsequent PR
# - task: powershell@2
# displayName: 'Source Index PDBs'
# inputs:
# targetType: filePath
# filePath: build\SourceIndexing\IndexPdbs.ps1
# arguments: -SearchDir '${{ parameters.buildOutputDir }}\$(buildConfiguration)' -SourceRoot '$(Build.SourcesDirectory)' -recursive -Verbose -CommitId $(Build.SourceVersion)
# errorActionPreference: silentlyContinue
- task: powershell@2
displayName: 'Remove test certificate for MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -RemoveTestCert -RemoveTestPfx
workingDirectory: '$(Build.SourcesDirectory)'

Просмотреть файл

@ -1,15 +0,0 @@
parameters:
condition: ''
testFilePath: ''
outputProjFileName: ''
testSuite: ''
taefQuery: ''
steps:
- task: powershell@2
displayName: 'Create ${{ parameters.outputProjFileName }}'
condition: ${{ parameters.condition }}
inputs:
targetType: filePath
filePath: build\Helix\GenerateTestProjFile.ps1
arguments: -TestFile '${{ parameters.testFilePath }}' -OutputProjFile '$(Build.ArtifactStagingDirectory)\${{ parameters.outputProjFileName }}' -JobTestSuiteName '${{ parameters.testSuite }}' -TaefPath '$(Build.SourcesDirectory)\build\Helix\packages\taef.redist.wlk.10.31.180822002\build\Binaries\x86' -TaefQuery "${{ parameters.taefQuery }}"

Просмотреть файл

@ -1,176 +0,0 @@
parameters:
# Extract the build revision number from Build.BuildNumber. This is needed to pass to build-nupkg
jobName: ''
dependsOn: ''
buildOutputDir: '$(Build.SourcesDirectory)\BuildOutput'
fullnupkgdir: '$(build.artifactStagingDirectory)\fullnuget'
# The "primary" build arch is the one that the nuspec gets its winmd, pri, and other neutral files from
primaryBuildArch: x86
buildFlavor: Release
condition: ''
buildPool: ''
jobs:
- job: ${{ parameters.jobName }}
dependsOn:
- ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
${{ if eq(parameters.buildPool, '') }}:
pool:
vmImage: 'windows-2022'
${{ if ne(parameters.buildPool, '') }}:
pool: ${{ parameters.buildPool }}
steps:
- template: WindowsAppSDK-PopulateBuildDateAndRevision-Steps.yml
- script: |
echo parameters.jobName '${{ parameters.jobName }}'
echo parameters.buildOutputDir '${{ parameters.buildOutputDir }}'
echo parameters.fullnupkgdir '${{ parameters.fullnupkgdir }}'
echo parameters.publishPath '${{ parameters.publishPath }}'
echo buildrevision=$(buildrevision)
echo builddate=$(builddate)
displayName: 'CreateNugetPackage: Display parameters'
- task: DownloadBuildArtifacts@0
inputs:
artifactName: FullNuget
downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: CopyFiles@2
displayName: 'copy license to full nuget'
inputs:
SourceFolder: '$(Build.SourcesDirectory)'
Contents: |
LICENSE
TargetFolder: '${{ parameters.fullnupkgdir }}'
# Copy the Windows App SDK full package specific target files, AppxManifest, and fusion manifests into the full package folder
- task: PowerShell@2
displayName: 'Copy Windows App SDK full package assets'
inputs:
targetType: 'inline'
script: |
$targetsFilePath = "$(Build.SourcesDirectory)\build\NuSpecs"
$fullpackagePath = "${{ parameters.fullnupkgdir }}"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.targets" -Destination "$fullpackagePath\build\native\Microsoft.WindowsAppSDK.Foundation.targets"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.props" -Destination "$fullpackagePath\build\native\Microsoft.WindowsAppSDK.Foundation.props"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.C.props" -Destination "$fullpackagePath\build\native\WindowsAppSDK-Nuget-Native.C.props"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.WinRt.props" -Destination "$fullpackagePath\build\native\WindowsAppSDK-Nuget-Native.WinRt.props"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.Foundation.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.Foundation.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.Foundation.props" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.Foundation.props"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.Bootstrap.CS.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.Bootstrap.CS.targets"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.Bootstrap.targets" -Destination "$fullpackagePath\build\native\WindowsAppSDK-Nuget-Native.Bootstrap.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.BootstrapCommon.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.BootstrapCommon.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.DeploymentManager.CS.targets"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.DeploymentManager.targets" -Destination "$fullpackagePath\build\native\WindowsAppSDK-Nuget-Native.DeploymentManager.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.DeploymentManagerCommon.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.UndockedRegFreeWinRT.CS.targets"
Copy-Item -Path "$targetsFilePath\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets" -Destination "$fullpackagePath\build\native\WindowsAppSDK-Nuget-Native.UndockedRegFreeWinRT.targets"
Copy-Item -Path "$targetsFilePath\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets" -Destination "$fullpackagePath\build\Microsoft.WindowsAppSDK.UndockedRegFreeWinRTCommon.targets"
Copy-Item -Path "$targetsFilePath\AppxManifest.xml" -Destination "$fullpackagePath\AppxManifest.xml"
$manifestPath = $fullpackagePath+'\manifests';
New-Item -ItemType Directory -Force -Path $manifestPath;
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform;
$xslt.Load('build\TransformAppxManifest.xslt');
$xslt.Transform($fullpackagePath+'\AppxManifest.xml', $manifestPath+'\Microsoft.WindowsAppSdk.Foundation.manifest');
# - script: |
# dir /s $(Build.SourcesDirectory)
- template: WindowsAppSDK-InstallNuget-Steps.yml
# - powershell: |
# $prereleaseTag = "${{ parameters.prereleaseVersionTag }}"
# if ("${{ parameters.useReleaseTag}}" -eq [bool]::TrueString) { $prereleaseTag = "" }
# & "$(Build.SourcesDirectory)\build\NuSpecs\build-nupkg.ps1" `
# -BuildOutput '$(Build.SourcesDirectory)\Artifacts\drop' `
# -OutputDir '${{ parameters.nupkgdir }}' `
# -prereleaseversion "$prereleaseTag" `
# -DateOverride '$(builddate)' `
# -Subversion '$(buildrevision)' `
# -BuildArch ${{ parameters.primaryBuildArch }} `
# -BuildFlavor ${{ parameters.buildFlavor }}
# displayName: 'build-nupkg.ps1'
- task: PowerShell@2
name: SetVersion
displayName: Update metapackage version
inputs:
targetType: 'inline'
script: |
$packageVersion = '$(version)'
$pipelineType = '$(PipelineType)'
$sourceBranchName = '$(Build.SourceBranchName)'
if ($sourceBranchName -eq 'main' -or $sourceBranchName -eq 'develop')
{
$packageVersion = $packageVersion + '.' + $sourceBranchName + '.' + $pipelineType
}
Write-Host "##vso[task.setvariable variable=packageVersion;]$packageVersion"
Write-Host "##vso[task.setvariable variable=packageVersion;isOutput=true;]$packageVersion"
Write-Host $packageVersion
[xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
$publicNuspec.package.metadata.version = $packageVersion
Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'Pack Full Nuget Package'
inputs:
command: 'pack'
packagesToPack: '$(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec'
versioningScheme: 'off'
basePath: '${{ parameters.fullnupkgdir }}'
packDestination: ${{ parameters.fullnupkgdir }}
- ${{if parameters.signConfigPattern }}:
- task: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
FolderPath: '${{ parameters.fullnupkgdir }}'
Pattern: |
${{ parameters.signConfigPattern }}
UseMinimatch: true
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget'
inputs:
PathtoPublish: '${{ parameters.fullnupkgdir }}'
artifactName: 'FullNuget'
#UNDONE - EHO we need to seed these guid's properly!
#see, e.g. AzurePipelinesTemplates\WindowsAppSDK-BuildAndPublishPGONuGet-Job.yml
#
# To publish the package to vsts feed, set queue time variable NuGetFeed = d62f8eac-f05c-4c25-bccb-21f98b95c95f
# This is the magic GUID from the pipeline visual designer for this feed: https://dev.azure.com/ms/microsoft-ui-xaml/_packaging?_a=feed&feed=MUX-CI
# - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
# condition: and(ne(variables['NuGetFeed'], ''), ne(variables['Build.Reason'], 'Manual'))
# displayName: 'NuGet push to $(NuGetFeed)'
# inputs:
# command: push
# publishVstsFeed: $(NuGetFeed)
# packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg

Просмотреть файл

@ -1,8 +0,0 @@
parameters:
nugetVersion: 5.11.0
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet ${{ parameters.nugetVersion }}'
inputs:
versionSpec: ${{ parameters.nugetVersion }}

Просмотреть файл

@ -1,49 +0,0 @@
parameters:
dependsOn: ''
pgdFile: Microsoft.UI.Xaml.pgd
pgoArtifact: PGO
jobs:
- job: MergePGD
dependsOn: ${{ parameters.dependsOn }}
pool:
vmImage: 'windows-2022'
variables:
artifactsPath: $(Build.SourcesDirectory)\Artifacts
pgoArtifactsPath: $(artifactsPath)\${{ parameters.pgoArtifact }}
strategy:
matrix: ${{ parameters.matrix }}
steps:
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves.
- script: |
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
displayName: 'Retrieve VC tools directory'
- task: DownloadBuildArtifacts@0
inputs:
artifactName: ${{ parameters.pgoArtifact }}
downloadPath: $(artifactsPath)
- script: |
cd $(buildPlatform)
"%VCToolsInstallDir%\bin\hostx64\x64\pgomgr.exe" /merge *.pgc ${{ parameters.pgdFile }}
displayName: 'Merge pgc files into pgd'
workingDirectory: $(pgoArtifactsPath)
- task: CopyFiles@2
displayName: 'Copy merged pgd to artifact staging'
inputs:
sourceFolder: $(pgoArtifactsPath)
contents: '**\$(buildPlatform)\${{ parameters.pgdFile }}'
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: ${{ parameters.pgoArtifact }}

Просмотреть файл

@ -1,30 +0,0 @@
parameters:
- name: "GenerateSBOM"
type: boolean
default: False
steps:
- task: powershell@2
displayName: 'Copy files to staging dir'
inputs:
targetType: filePath
filePath: build\CopyFilesToStagingDir.ps1
arguments: -BuildOutputDir '$(buildOutputDir)' -OverrideDir '$(Build.SourcesDirectory)\build\override' -PublishDir '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries' -NugetDir '$(Build.ArtifactStagingDirectory)\FullNuget' -Platform '$(buildPlatform)' -Configuration '$(buildConfiguration)'
- ${{ if eq(parameters.GenerateSBOM, 'true') }}:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries\$(buildConfiguration)\$(buildPlatform)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: windowsappsdk_binaries'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries'
artifactName: windowsappsdk_binaries
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget (Windows App Runtime DLLs)'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\FullNuget'
artifactName: FullNuget

Просмотреть файл

@ -61,7 +61,7 @@ jobs:
inputs:
filename: 'set'
- task: NuGetToolInstaller@0
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
@ -69,7 +69,7 @@ jobs:
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
filePath: DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean
workingDirectory: '$(Build.SourcesDirectory)'
@ -77,7 +77,7 @@ jobs:
displayName: 'Install test certificate for MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
filePath: DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CheckTestCert
workingDirectory: '$(Build.SourcesDirectory)'
@ -86,8 +86,6 @@ jobs:
displayName: WindowsAppSDK.Helix.Test
solutionPath: test\WindowsAppSDK.Helix.Test\WindowsAppSDK.Helix.Test.sln
- task: NuGetToolInstaller@1
# Note: 'NuGetCommand@2' is ambiguous so the specific task GUID must be used instead.
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore build/Helix/packages.config'
@ -172,7 +170,7 @@ jobs:
# By executing 'dotnet msbuild' against RunTestsInHelix.proj the test payload and the work items to execute get sent to Helix.
- task: DotNetCoreCLI@2
displayName: 'Run tests in Helix (open queues)'
condition: and(succeeded(),eq(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
condition: and(succeeded(), eq(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
timeoutInMinutes: 45
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
@ -184,7 +182,7 @@ jobs:
- task: DotNetCoreCLI@2
displayName: 'Run tests in Helix (closed queues)'
condition: and(succeeded(),ne(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
condition: and(succeeded(), ne(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
timeoutInMinutes: 45
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
@ -249,6 +247,6 @@ jobs:
displayName: 'Remove test certificate for MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
filePath: DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -RemoveTestCert -RemoveTestPfx
workingDirectory: '$(Build.SourcesDirectory)'

Просмотреть файл

@ -0,0 +1,90 @@
steps:
- template: WindowsAppSDK-PopulateBuildDateAndRevision-Steps.yml
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves.
- script: |
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
displayName: 'Retrieve VC tools directory'
- task: CmdLine@1
displayName: 'Display build machine environment variables'
inputs:
filename: 'set'
- task: NuGetAuthenticate@0
inputs:
nuGetServiceConnections: 'WindowsES'
- template: WindowsAppSDK-InstallWindowsSDK-Steps.yml
- task: powershell@2
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create DynamicDependencies TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DynamicDependency.xml -Channel 'experimental' -Language C++ -Namespace Microsoft.Windows.ApplicationModel.DynamicDependency -Output $(Build.SourcesDirectory)\dev\common\MddTerminalVelocityFeatures.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create DeploymentAPI TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.xml -Channel 'experimental' -Language C++ -Namespace Microsoft.Windows.ApplicationModel.WindowsAppRuntime -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-DeploymentAPI.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create AppNotifications TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.xml -Channel 'experimental' -Language C++ -Namespace Microsoft.Windows.AppNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-AppNotifications.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create PushNotifications TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.xml -Channel 'experimental' -Language C++ -Namespace Microsoft.Windows.PushNotifications -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-PushNotifications.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
displayName: 'Create EnvironmentManager TerminalVelocity features'
inputs:
targetType: filePath
filePath: tools\TerminalVelocity\Generate-TerminalVelocityFeatures.ps1
arguments: -Path $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.xml -Channel 'experimental' -Language C++ -Namespace Microsoft.Windows.System -Output $(Build.SourcesDirectory)\dev\common\TerminalVelocityFeatures-EnvironmentManager.h
workingDirectory: '$(Build.SourcesDirectory)'
- task: powershell@2
name: UpdateTraceloggingConfig
inputs:
targetType: 'inline'
script: |
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse
if (($srcPath -ne $null)){
$destinationPaths = Get-Childitem -Path 'packages' -File 'Traceloggingconfig.h' -Recurse
if (($destinationPaths -ne $null)) {
foreach ($destPath in $destinationPaths) {
Write-Host 'SourcePath:' $srcPath.FullName
Write-Host 'DestinationPath:' $destPath.FullName
Copy-Item -Force $srcPath.FullName $destPath.FullName
}
}
}

Просмотреть файл

@ -15,9 +15,6 @@ parameters:
- name: "PublishPackage"
type: boolean
default: False
- name: "WindowsAppRuntimeInsightsSourceDirectory"
type: string
default: $(Build.SourcesDirectory)\dev\WindowsAppRuntime_Insights
- name: "GenerateSBOM"
type: boolean
default: False
@ -28,6 +25,9 @@ parameters:
- name: "enablePREFast"
type: boolean
default: true
- name: "enableLicenseInstall"
type: boolean
default: true
resources:
repositories:
@ -51,16 +51,6 @@ jobs:
filePath: tools\VerifyCopyrightHeaders.ps1
- job: Build
dependsOn:
- VerifyCopyrightHeaders
# Skip the build job if we are reusing the output of a previous build.
# useBuildOutputFromBuildId variable is set on the Pipeline at Queue time.
condition: |
and
(
eq(variables['useBuildOutputFromBuildId'],''),
in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
)
pool: ProjectReunionESPool-2022
timeoutInMinutes: 120
strategy:
@ -80,11 +70,6 @@ jobs:
buildPlatform: 'arm64'
buildConfiguration: 'Release'
normalizedConfiguration: 'fre'
variables:
buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
publishDir : $(Build.ArtifactStagingDirectory)
steps:
# Required by the Packaged ES SDL Templates.
- checkout: self
@ -96,275 +81,201 @@ jobs:
inputs:
nuGetServiceConnections: 'TelemetryInternal'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of packages'
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
- task: NuGetAuthenticate@1
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages.config -ConfigFile ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\nuget.config -PackagesDirectory ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages'
nuGetServiceConnections: 'ProjectReunionInternal'
# Download and extract nuget package with non-stubbed MicrosoftTelemetry.h header
# - task: DownloadPackage@1
# displayName: 'Download Microsoft.Telemetry.Inbox.Native'
# inputs:
# feed: '/3415933f-ac0d-4766-8c0a-3f4c247c25f5' # 0
# view: 'ef61a1c1-003b-4a27-bde5-beec8301021b' # Release
# definition: '2fe60c09-c66f-4275-ae2d-f015c7170c72' # Microsoft.Telemetry.Inbox.Native
# version: '10.0.18362.1-190318-1202.19h1-release.amd64fre' # latest version
# downloadPath: '$(System.DefaultWorkingDirectory)' # download and extract to repo root
- ${{ if eq(parameters.enableLicenseInstall, true) }}:
# Copy MSIX license installation header into the correct source location.
# Restore transport package dependencies. This is only enbaled in release-signed builds.
- task: PowerShell@2
name: ConvertVersionDetailsToPackageConfig
displayName: "Convert VersionDetails To PackageConfig"
inputs:
filePath: '$(Build.SourcesDirectory)\build\Scripts\ConvertVersionDetailsToPackageConfig.ps1'
arguments: -versionDetailsPath '$(Build.SourcesDirectory)\eng\Version.Details.xml' -packageConfigPath '$(Build.SourcesDirectory)\build\packages.config'
# Replace the stubbed MicrosoftTelemetry.h with the real one
# Delete the existing stubbed MicrosoftTelemetry.h first, to ensure that if it is no longer at the expected path that the task, and build, fails
# - script: |
# del $(System.DefaultWorkingDirectory)\dev\telemetry\MicrosoftTelemetry.h
# move /Y $(System.DefaultWorkingDirectory)\build\native\inc\MicrosoftTelemetry.h $(System.DefaultWorkingDirectory)\dev\telemetry\
# failOnStderr: true
# displayName: 'Replace existing stubbed MicrosoftTelemetry.h header with the real version from the nuget package'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: RestoreNuGetPackages
inputs:
restoreSolution: build/packages.config
feedsToUse: config
nugetConfigPath: build/licensing.nuget.config
restoreDirectory: packages
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildDevProject-Steps.yml
parameters:
channel: ${{ variables.channel }}
enableLicenseInstall: true
runSDLBinaryAnalysis: ${{ parameters.RunSDLBinaryAnalysis }}
enablePREFast: ${{ parameters.enablePREFast }}
- task: CopyFiles@2
displayName: 'Extract license header to source location'
inputs:
SourceFolder: '$(Build.SourcesDirectory)\build\packages\$(AppLicensingInternalPackageName).$(AppLicensingInternalPackageVersion)\src'
Contents: |
*.h
TargetFolder: '$(Build.SourcesDirectory)\dev\Licensing'
flattenFolders: false
overWrite: true
# component detection must happen *within* the build task
- task: PowerShell@2
name: BuildBinaries
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "$(buildPlatform)" -Configuration "$(buildConfiguration)" -AzureBuildStep "BuildBinaries"
# component detection must happen *within* the build task
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
- template: AzurePipelinesTemplates\WindowsAppSDK-PublishProjectOutput-Steps.yml
parameters:
GenerateSBOM: true
- ${{ if eq(parameters.RunSDLBinaryAnalysis, 'true') }}:
- template: AzurePipelinesTemplates\WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: BuildOutput
enablePREFast: ${{ parameters.enablePREFast }}
- ${{ if eq(parameters.GenerateSBOM, 'true') }}:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\$(buildPlatform)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget'
inputs:
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
artifactName: 'BuildOutput'
- job: BuildAnyCPU
# For now, this job just builds Microsoft.WindowsAppRuntime.Bootstrap.Net.dll in AnyCPU
# Can be expanded to add any other binary as needed
dependsOn:
- VerifyCopyrightHeaders
condition: |
and
(
eq(variables['useBuildOutputFromBuildId'],''),
in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
)
pool: ProjectReunionESPool-2022
timeoutInMinutes: 120
variables:
buildPlatform: 'anycpu'
buildConfiguration: 'Release'
normalizedConfiguration: 'fre'
PGOBuildMode: 'Optimize'
buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
publishDir : $(Build.ArtifactStagingDirectory)
artifactName: 'windowsappsdk_binaries'
steps:
- task: powershell@2
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean
workingDirectory: '$(Build.SourcesDirectory)'
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'TelemetryInternal'
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of packages'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages.config -ConfigFile ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\nuget.config -PackagesDirectory ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages'
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildProject-Steps.yml
parameters:
solutionPath: 'dev\Bootstrap\CS\Microsoft.WindowsAppRuntime.Bootstrap.Net\Microsoft.WindowsAppRuntime.Bootstrap.Net.csproj'
nugetConfigPath: nuget.config
buildOutputDir: $(buildOutputDir)
publishDir: $(publishDir)
channel: ${{ variables.channel }}
enableLicenseInstall: true
runSDLBinaryAnalysis: '${{ parameters.RunSDLBinaryAnalysis }}'
# We are building non-native code at this point, skip PREFast.
enablePREFast: false
- task: CopyFiles@2
displayName: 'Copy AnyCpu-built binaries to Nuget for staging'
- task: PowerShell@2
name: BuildBinaries
inputs:
SourceFolder: '$(buildOutputDir)\$(buildConfiguration)\$(buildPlatform)\Microsoft.WindowsAppRuntime.Bootstrap.Net'
Contents: |
Microsoft.WindowsAppRuntime.Bootstrap.Net.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\FullNuget\lib\net6.0-windows10.0.17763.0'
flattenFolders: false
filePath: 'BuildTransportPackage.ps1'
arguments: -AzureBuildStep "BuildAnyCPU"
# This is purely for the SBOM
- task: CopyFiles@2
displayName: 'Copy AnyCpu-built binaries to windowsappsdk_binaries'
- ${{ if eq(parameters.RunSDLBinaryAnalysis, 'true') }}:
- template: AzurePipelinesTemplates\WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: BuildOutput
enablePREFast: ${{ parameters.enablePREFast }}
# component detection must happen *within* the build task
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
- task: ComponentGovernanceComponentDetection@0
inputs:
SourceFolder: '$(buildOutputDir)\$(buildConfiguration)\$(buildPlatform)\Microsoft.WindowsAppRuntime.Bootstrap.Net'
Contents: |
Microsoft.WindowsAppRuntime.Bootstrap.Net.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries\$(buildPlatform)\$(buildConfiguration)'
flattenFolders: false
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'Medium'
failOnAlert: true
- ${{ if eq(parameters.GenerateSBOM, 'true') }}:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries\$(buildPlatform)\$(buildConfiguration)'
BuildDropPath: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\$(buildPlatform)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: windowsappsdk_binaries'
displayName: 'Publish artifact: Full Nuget'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\windowsappsdk_binaries'
artifactName: windowsappsdk_binaries
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
artifactName: 'BuildOutput'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget (Windows App Runtime DLLs)'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\FullNuget'
artifactName: FullNuget
- job: BuildMRT
pool:
vmImage: 'windows-2022'
dependsOn:
- VerifyCopyrightHeaders
condition: in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
- job: BuildAndTestMRT
pool: ProjectReunionESPool-2022
timeoutInMinutes: 120
strategy:
maxParallel: 10
matrix:
Release_x86:
buildPlatform: 'x86'
buildConfiguration: 'Release'
normalizedConfiguration: 'fre'
PGOBuildMode: 'Optimize'
Release_x64:
buildPlatform: 'x64'
buildConfiguration: 'Release'
normalizedConfiguration: 'fre'
PGOBuildMode: 'Optimize'
Release_Arm64:
buildPlatform: 'ARM64'
buildPlatform: 'arm64'
buildConfiguration: 'Release'
normalizedConfiguration: 'fre'
steps:
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
inputs:
nuGetServiceConnections: 'TelemetryInternal'
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildAndTestMRT-Steps.yml
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of packages'
- ${{ if eq(parameters.RunSDLBinaryAnalysis, 'true') }}:
- template: AzurePipelinesTemplates\WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: 'BuildOutput'
enablePREFast: ${{ parameters.enablePREFast }}
- ${{ if eq(parameters.GenerateSBOM, 'true') }}:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\$(buildPlatform)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages.config -ConfigFile ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\nuget.config -PackagesDirectory ${{ parameters.WindowsAppRuntimeInsightsSourceDirectory }}\packages'
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
artifactName: 'BuildOutput'
- template: build-mrt.yml
parameters:
buildJobName: 'BuildMRTCore'
GenerateSBOM: true
runSDLBinaryAnalysis: '${{ parameters.RunSDLBinaryAnalysis }}'
enablePREFast: ${{ parameters.enablePREFast }}
- template: AzurePipelinesTemplates\WindowsAppSDK-RunHelixTests-Job.yml
parameters:
jobName: 'TestInHelix'
dependsOn:
- Build
- BuildAnyCPU
- BuildAndTestMRT
condition: eq(variables['Build.SourceBranch'], 'refs/heads/develop')
- job: PublishMRT
dependsOn:
- BuildMRT
condition: in(dependencies.BuildMRT.result, 'Succeeded')
- job: StageAndPack
pool: ProjectReunionESPool-2022
steps:
- template: publish-mrt.yml
- job: SignBinariesAndPublishSymbols
variables:
signingPattern: |
**/*.winmd
**/*.dll
**/*.exe
timeoutInMinutes: 120
dependsOn:
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/develop') }}:
- TestInHelix
- ${{ if ne(variables['Build.SourceBranch'], 'refs/heads/develop') }}:
- Build
- PublishMRT
condition: |
and
(
in(dependencies.PublishMRT.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
)
pool: ProjectReunionESPool-2022
- BuildAnyCPU
- BuildAndTestMRT
condition: or(succeeded(), eq(${{ parameters.IgnoreFailures }}, 'true'))
steps:
- task: DownloadBuildArtifacts@0
condition:
eq(variables['useBuildOutputFromBuildId'],'')
inputs:
artifactName: FullNuget
downloadPath: '$(Build.ArtifactStagingDirectory)'
artifactName: BuildOutput
downloadPath: '$(Build.SourcesDirectory)'
- task: DownloadBuildArtifacts@0
condition:
ne(variables['useBuildOutputFromBuildId'],'')
- task: PowerShell@2
name: StageFiles
inputs:
buildType: specific
buildVersionToDownload: specific
project: $(System.TeamProjectId)
pipeline: $(System.DefinitionId)
buildId: $(useBuildOutputFromBuildId)
artifactName: FullNuget
downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: CmdLine@1
displayName: 'Display build machine environment variables'
inputs:
filename: 'set'
- script: cmd /c dir /s /b $(Build.ArtifactStagingDirectory)
displayName: Dump artifact staging directory
- template: AzurePipelinesTemplates\WindowsAppSDK-PopulateBuildDateAndRevision-Steps.yml
- task: CopyFiles@2
displayName: 'Copy symbols to artifact staging directory'
condition: always()
inputs:
sourceFolder: $(Build.ArtifactStagingDirectory)\fullnuget
contents: |
**\*.pdb
targetFolder: $(Build.ArtifactStagingDirectory)\symbols
# dump symbols artifact directory - this is normally turned off
# - script: |
# echo $(Build.ArtifactStagingDirectory)\symbols
# dir /s $(Build.ArtifactStagingDirectory)\symbols
- task: PublishSymbols@2
displayName: 'Publish private symbols to internal server (without source indexing)'
inputs:
searchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb'
symbolServerType: 'TeamServices'
# This ADO task does not support indexing of github sources currently :-(
indexSources: false
detailedLog: true
# There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it).
# To work around this issue, we just force LIB to be any dir that we know exists.
env:
LIB: $(Build.SourcesDirectory)
- task: PublishSymbols@2
displayName: 'Publish symbols to public server(without source indexing)'
inputs:
searchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb'
symbolServerType: 'TeamServices'
# This ADO task does not support indexing of github sources currently :-(
indexSources: false
detailedLog: true
# There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it).
# To work around this issue, we just force LIB to be any dir that we know exists.
env:
LIB: $(Build.SourcesDirectory)
ArtifactServices_Symbol_AccountName: microsoftpublicsymbols
ArtifactServices_Symbol_PAT: $(WinSDKLab_microsoftpublicsymbols_PAT)
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "x86,x64,arm64" -Configuration "release" -AzureBuildStep "StageFiles"
- task: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
FolderPath: '$(Build.ArtifactStagingDirectory)\fullnuget'
Pattern: $(signingPattern)
FolderPath: '$(Build.SourcesDirectory)\BuildOutput\FullNuget'
Pattern: |
**/*.winmd
**/*.dll
**/*.exe
UseMinimatch: true
signConfigType: 'inlineSignParams'
inlineOperation: |
@ -404,73 +315,119 @@ jobs:
condition:
eq(${{ parameters.ReleaseSigning }}, true)
- task: CopyFiles@2
displayName: 'Copy symbols to artifact staging directory'
condition: always()
inputs:
sourceFolder: $(Build.SourcesDirectory)\BuildOutput\FullNuget
contents: |
**\*.pdb
targetFolder: $(Build.ArtifactStagingDirectory)\symbols
- task: PublishSymbols@2
displayName: 'Publish private symbols to internal server (without source indexing)'
inputs:
searchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb'
symbolServerType: 'TeamServices'
# This ADO task does not support indexing of github sources currently :-(
indexSources: false
detailedLog: true
# There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it).
# To work around this issue, we just force LIB to be any dir that we know exists.
env:
LIB: $(Build.SourcesDirectory)
- task: PublishSymbols@2
displayName: 'Publish symbols to public server(without source indexing)'
inputs:
searchPattern: '$(Build.ArtifactStagingDirectory)\symbols\**\*.pdb'
symbolServerType: 'TeamServices'
# This ADO task does not support indexing of github sources currently :-(
indexSources: false
detailedLog: true
# There is a bug which causes this task to fail if LIB includes an inaccessible path (even though it does not depend on it).
# To work around this issue, we just force LIB to be any dir that we know exists.
env:
LIB: $(Build.SourcesDirectory)
ArtifactServices_Symbol_AccountName: microsoftpublicsymbols
ArtifactServices_Symbol_PAT: $(WinSDKLab_microsoftpublicsymbols_PAT)
- task: PowerShell@2
name: SetVersion
displayName: Update metapackage version
inputs:
targetType: 'inline'
script: |
$packageVersion = '$(version)'
$pipelineType = '$(PipelineType)'
$sourceBranchName = '$(Build.SourceBranchName)'
if ($sourceBranchName -eq 'main' -or $sourceBranchName -eq 'develop')
{
$packageVersion = $packageVersion + '.' + $sourceBranchName + '.' + $pipelineType
}
Write-Host "##vso[task.setvariable variable=packageVersion;]$packageVersion"
Write-Host "##vso[task.setvariable variable=packageVersion;isOutput=true;]$packageVersion"
Write-Host $packageVersion
[xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
$publicNuspec.package.metadata.version = $packageVersion
Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
- task: PowerShell@2
name: PackNuget
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "x64" -Configuration "release" -AzureBuildStep "PackNuget" -OutputDirectory "$(build.artifactStagingDirectory)\FullNuget" -PackageVersion "$(packageVersion)"
- task: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'Project Reunion ESRP Code Signing Connection'
FolderPath: '$(Build.ArtifactStagingDirectory)\fullnuget'
Pattern: $(signingPattern)
FolderPath: $(build.artifactStagingDirectory)\FullNuget
Pattern: 'Microsoft.WindowsAppSDK.Foundation*.nupkg'
UseMinimatch: true
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"keyCode": "CP-230072",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd sha256"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "signtool.exe",
"toolVersion": "6.2.9304.0"
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetSign",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-401405",
"OperationCode" : "NuGetVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
condition:
eq(${{ parameters.ReleaseSigning }}, false)
eq(${{ parameters.ReleaseSigning }}, true)
# Re-publish signed artifacts to the fullnuget artifact.
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: FullNuget'
displayName: 'Publish artifact: NugetContent'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\fullnuget'
artifactName: 'FullNuget'
PathtoPublish: '$(Build.SourcesDirectory)\BuildOutput\FullNuget'
artifactName: 'NugetContent'
# Create Nuget Package
- template: AzurePipelinesTemplates\WindowsAppSDK-CreateNugetPackage-Job.yml
parameters:
jobName: CreateNugetPackage
dependsOn: SignBinariesAndPublishSymbols
signConfigPattern: 'Microsoft.WindowsAppSDK*.nupkg'
useReleaseTag: '$(WindowsAppSDKFinalRelease)'
buildPool: ProjectReunionESPool-2022
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: TransportPackage'
inputs:
PathtoPublish: '$(build.artifactStagingDirectory)\FullNuget'
artifactName: 'TransportPackage'
# Build WinAppSDK and Run Integration Test from TestAll.ps1
- job: WinAppSDKIntegrationBuildAndTest
dependsOn: ['CreateNugetPackage']
dependsOn: ['StageAndPack']
condition: succeeded()
pool: ProjectReunionESPool-2022
variables:
WindowsAppSDKTransportPackageVersion: $[ dependencies.CreateNugetPackage.outputs['SetVersion.packageVersion'] ]
WindowsAppSDKTransportPackageVersion: $[ dependencies.StageAndPack.outputs['SetVersion.packageVersion'] ]
VersionWithDevTag: $[format('{0}.{1}.{2}-{3}.{4}.{5}', variables['major'], variables['minor'], variables['patch'], 'dev', variables['versionDate'], variables['versionCounter'])]
steps:
#TODO: Remove the two template calls once Add-AppxPackage has been resolved
@ -481,7 +438,7 @@ jobs:
- template: ..\eng\common\AzurePipelinesTemplates\WindowsAppSDK-Build-Steps.yml
parameters:
TransportPackageArtifactName: 'FullNuget'
TransportPackageArtifactName: 'TransportPackage'
WindowsAppSDKPackageVersion: $(VersionWithDevTag)
BuildType: 'stable'
TransportPackages:
@ -504,17 +461,17 @@ jobs:
# Publish
- job: Publish
dependsOn:
- CreateNugetPackage
# - WinAppSDKIntegrationBuildAndTest
- StageAndPack
- WinAppSDKIntegrationBuildAndTest
condition: or(succeeded(), eq(${{ parameters.IgnoreFailures }}, 'true'))
pool: ProjectReunionESPool-2022
variables:
WindowsAppSDKPackageVersion: $[ dependencies.CreateNugetPackage.outputs['SetVersion.packageVersion'] ]
WindowsAppSDKPackageVersion: $[ dependencies.StageAndPack.outputs['SetVersion.packageVersion'] ]
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: FullNuget
downloadPath: '$(Build.SourcesDirectory)'
artifactName: TransportPackage
downloadPath: '$(Build.artifactStagingDirectory)'
itemPattern: |
**/*.nupkg
@ -524,7 +481,7 @@ jobs:
displayName: 'NuGet push to ProjectReunion.nuget.internal'
inputs:
command: 'push'
packagesToPush: '$(Build.SourcesDirectory)/FullNuget/*.nupkg;!$(Build.SourcesDirectory)/FullNuget/*.symbols.nupkg'
packagesToPush: '$(Build.artifactStagingDirectory)/TransportPackage/*.nupkg;!$(Build.artifactStagingDirectory)/TransportPackage/*.symbols.nupkg'
verbosityPush: 'Detailed'
nuGetFeedType: 'internal'
#Note: The project qualifier is always required when using a feed name. Also, do not use organization scoped feeds.
@ -534,4 +491,4 @@ jobs:
parameters:
AssetNames: 'Microsoft.WindowsAppSDK.Foundation.TransportPackage'
AssetVersions: $(WindowsAppSDKPackageVersion)
TriggerSubscription: true
TriggerSubscription: true

Просмотреть файл

@ -56,9 +56,6 @@ jobs:
filePath: tools\VerifyCopyrightHeaders.ps1
- job: Build
dependsOn:
- VerifyCopyrightHeaders
condition: in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
pool:
vmImage: 'windows-2022'
timeoutInMinutes: 120
@ -79,56 +76,48 @@ jobs:
Release_Arm64:
buildPlatform: 'arm64'
buildConfiguration: 'Release'
variables:
publishDir : $(Build.ArtifactStagingDirectory)
steps:
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildDevProject-Steps.yml
parameters:
channel: ${{ variables.channel }}
# This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
runSDLBinaryAnalysis: false
# Required by the Packaged ES SDL Templates.
- checkout: self
persistCredentials: true
- template: AzurePipelinesTemplates\WindowsAppSDK-PublishProjectOutput-Steps.yml
parameters:
GenerateSBOM: false
- task: NuGetToolInstaller@1
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
- task: PowerShell@2
name: BuildBinaries
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "$(buildPlatform)" -Configuration "$(buildConfiguration)" -AzureBuildStep "BuildBinaries"
- task: PublishBuildArtifacts@1
displayName: 'Publish BuildOutput'
displayName: 'Publish artifact: Full Nuget'
inputs:
artifactName: BuildOutput
PathtoPublish: '$(buildOutputDir)'
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
artifactName: 'BuildOutput'
- task: BinSkim@3
inputs:
InputType: 'Basic'
Function: 'analyze'
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
AnalyzeVerbose: true
condition: ne(variables['buildConfiguration'], 'Debug')
- job: BuildAnyCPU
pool:
vmImage: 'windows-2022'
steps:
- task: NuGetToolInstaller@1
- task: PostAnalysis@1
- template: AzurePipelinesTemplates\WindowsAppSDK-SetupBuildEnvironment-Steps.yml
- task: PowerShell@2
name: BuildBinaries
inputs:
AllTools: false
APIScan: false
BinSkim: true
BinSkimBreakOn: 'Error'
CodesignValidation: false
CredScan: false
FortifySCA: false
FxCop: false
ModernCop: false
PoliCheck: false
RoslynAnalyzers: false
SDLNativeRules: false
Semmle: false
TSLint: false
ToolLogsNotFoundAction: 'Standard'
filePath: 'BuildTransportPackage.ps1'
arguments: -AzureBuildStep "BuildAnyCPU"
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: Full Nuget'
inputs:
PathtoPublish: '$(build.SourcesDirectory)\BuildOutput'
artifactName: 'BuildOutput'
- job: BuildMRT
dependsOn:
- VerifyCopyrightHeaders
condition: in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
pool:
vmImage: 'windows-2022'
strategy:
@ -144,12 +133,9 @@ jobs:
buildPlatform: 'ARM64'
buildConfiguration: 'Release'
steps:
- template: build-mrt.yml
parameters:
buildJobName: 'BuildMRTCore'
GenerateSBOM: false
# This pipeline is unable to access OneBranch, so skip running BinaryAnalysis.
runSDLBinaryAnalysis: false
- task: NuGetToolInstaller@1
- template: AzurePipelinesTemplates\WindowsAppSDK-BuildAndTestMRT-Steps.yml
- task: PublishBuildArtifacts@1
displayName: 'Publish BuildOutput'
@ -157,11 +143,63 @@ jobs:
artifactName: BuildOutput
PathtoPublish: '$(buildOutputDir)'
- template: AzurePipelinesTemplates\WindowsAppSDK-RunHelixTests-Job.yml
parameters:
name: 'RunTestsInHelix'
dependsOn:
- Build
- BuildMRT
condition: in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues')
- job: StageAndPack
pool:
vmImage: 'windows-2022'
timeoutInMinutes: 120
dependsOn:
- Build
- BuildMRT
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: BuildOutput
downloadPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
name: StageFiles
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "x86,x64,arm64" -Configuration "release" -AzureBuildStep "StageFiles"
- task: PowerShell@2
name: SetVersion
displayName: Update metapackage version
inputs:
targetType: 'inline'
script: |
$packageVersion = '$(version)'
$pipelineType = '$(PipelineType)'
$sourceBranchName = '$(Build.SourceBranchName)'
if ($sourceBranchName -eq 'main' -or $sourceBranchName -eq 'develop')
{
$packageVersion = $packageVersion + '.' + $sourceBranchName + '.' + $pipelineType
}
Write-Host "##vso[task.setvariable variable=packageVersion;]$packageVersion"
Write-Host $packageVersion
[xml]$publicNuspec = Get-Content -Path $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
$publicNuspec.package.metadata.version = $packageVersion
Set-Content -Value $publicNuspec.OuterXml $(Build.SourcesDirectory)\build\NuSpecs\Microsoft.WindowsAppSDK.Foundation.nuspec
- task: PowerShell@2
name: PackNuget
inputs:
filePath: 'BuildTransportPackage.ps1'
arguments: -Platform "x64" -Configuration "release" -AzureBuildStep "PackNuget" -OutputDirectory "$(build.artifactStagingDirectory)\FullNuget" -PackageVersion "$(packageVersion)"
- task: BinSkim@3
inputs:
InputType: 'Basic'
Function: 'analyze'
AnalyzeTarget: '$(Build.ArtifactStagingDirectory)\*.dll;$(Build.ArtifactStagingDirectory)\*.exe'
AnalyzeTarget: '$(build.SourcesDirectory)\BuildOutput\FullNuget\*.dll;$(build.SourcesDirectory)\BuildOutput\FullNuget\*.exe'
AnalyzeVerbose: true
- task: PostAnalysis@1
@ -182,37 +220,14 @@ jobs:
TSLint: false
ToolLogsNotFoundAction: 'Standard'
- job: PublishMRT
dependsOn:
- BuildMRT
condition: in(dependencies.BuildMRT.result, 'Succeeded')
pool:
vmImage: 'windows-2022'
steps:
- template: publish-mrt.yml
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: NugetContent'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)\BuildOutput\FullNuget'
artifactName: 'NugetContent'
- template: AzurePipelinesTemplates\WindowsAppSDK-RunHelixTests-Job.yml
parameters:
name: 'RunTestsInHelix'
dependsOn:
- Build
- BuildMRT
condition: in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues')
# Create Nuget Package
- template: AzurePipelinesTemplates\WindowsAppSDK-CreateNugetPackage-Job.yml
parameters:
publishToMaestro: false
jobName: CreateNugetPackage
dependsOn:
- VerifyCopyrightHeaders
- Build
- PublishMRT
prereleaseVersionTag: ci
condition: |
and
(
in(dependencies.PublishMRT.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
in(dependencies.VerifyCopyrightHeaders.result, 'Succeeded')
)
- task: PublishBuildArtifacts@1
displayName: 'Publish artifact: TransportPackage'
inputs:
PathtoPublish: '$(build.artifactStagingDirectory)\FullNuget'
artifactName: 'TransportPackage'

Просмотреть файл

@ -1,243 +0,0 @@
# See https://aka.ms/yaml for details on the YAML schema and ADO jobs.
#name: $(BuildDefinitionName)-$(date:yyMM).$(date:dd)$(rev:rrr)
parameters:
MRTSourcesDirectory: $(Build.SourcesDirectory)\dev\MRTCore
MRTBinariesDirectory: $(Build.SourcesDirectory)\BuildOutput
GenerateSBOM: False
runSDLBinaryAnalysis: false
enablePREFast: true
steps:
- task: BatchScript@1
displayName: Set up environment
inputs:
filename: '${{ parameters.MRTSourcesDirectory }}\build\init.cmd'
arguments: /envonly $(buildPlatform)fre
modifyEnvironment: true
- template: AzurePipelinesTemplates\WindowsAppSDK-InstallWindowsSDK-Steps.yml
- task: NuGetToolInstaller@1
- task: NuGetAuthenticate@1
# Start restoring packages for C++ projects. The C# ones will be restored by the build task
# Note: 'NuGetCommand@2' is ambiguous so the specific task GUID must be used instead.
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of core'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.MRTSourcesDirectory }}\mrt\core\src\packages.config -ConfigFile nuget.config -PackagesDirectory ${{ parameters.MRTSourcesDirectory }}\mrt\packages'
# NuGetCommand@2
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of applicationmodel'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.MRTSourcesDirectory }}\mrt\Microsoft.Windows.ApplicationModel.Resources\src\packages.config -ConfigFile nuget.config -PackagesDirectory ${{ parameters.MRTSourcesDirectory }}\mrt\packages'
# NuGetCommand@2
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of mrmex'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.MRTSourcesDirectory }}\mrt\mrm\mrmex\packages.config -ConfigFile nuget.config -PackagesDirectory ${{ parameters.MRTSourcesDirectory }}\mrt\packages'
# NuGetCommand@2
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of mrmmin'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.MRTSourcesDirectory }}\mrt\mrm\mrmmin\packages.config -ConfigFile nuget.config -PackagesDirectory ${{ parameters.MRTSourcesDirectory }}\mrt\packages'
# NuGetCommand@2
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'NuGet restore of mrm unittests'
inputs:
command: 'custom'
arguments: 'restore ${{ parameters.MRTSourcesDirectory }}\mrt\mrm\unittests\packages.config -ConfigFile nuget.config -PackagesDirectory ${{ parameters.MRTSourcesDirectory }}\mrt\packages'
# - task: powershell@2
# displayName: 'Install the VS build tools'
# inputs:
# targetType: filePath
# filePath: ${{ parameters.MRTSourcesDirectory }}\build\Initialize-InstallMSBuild.ps1
# arguments: '-installDir ${{ parameters.MRTSourcesDirectory }}\.buildtools -logsDir ${{ parameters.MRTSourcesDirectory }}\msbuild-install-logs'
# - task: BatchScript@1
# displayName: Add the VS build tools to the path
# inputs:
# filename: '${{ parameters.MRTSourcesDirectory }}\build\SetMSBuildVars.cmd'
# arguments: '${{ parameters.MRTSourcesDirectory }}\.buildtools'
# modifyEnvironment: true
# - task: PublishBuildArtifacts@1
# displayName: 'Publish install logs'
# condition: Failed()
# inputs:
# PathtoPublish: '${{ parameters.MRTSourcesDirectory }}\msbuild-install-logs'
# artifactName: 'installlogs'
# - task: powershell@2
# displayName: 'Installing .NET SDK'
# inputs:
# targetType: filePath
# workingDirectory: ${{ parameters.MRTSourcesDirectory }}\build
# filePath: ${{ parameters.MRTSourcesDirectory }}\build\DownloadDotNetCoreSdk.ps1
# - task: BatchScript@1
# displayName: 'Use .NET SDK'
# inputs:
# filename: '${{ parameters.MRTSourcesDirectory }}\build\SetDotnetVars.cmd'
# arguments: '${{ parameters.MRTSourcesDirectory }}'
# modifyEnvironment: true
- task: powershell@2
displayName: 'Create test pfx to sign MSIX test packages (DevCheck)'
inputs:
targetType: filePath
filePath: tools\DevCheck.ps1
arguments: -NoInteractive -Offline -Verbose -CertPassword 'BuildPipeline' -CheckTestPfx -Clean
workingDirectory: '$(Build.SourcesDirectory)'
# - task: BatchScript@1
# displayName: 'Debug'
# inputs:
# filename: '$(Build.SourcesDirectory)\build\debug-pipeline.cmd'
- task: powershell@2
name: UpdateTraceloggingConfig
inputs:
targetType: 'inline'
script: |
$srcPath = Get-Childitem -Path 'dev\WindowsAppRuntime_Insights\packages' -File 'MicrosoftTelemetry.h' -Recurse
if (($srcPath -ne $null)){
$destinationPath = Get-Childitem -Path '${{ parameters.MRTSourcesDirectory }}\mrt\packages' -File 'Traceloggingconfig.h' -Recurse
if (($destinationPath -ne $null)){
Write-Host $srcPath.FullName, $destinationPath.FullName
Copy-Item -Force $srcPath.FullName $destinationPath.FullName
}
}
- task: MSBuild@1
displayName: 'build MrtCore'
inputs:
# msbuildLocationMethod: 'location'
# msbuildLocation: ${{ parameters.MRTSourcesDirectory }}\.buildtools\MSBuild\Current\Bin\MSBuild.exe
platform: '$(buildPlatform)'
solution: '${{ parameters.MRTSourcesDirectory }}\mrt\MrtCore.sln'
configuration: '$(buildConfiguration)'
msbuildArguments: '/restore /binaryLogger:$(Build.SourcesDirectory)/mrtcore.$(buildPlatform).$(buildConfiguration).binlog'
- ${{ if eq(parameters.runSDLBinaryAnalysis, 'true') }}:
- template: AzurePipelinesTemplates\WindowsAppSDK-BinaryAnalysis-steps.yml
parameters:
outputDirectory: '${{ parameters.MRTBinariesDirectory }}'
enablePREFast: ${{ parameters.enablePREFast }}
- task: PublishBuildArtifacts@1
displayName: 'Publish mrtcore binlog'
condition: succeededOrFailed()
inputs:
PathtoPublish: $(Build.SourcesDirectory)/mrtcore.$(buildPlatform).$(buildConfiguration).binlog
artifactName: binlogs
# Run the test locally on the Azure VM.
- task: VSTest@2
displayName: 'test MRT: ManagedTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrtCoreManagedTest.build.appxrecipe'
searchFolder: '${{ parameters.MRTBinariesDirectory }}\$(buildConfiguration)\$(buildPlatform)\MrtCoreManagedTest'
testRunTitle: 'test MRT: ManagedTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: UnitTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrmUnitTest.dll'
searchFolder: '${{ parameters.MRTBinariesDirectory }}\$(buildConfiguration)\$(buildPlatform)\MrmUnitTest'
testRunTitle: 'test MRT: UnitTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: BaseUnitTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MrmBaseUnitTests.dll'
searchFolder: '${{ parameters.MRTBinariesDirectory }}\$(buildConfiguration)\$(buildPlatform)\MrmBaseUnitTests'
testRunTitle: 'test MRT: BaseUnitTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'test MRT: UnpackagedTests'
condition: and(succeeded(), or(eq(variables['buildPlatform'], 'x86'), eq(variables['buildPlatform'], 'x64')))
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '**\MRTCoreUnpackagedTests.dll'
searchFolder: '${{ parameters.MRTBinariesDirectory }}\$(buildConfiguration)\$(buildPlatform)\MrtCoreUnpackagedTests'
testRunTitle: 'test MRT: UnpackagedTests - $(buildPlatform)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'Medium'
failOnAlert: true
- task: CopyFiles@2
displayName: 'copy binaries for signing'
inputs:
SourceFolder: '${{ parameters.MRTBinariesDirectory }}\Release\$(buildPlatform)'
Contents: |
mrm\mrm.dll
mrm\mrm.lib
mrm\mrm.pdb
Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.dll
Microsoft.Windows.ApplicationModel.Resources\Microsoft.Windows.ApplicationModel.Resources.pdb
TargetFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\$(buildPlatform)'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy projection binaries and symbols for signing'
condition: and(succeeded(), eq(variables['buildPlatform'], 'x86'))
inputs:
SourceFolder: '${{ parameters.MRTBinariesDirectory }}\Release\$(buildPlatform)\Microsoft.Windows.ApplicationModel.Resources.Projection'
Contents: |
Microsoft.Windows.ApplicationModel.Resources.Projection.dll
Microsoft.Windows.ApplicationModel.Resources.Projection.pdb
TargetFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\anycpu\net6.0'
flattenFolders: false
- task: CopyFiles@2
displayName: 'copy winmd for signing'
condition: and(succeeded(), eq(variables['buildPlatform'], 'x86'))
inputs:
SourceFolder: '${{ parameters.MRTBinariesDirectory }}\Release\$(buildPlatform)\Microsoft.Windows.ApplicationModel.Resources'
Contents: |
Microsoft.Windows.ApplicationModel.Resources.winmd
TargetFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\anycpu'
flattenFolders: true
- ${{ if eq(parameters.GenerateSBOM, 'true') }}:
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(Build.ArtifactStagingDirectory)\mrt_raw\lib\$(buildPlatform)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: Binaries'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\mrt_raw'
ArtifactName: 'mrtcore_binaries'

Просмотреть файл

@ -1,189 +0,0 @@
parameters:
MRTSourcesDirectory: $(Build.SourcesDirectory)\dev\MRTCore
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.11'
inputs:
versionSpec: 5.11
continueOnError: true
- task: DownloadBuildArtifacts@0
displayName: 'Download Binaries'
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: 'mrtcore_binaries'
downloadPath: '$(Build.ArtifactStagingDirectory)\mrt_raw'
# START of copying files into their final package location.
- task: CopyFiles@2
displayName: 'copy winmd into uap10.0 folder'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\anycpu'
Contents: |
Microsoft.Windows.ApplicationModel.Resources.winmd
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\lib\uap10.0\'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy .net 5 projection DLL and PDB'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\anycpu'
Contents: |
net6.0\Microsoft.Windows.ApplicationModel.Resources.Projection.pdb
net6.0\Microsoft.Windows.ApplicationModel.Resources.Projection.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\lib\net6.0-windows10.0.17763.0\'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy x86'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\x86'
Contents: |
mrm.pdb
Microsoft.Windows.ApplicationModel.Resources.pdb
mrm.dll
Microsoft.Windows.ApplicationModel.Resources.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\runtimes\win10-x86\native'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy x64'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\x64'
Contents: |
mrm.pdb
Microsoft.Windows.ApplicationModel.Resources.pdb
mrm.dll
Microsoft.Windows.ApplicationModel.Resources.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\runtimes\win10-x64\native'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy ARM64'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\ARM64'
Contents: |
mrm.pdb
Microsoft.Windows.ApplicationModel.Resources.pdb
mrm.dll
Microsoft.Windows.ApplicationModel.Resources.dll
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\runtimes\win10-arm64\native'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy import lib x86'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\x86'
Contents: |
mrm.lib
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\lib\win10-x86'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy import lib x64'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\x64'
Contents: |
mrm.lib
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\lib\win10-x64'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy import lib ARM64'
inputs:
SourceFolder: '$(Build.ArtifactStagingDirectory)\mrt_raw\mrtcore_binaries\lib\ARM64'
Contents: |
mrm.lib
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\lib\win10-arm64'
flattenFolders: true
- task: CopyFiles@2
displayName: 'copy packaging files'
inputs:
SourceFolder: '${{ parameters.MRTSourcesDirectory }}\packaging'
Contents: |
MrtCore.props
MrtCore.PriGen.targets
MrtCore.References.targets
MrtCore.targets
native\MrtCore.C.props
native\MrtCore.props
native\MrtCore.targets
ProjectItemsSchema.xaml
README.md
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\build'
flattenFolders: false
- task: CopyFiles@2
displayName: 'copy header'
inputs:
SourceFolder: '${{ parameters.MRTSourcesDirectory }}\mrt\core\src'
Contents: |
mrm.h
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\include'
- task: CopyFiles@2
displayName: 'copy idl'
inputs:
SourceFolder: '${{ parameters.MRTSourcesDirectory }}\mrt\Microsoft.Windows.ApplicationModel.Resources\src'
Contents: |
Microsoft.Windows.ApplicationModel.Resources.idl
TargetFolder: '$(Build.ArtifactStagingDirectory)\fullnuget\include'
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)\fullnuget'
ArtifactName: 'FullNuget'
# NuGetCommand@2
# - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
# condition: and(succeeded(), eq(variables.codeSign, true))
# displayName: 'publish to MRTCore feed'
# inputs:
# command: 'push'
# packagesToPush: '$(Build.ArtifactStagingDirectory)/nuget/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
# nuGetFeedType: 'internal'
# publishVstsFeed: '2771a91e-5705-4d88-a3e9-70623b166f8d/659bea81-0d99-4dc0-b32f-200cd635e5ad'
# TODO: get the test app to build using the NuGet package generated earlier in the pipeline.
#- task: NuGetCommand@2
# displayName: 'NuGet restore of test apps'
# env:
# # The RuntimeIdentifier property in a .csproj is constructed using win-$(Platform). AnyCPU is the default platform, but
# # "win-AnyCPU" is an invalid RuntimeIdentifier. Just use the platform x64 instead! It doesn't matter whether x86 or x64 is used.
# NUGET_RESTORE_MSBUILD_ARGS: /p:Platform=x64
# inputs:
# command: 'restore'
# restoreSolution: |
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app.sln'
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app_cpp.sln'
# feedsToUse: 'select'
# includeNuGetOrg: false
# vstsFeed: '$(Build.ArtifactStagingDirectory)\nuget'
# TODO: use the $(solution) variable instead. That'll build all solution files in the repo. Currently, this isn't being done because getting
# $(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app.sln to build in the pipeline is being deferred.
#- task: VSBuild@1
# displayName: 'build x86'
# inputs:
# platform: 'x86'
# solution: |
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app.sln'
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app_cpp.sln'
# configuration: '$(buildConfiguration)'
# msbuildArgs: '/p:AppxBundlePlatforms="x86" /p:UapAppxPackageBuildMode=StoreUpload'
#- task: VSBuild@1
# displayName: 'build x64'
# inputs:
# platform: 'x64'
# solution: |
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app.sln'
# '$(Build.SourcesDirectory)\tools\TestApps\winui_desktop_packaged_app\winui_desktop_packaged_app_cpp.sln'
# configuration: '$(buildConfiguration)'
# msbuildArgs: '/p:AppxBundlePlatforms="x64" /p:UapAppxPackageBuildMode=StoreUpload'

Просмотреть файл

@ -38,4 +38,5 @@ $packagesText +=
Write-Host $packagesText
Set-Content -Value $packagesText $packageConfigPath
New-Item -Path $packageConfigPath -Type file -Force
Set-Content -Path $packageConfigPath -Value $packagesText

Просмотреть файл

@ -55,7 +55,7 @@ via `More` / `Import configuration` and select `docs\Coding-Guidelines\VisualStu
# One-Time Setup
Run the `tools\DevCheck.cmd` from an elevated command prompt (e.g. right-click on "Command Prompt"
Run the `DevCheck.cmd` from an elevated command prompt (e.g. right-click on "Command Prompt"
in the Start Menu and select `Run as Administrator`) to update your development environment. The script:
* Adds test certificate to the certificate store. Used to sign test packages for inner-loop development and testing
@ -63,7 +63,7 @@ in the Start Menu and select `Run as Administrator`) to update your development
This is needed once to enable your machine to develop Windows App SDK. It may be needed again in the
future at rare intervals e.g. the test certificate usually expires a year from its issue date) or if
the TAEF dependency has an update. When in doubt you can always run `tools\DevCheck.cmd` as it's
the TAEF dependency has an update. When in doubt you can always run `DevCheck.cmd` as it's
harmless if your configuration is current with no changes needed.
# Tada!

Просмотреть файл

@ -1,14 +0,0 @@
@echo off
SETLOCAL
IF /I "%1" == "-help" GOTO Help
IF /I "%1" == "--help" GOTO Help
powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile %~dpn0.ps1 %*
GOTO TheEnd
:Help
powershell -ExecutionPolicy Unrestricted -NoLogo -NoProfile -c Get-Help %~dpn0.ps1 -full
:TheEnd
ENDLOCAL