From e22d00eec3fc0e9d41eceedb62698220a43ce097 Mon Sep 17 00:00:00 2001
From: Keith Mahoney <41657372+kmahone@users.noreply.github.com>
Date: Fri, 28 Apr 2023 12:10:40 -0700
Subject: [PATCH] Execute tests directly on Pipeline (#8439)
(cherry picked from commit 0a2d1ce98f4ce1dca2afe17ca43a0f4d5fdf7241)
---
PGO.runtime.props | 4 +
.../MUX-BuildAndPublishPGONuGet-Job.yml | 4 +-
.../MUX-BuildDevProject-Steps.yml | 2 +-
.../MUX-BuildProject-Steps.yml | 2 +-
.../MUX-CreateHelixProjFile-Steps.yml | 3 +-
.../MUX-CreateNugetPackage-Job.yml | 11 +-
.../MUX-MergePGD-Job.yml | 16 +-
.../MUX-NugetReleaseTest-Job.yml | 13 +-
.../MUX-ProcessTestResults-Job.yml | 2 +-
.../MUX-RestorePgo-Steps.yml | 2 +
.../MUX-RunHelixTests-Job.yml | 139 ++++-----
.../MUX-RunTestsOnPipeline-Job.yml | 127 ++++++++
.../MUX-WACKTests-Job.yml | 7 +-
build/CopyFilesToStagingDir.ps1 | 2 +
build/Helix/CopyPGOFiles.ps1 | 2 +-
build/Helix/PrepareHelixPayload.ps1 | 1 +
build/Helix/packages.config | 2 +-
...n.ps1 => TestPass-OneTimeMachineSetup.ps1} | 11 +
build/MUX-CI.yml | 144 +++++----
build/MUX-PGOInstrument.yml | 167 +++++------
build/MUX-PR.yml | 158 +++++-----
build/WinUI-Official-Validation.yml | 273 +++++++++---------
environment.props | 3 +
.../Tests/MetadataProviderTests.cs | 7 +-
24 files changed, 621 insertions(+), 481 deletions(-)
create mode 100644 build/AzurePipelinesTemplates/MUX-RunTestsOnPipeline-Job.yml
rename build/Helix/scripts/{TestPass-PreRun.ps1 => TestPass-OneTimeMachineSetup.ps1} (95%)
diff --git a/PGO.runtime.props b/PGO.runtime.props
index 495bedfb23..3982cd3dec 100644
--- a/PGO.runtime.props
+++ b/PGO.runtime.props
@@ -23,5 +23,9 @@
%(Filename)%(Extension)
PreserveNewest
+
+ %(Filename)%(Extension)
+ PreserveNewest
+
\ No newline at end of file
diff --git a/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml b/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml
index 2ce4e7afcf..90443fb092 100644
--- a/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml
@@ -6,8 +6,8 @@ parameters:
jobs:
- job: BuildAndPublishPGONuGet
dependsOn: ${{ parameters.dependsOn }}
- pool:
- vmImage: 'windows-2019'
+ pool:
+ name: WinDevPool-S
variables:
artifactsPath: $(Build.SourcesDirectory)\Artifacts
pgoToolsPath: $(Build.SourcesDirectory)\tools\MUXPGODatabase
diff --git a/build/AzurePipelinesTemplates/MUX-BuildDevProject-Steps.yml b/build/AzurePipelinesTemplates/MUX-BuildDevProject-Steps.yml
index 3de8185a4f..ce85967e6b 100644
--- a/build/AzurePipelinesTemplates/MUX-BuildDevProject-Steps.yml
+++ b/build/AzurePipelinesTemplates/MUX-BuildDevProject-Steps.yml
@@ -36,7 +36,7 @@ steps:
vsVersion: 16.0
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- msbuildArgs: '/restore /p:UseInsiderSDK=$(UseInsiderSDK) /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Never /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/MUXExperimental.sln.$(buildPlatform).$(buildConfiguration).binlog /p:MUXVersionBuild=$(builddate_yymm) /p:MUXVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:PGOBuildMode=$(PGOBuildMode)'
+ msbuildArgs: '/restore /p:UseInsiderSDK=$(UseInsiderSDK) /p:AppxPackageDir="$(appxPackageDir)" /p:AppxBundle=Never /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/MUXExperimental.sln.$(buildPlatform).$(buildConfiguration).binlog /p:MUXVersionBuild=$(builddate_yymm) /p:MUXVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:VCToolsRedistDir="$(VCToolsRedistDir)\"'
- task: PublishBuildArtifacts@1
displayName: 'Publish MUXExperimental.sln binlog'
diff --git a/build/AzurePipelinesTemplates/MUX-BuildProject-Steps.yml b/build/AzurePipelinesTemplates/MUX-BuildProject-Steps.yml
index 08cb02d666..5dbc5508cd 100644
--- a/build/AzurePipelinesTemplates/MUX-BuildProject-Steps.yml
+++ b/build/AzurePipelinesTemplates/MUX-BuildProject-Steps.yml
@@ -34,7 +34,7 @@ steps:
vsVersion: 16.0
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- msbuildArgs: '/restore /p:UseInsiderSDK=$(UseInsiderSDK) /p:AppxPackageDir="${{ parameters.appxPackageDir }}" /p:AppxBundle=Never /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog /p:MUXVersionBuild=$(builddate_yymm) /p:MUXVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:PGOBuildMode=$(PGOBuildMode)'
+ msbuildArgs: '/restore /p:UseInsiderSDK=$(UseInsiderSDK) /p:AppxPackageDir="${{ parameters.appxPackageDir }}" /p:AppxBundle=Never /p:AppxSymbolPackageEnabled=false /binaryLogger:$(Build.SourcesDirectory)/${{ parameters.solutionPath }}.$(buildPlatform).$(buildConfiguration).binlog /p:MUXVersionBuild=$(builddate_yymm) /p:MUXVersionRevision=$(builddate_dd)$(buildrevision) /p:VCToolsInstallDir="$(VCToolsInstallDir)\" /p:VCToolsRedistDir="$(VCToolsRedistDir)\" /p:PGOBuildMode=$(PGOBuildMode)'
- task: PublishBuildArtifacts@1
displayName: 'Publish ${{ parameters.solutionPath }} binlog'
diff --git a/build/AzurePipelinesTemplates/MUX-CreateHelixProjFile-Steps.yml b/build/AzurePipelinesTemplates/MUX-CreateHelixProjFile-Steps.yml
index a0033c8161..aab7580676 100644
--- a/build/AzurePipelinesTemplates/MUX-CreateHelixProjFile-Steps.yml
+++ b/build/AzurePipelinesTemplates/MUX-CreateHelixProjFile-Steps.yml
@@ -2,6 +2,7 @@ parameters:
condition: ''
testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload'
testFilePattern: ''
+ outputProjDir: $(Build.SourcesDirectory)\helixworkitems
outputProjFileName: ''
taefQuery: ''
@@ -12,4 +13,4 @@ steps:
inputs:
targetType: filePath
filePath: build\Helix\GenerateTestProjFile.ps1
- arguments: -TestFilePattern '${{ parameters.testFilePattern }}' -TestBinaryDirectoryPath '${{ parameters.testBinaryDirectoryPath }}' -OutputProjFile '$(Build.ArtifactStagingDirectory)\${{ parameters.outputProjFileName }}' -TaefQuery "${{ parameters.taefQuery }}" -TestNamePrefix $(buildConfiguration).$(buildPlatform)
\ No newline at end of file
+ arguments: -TestFilePattern '${{ parameters.testFilePattern }}' -TestBinaryDirectoryPath '${{ parameters.testBinaryDirectoryPath }}' -OutputProjFile '${{ parameters.outputProjDir }}\${{ parameters.outputProjFileName }}' -TaefQuery "${{ parameters.taefQuery }}" -TestNamePrefix $(buildConfiguration).$(buildPlatform)
\ No newline at end of file
diff --git a/build/AzurePipelinesTemplates/MUX-CreateNugetPackage-Job.yml b/build/AzurePipelinesTemplates/MUX-CreateNugetPackage-Job.yml
index f4f18b324c..ddabf5c8d5 100644
--- a/build/AzurePipelinesTemplates/MUX-CreateNugetPackage-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-CreateNugetPackage-Job.yml
@@ -1,7 +1,6 @@
parameters:
# Extract the build revision number from Build.BuildNumber. This is needed to pass to build-nupkg
jobName: ''
- dependsOn: ''
buildOutputDir: '$(Build.SourcesDirectory)\BuildOutput'
nupkgdir: '$(build.artifactStagingDirectory)'
# The "primary" build arch is the one that the nuspec gets its winmd, pri, and other neutral files from
@@ -13,11 +12,11 @@ parameters:
jobs:
- job: ${{ parameters.jobName }}
- dependsOn:
- - ${{ parameters.dependsOn }}
-
- pool:
- vmImage: 'windows-2019'
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-S
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-S
steps:
diff --git a/build/AzurePipelinesTemplates/MUX-MergePGD-Job.yml b/build/AzurePipelinesTemplates/MUX-MergePGD-Job.yml
index 6aa5e2de98..e6e89eceef 100644
--- a/build/AzurePipelinesTemplates/MUX-MergePGD-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-MergePGD-Job.yml
@@ -6,8 +6,8 @@ parameters:
jobs:
- job: MergePGD
dependsOn: ${{ parameters.dependsOn }}
- pool:
- vmImage: 'windows-2019'
+ pool:
+ name: WinDevPool-S
variables:
artifactsPath: $(Build.SourcesDirectory)\Artifacts
pgoArtifactsPath: $(artifactsPath)\${{ parameters.pgoArtifact }}
@@ -25,11 +25,23 @@ jobs:
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
displayName: 'Retrieve VC tools directory'
+ - task: DownloadBuildArtifacts@0
+ inputs:
+ artifactName: TestOutput-fwPkg
+ downloadPath: $(artifactsPath)\pgo
+
- task: DownloadBuildArtifacts@0
inputs:
artifactName: ${{ parameters.pgoArtifact }}
downloadPath: $(artifactsPath)
+ - task: powershell@2
+ displayName: CopyPGOFiles.ps1
+ inputs:
+ targetType: filePath
+ filePath: build\Helix\CopyPGOFiles.ps1
+ arguments: -SourceFolder '$(artifactsPath)\pgo\TestOutput-fwPkg\Win10-RS5\$(buildPlatform)$(buildConfiguration)' -OutputFolder '$(artifactsPath)'
+
- script: |
cd $(buildPlatform)
"%VCToolsInstallDir%\bin\hostx64\x64\pgomgr.exe" /merge *.pgc ${{ parameters.pgdFile }}
diff --git a/build/AzurePipelinesTemplates/MUX-NugetReleaseTest-Job.yml b/build/AzurePipelinesTemplates/MUX-NugetReleaseTest-Job.yml
index c003fcdddf..8e30750ec3 100644
--- a/build/AzurePipelinesTemplates/MUX-NugetReleaseTest-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-NugetReleaseTest-Job.yml
@@ -4,7 +4,6 @@ parameters:
runTestJobName: 'RunNugetPkgTestsInHelix'
dependsOn: ''
runTests: 'true'
- helixType: 'test/nuget'
test_matrix: ''
useFrameworkPkg: false
taefQuery: ''
@@ -102,7 +101,9 @@ jobs:
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
+ echo VCToolsRedistDir = %VCToolsRedistDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
+ echo ##vso[task.setvariable variable=VCToolsRedistDir]%VCToolsRedistDir%
displayName: 'Retrieve VC tools directory'
- template: MUX-BuildProject-Steps.yml
@@ -122,13 +123,13 @@ jobs:
- ${{if eq(parameters.runTests, 'true')}}:
- template: MUX-RunHelixTests-Job.yml
parameters:
- name: ${{ parameters.runTestJobName }}
dependsOn: ${{ parameters.buildJobName }}
- testSuite: 'NugetTestSuite'
- helixType: ${{ parameters.helixType }}
+ ${{if eq(parameters.useFrameworkPkg, 'false')}}:
+ testSuite: 'nupkg'
+ ${{if eq(parameters.useFrameworkPkg, 'true')}}:
+ testSuite: 'fwPkg'
artifactName: ${{ parameters.buildArtifactName }}
${{if eq(parameters.useFrameworkPkg, 'true')}}:
taefQuery: "(not (@NugetPkgTestsOnly = 'true'))"
rerunPassesRequiredToAvoidFailure: 5
- ${{if ne(parameters.test_matrix, '') }}:
- matrix: ${{ parameters.test_matrix }}
\ No newline at end of file
+ maxParallel: 2
\ No newline at end of file
diff --git a/build/AzurePipelinesTemplates/MUX-ProcessTestResults-Job.yml b/build/AzurePipelinesTemplates/MUX-ProcessTestResults-Job.yml
index 3ef7a58ce1..85dd903aeb 100644
--- a/build/AzurePipelinesTemplates/MUX-ProcessTestResults-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-ProcessTestResults-Job.yml
@@ -14,7 +14,7 @@ jobs:
timeoutInMinutes: 120
variables:
helixOutputFolder: $(Build.SourcesDirectory)\HelixOutput
- winuiHelixVersion: 0.0.2.6
+ winuiHelixVersion: 0.5.8
helixScriptPath: $(Build.SourcesDirectory)\build\Helix\packages\Microsoft.Internal.WinUI.Helix.$(winuiHelixVersion)\scripts\pipeline
${{if eq(parameters.pgoArtifact, '') }}:
processHelixFilesExtraArgs: ''
diff --git a/build/AzurePipelinesTemplates/MUX-RestorePgo-Steps.yml b/build/AzurePipelinesTemplates/MUX-RestorePgo-Steps.yml
index b7a03267af..56e1e60353 100644
--- a/build/AzurePipelinesTemplates/MUX-RestorePgo-Steps.yml
+++ b/build/AzurePipelinesTemplates/MUX-RestorePgo-Steps.yml
@@ -6,7 +6,9 @@ steps:
del %TEMP%\vsinstalldir.txt
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat"
echo VCToolsInstallDir = %VCToolsInstallDir%
+ echo VCToolsRedistDir = %VCToolsRedistDir%
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir%
+ echo ##vso[task.setvariable variable=VCToolsRedistDir]%VCToolsRedistDir%
displayName: 'Retrieve VC tools directory'
- task: powershell@2
diff --git a/build/AzurePipelinesTemplates/MUX-RunHelixTests-Job.yml b/build/AzurePipelinesTemplates/MUX-RunHelixTests-Job.yml
index 6655e3586e..a4989b2e8a 100644
--- a/build/AzurePipelinesTemplates/MUX-RunHelixTests-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-RunHelixTests-Job.yml
@@ -1,44 +1,41 @@
parameters:
- name: 'RunTestsInHelix'
dependsOn: ''
- condition: ''
- testSuite: DevTestSuite
- helixType: test/devtest
+ condition: succeeded()
+ testSuite: devtest
# If a Pipeline runs this template more than once, this parameter should be unique per build flavor to differentiate the
# the different test runs:
artifactName: 'drop'
- maxParallel: 4
+ maxParallel: 10
rerunPassesRequiredToAvoidFailure: 5
taefQuery: ''
# if 'useBuildOutputFromBuildId' is set, we will default to using a build from this pipeline:
- useBuildOutputFromPipeline: $(System.DefinitionId)
+
matrix:
Release_x86:
buildPlatform: 'x86'
buildConfiguration: 'release'
- openHelixTargetQueues: 'windows.10.amd64.clientrs5.open.xaml'
- closedHelixTargetQueues: 'windows.10.amd64.clientrs5.xaml'
Release_x64:
buildPlatform: 'x64'
buildConfiguration: 'release'
- openHelixTargetQueues: 'windows.10.amd64.client.open.reunion'
- closedHelixTargetQueues: 'windows.10.amd64.client20h2.xaml'
jobs:
-- job: ${{ parameters.name }}
+- job: CreateTestPayload_${{ parameters.testSuite }}
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
- pool:
- vmImage: 'windows-2019'
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-S
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-S
timeoutInMinutes: 120
strategy:
- maxParallel: ${{ parameters.maxParallel }}
+ maxParallel: 10
matrix: ${{ parameters.matrix }}
variables:
artifactsDir: $(Build.SourcesDirectory)\Artifacts
- helixCommonArgs: '/binaryLogger:$(Build.SourcesDirectory)/${{parameters.name}}.$(buildPlatform).$(buildConfiguration).binlog /p:HelixBuild=$(Build.BuildId).$(buildPlatform).$(buildConfiguration) /p:Platform=$(buildPlatform) /p:Configuration=$(buildConfiguration) /p:HelixType=${{parameters.helixType}}$(buildPlatform)$(buildConfiguration) /p:TestSuite=${{parameters.testSuite}} /p:ProjFilesPath=$(Build.ArtifactStagingDirectory) /p:rerunPassesRequiredToAvoidFailure=${{parameters.rerunPassesRequiredToAvoidFailure}}'
+ useBuildOutputFromPipeline: $(System.DefinitionId)
+ useBuildOutputFromBuildId: ''
-
steps:
- task: CmdLine@1
displayName: 'Display build machine environment variables'
@@ -69,7 +66,7 @@ jobs:
buildType: specific
buildVersionToDownload: specific
project: $(System.TeamProjectId)
- pipeline: ${{ parameters.useBuildOutputFromPipeline }}
+ pipeline: $(useBuildOutputFromPipeline)
buildId: $(useBuildOutputFromBuildId)
artifactName: ${{ parameters.artifactName }}
downloadPath: '$(artifactsDir)'
@@ -87,63 +84,69 @@ jobs:
filename: 'dir'
arguments: '/s $(Build.SourcesDirectory)\HelixPayload'
- - template: MUX-CreateHelixProjFile-Steps.yml
- parameters:
- condition: and(succeeded(),ne('${{ parameters.testSuite }}','NugetTestSuite'))
- testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
- testFilePattern: 'MUXControls.Test.dll'
- outputProjFileName: 'RunTestsInHelix-InteractionTests.proj'
- taefQuery: ${{ parameters.taefQuery }}
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish artifact: TestPayload-${{ parameters.testSuite}}'
+ inputs:
+ PathtoPublish: $(Build.SourcesDirectory)\HelixPayload
+ artifactName: TestPayload-${{ parameters.testSuite}}
- - template: MUX-CreateHelixProjFile-Steps.yml
- parameters:
- condition: and(succeeded(),ne('${{ parameters.testSuite }}','NugetTestSuite'))
- testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
- testFilePattern: 'MUXControlsTestApp.msix'
- outputProjFileName: 'RunTestsInHelix-ApiTests.proj'
- taefQuery: ${{ parameters.taefQuery }}
- - template: MUX-CreateHelixProjFile-Steps.yml
- parameters:
- condition: and(succeeded(),ne('${{ parameters.testSuite }}','NugetTestSuite'))
- testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
- testFilePattern: 'IXMPTestApp.msix'
- outputProjFileName: 'RunTestsInHelix-IXMPTestAppTests.proj'
- taefQuery: ${{ parameters.taefQuery }}
+ - ${{ if eq(parameters.testSuite, 'devtest') }}:
+ - template: MUX-CreateHelixProjFile-Steps.yml
+ parameters:
+ testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
+ testFilePattern: 'MUXControls.Test.dll'
+ outputProjFileName: 'RunTestsInHelix-InteractionTests.proj'
+ taefQuery: ${{ parameters.taefQuery }}
+ - template: MUX-CreateHelixProjFile-Steps.yml
+ parameters:
+ testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
+ testFilePattern: 'MUXControlsTestApp.msix'
+ outputProjFileName: 'RunTestsInHelix-ApiTests.proj'
+ taefQuery: ${{ parameters.taefQuery }}
+ - template: MUX-CreateHelixProjFile-Steps.yml
+ parameters:
+ testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
+ testFilePattern: 'IXMPTestApp.msix'
+ outputProjFileName: 'RunTestsInHelix-IXMPTestAppTests.proj'
+ taefQuery: ${{ parameters.taefQuery }}
- - template: MUX-CreateHelixProjFile-Steps.yml
- parameters:
- condition: and(succeeded(),eq('${{ parameters.testSuite }}','NugetTestSuite'))
- testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
- testFilePattern: 'MUXControls.ReleaseTest.dll'
- outputProjFileName: 'RunTestsInHelix-NugetTests.proj'
- taefQuery: ${{ parameters.taefQuery }}
+ - ${{ if in(parameters.testSuite, 'nupkg', 'fwpkg') }}:
+ - template: MUX-CreateHelixProjFile-Steps.yml
+ parameters:
+ testBinaryDirectoryPath: '$(Build.SourcesDirectory)\HelixPayload\$(buildConfiguration)\$(buildPlatform)'
+ testFilePattern: 'MUXControls.ReleaseTest.dll'
+ outputProjFileName: 'RunTestsInHelix-NugetTests.proj'
+ taefQuery: ${{ parameters.taefQuery }}
+ - task: CopyFiles@2
+ displayName: 'Copy helix work item proj files'
+ inputs:
+ SourceFolder: '$(Build.SourcesDirectory)\helixworkitems'
+ TargetFolder: '$(Build.ArtifactStagingDirectory)\$(buildPlatform)$(buildConfiguration)\'
+ Contents: '*.proj'
- task: PublishBuildArtifacts@1
displayName: 'Publish generated .proj files'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)
- artifactName: ${{ parameters.artifactName }}
-
- - task: DotNetCoreCLI@2
- displayName: 'Run tests in Helix (open queues)'
- condition: and(succeeded(),eq(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
- env:
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- inputs:
- command: custom
- projects: build\Helix\RunTestsInHelix.proj
- custom: msbuild
- arguments: '$(helixCommonArgs) /p:IsExternal=true /p:Creator=WinUI /p:HelixTargetQueues=$(openHelixTargetQueues)'
+ artifactName: TestWorkItems-${{ parameters.testSuite}}
- - task: DotNetCoreCLI@2
- displayName: 'Run tests in Helix (closed queues)'
- condition: and(succeeded(),ne(variables['System.CollectionUri'],'https://dev.azure.com/ms/'))
- env:
- SYSTEM_ACCESSTOKEN: $(System.AccessToken)
- HelixAccessToken: $(HelixApiAccessToken)
- inputs:
- command: custom
- projects: build\Helix\RunTestsInHelix.proj
- custom: msbuild
- arguments: '$(helixCommonArgs) /p:HelixTargetQueues=$(closedHelixTargetQueues)'
+- template: MUX-RunTestsOnPipeline-Job.yml
+ parameters:
+ runTestJobName: RunTestsRS5x86_${{ parameters.testSuite }}
+ dependsOn: CreateTestPayload_${{ parameters.testSuite }}
+ parallel: ${{ parameters.maxParallel }}
+ testSuite: ${{ parameters.testSuite }}
+ testOS: Win10-RS5
+ buildPlatform: x86
+ buildConfiguration: release
+
+- template: MUX-RunTestsOnPipeline-Job.yml
+ parameters:
+ runTestJobName: RunTests22H2x64_${{ parameters.testSuite }}
+ dependsOn: CreateTestPayload_${{ parameters.testSuite }}
+ parallel: ${{ parameters.maxParallel }}
+ testSuite: ${{ parameters.testSuite }}
+ testOS: Win10-22H2
+ buildPlatform: x64
+ buildConfiguration: release
\ No newline at end of file
diff --git a/build/AzurePipelinesTemplates/MUX-RunTestsOnPipeline-Job.yml b/build/AzurePipelinesTemplates/MUX-RunTestsOnPipeline-Job.yml
new file mode 100644
index 0000000000..8233a2d656
--- /dev/null
+++ b/build/AzurePipelinesTemplates/MUX-RunTestsOnPipeline-Job.yml
@@ -0,0 +1,127 @@
+parameters:
+ runTestJobName: RunTestsOnPipeline
+ dependsOn: ''
+ testSuite: DevTestSuite
+ rerunPassesRequiredToAvoidFailure: 5
+ testOS: Win10-22H2
+ buildPlatform: x86
+ buildConfiguration: release
+ parallel: 10
+
+jobs:
+
+- job: ${{ parameters.runTestJobName }}
+ dependsOn: ${{ parameters.dependsOn }}
+ condition: not(failed())
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-Test
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-Test
+ demands: ImageOverride -equals ${{ parameters.testOS }}
+
+ timeoutInMinutes: 90
+ strategy:
+ parallel: ${{ parameters.parallel }}
+
+ variables:
+ useBuildOutputFromBuildId: $(Build.BuildId)
+ winuiHelixVersion: 0.5.8
+ helixScriptPath: $(Build.SourcesDirectory)\build\Helix\packages\Microsoft.Internal.WinUI.Helix.$(winuiHelixVersion)\scripts\pipeline
+
+ testSuite: ${{ parameters.testSuite }}
+ testOS: ${{ parameters.testOS }}
+ buildPlatform: ${{ parameters.buildPlatform }}
+ buildConfiguration: ${{ parameters.buildConfiguration }}
+ buildFlavor: $(buildPlatform)$(buildConfiguration)
+
+ workItemsProjNameFilter: '*proj'
+ workItemsProjDir: $(Build.SourcesDirectory)\TestWorkItems-$(testSuite)\$(buildFlavor)
+ testPayloadDir: $(Build.SourcesDirectory)\TestPayload-$(testSuite)\$(buildConfiguration)\$(buildPlatform)
+ uploadRoot: c:\uploadroot
+ uploadRootInner: $(uploadRoot)\$(testOS)\$(buildFlavor)
+ testOutputArtifactName: TestOutput-$(testSuite)
+ testRunTitlePrefix: $(testSuite)-$(testOS)-$(buildFlavor)
+ testRunTitle: '$(testRunTitlePrefix)-$(System.JobPositionInPhase)'
+
+ steps:
+ - task: PowerShell@2
+ displayName: 'Display OS version info'
+ inputs:
+ targetType: 'inline'
+ script: |
+ Get-Item -Path 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion'
+
+ - script: set
+ displayName: 'Display current environment variables'
+
+ - template: MUX-InstallNuget-Steps.yml
+
+ - task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
+ displayName: 'NuGet restore build/Helix/packages.config'
+ inputs:
+ restoreSolution: build/Helix/packages.config
+ feedsToUse: config
+ nugetConfigPath: nuget.config
+ restoreDirectory: packages
+
+ - task: DownloadBuildArtifacts@0
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(System.TeamProjectId)
+ pipeline: $(System.DefinitionId)
+ buildId: $(useBuildOutputFromBuildId)
+ artifactName: TestWorkItems-$(testSuite)
+ downloadPath: $(Build.SourcesDirectory)
+
+ - task: DownloadBuildArtifacts@0
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(System.TeamProjectId)
+ pipeline: $(System.DefinitionId)
+ buildId: $(useBuildOutputFromBuildId)
+ artifactName: TestPayload-$(testSuite)
+ downloadPath: $(Build.SourcesDirectory)
+ itemPattern: '**/$(buildConfiguration)/$(buildPlatform)/**/*'
+
+ - task: powershell@2
+ displayName: Run Tests
+ timeoutInMinutes: 60
+ inputs:
+ targetType: filePath
+ filePath: $(helixScriptPath)\RunTestPassSliceOnBuildAgent.ps1
+ arguments: -WorkItemProjFileNameFilter $(workItemsProjNameFilter) -WorkItemProjDir $(workItemsProjDir) -TestPayloadDir $(testPayloadDir) -UploadRoot $(uploadRootInner) -JobPositionInPhase $(System.JobPositionInPhase) -TotalJobsInPhase $(System.TotalJobsInPhase) -RerunPassesRequiredToAvoidFailure ${{ parameters.rerunPassesRequiredToAvoidFailure }}
+ errorActionPreference: stop
+ workingDirectory: $(helixScriptPath)
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish TestOutput artifact'
+ condition: always()
+ inputs:
+ PathtoPublish: $(uploadRoot)
+ artifactName: $(testOutputArtifactName)
+
+ - task: PublishTestResults@2
+ condition: always()
+ inputs:
+ testResultsFormat: xUnit
+ testResultsFiles: testResults-*.xml
+ searchFolder: $(helixScriptPath)
+ mergeTestResults: true
+ failTaskOnFailedTests: true
+ testRunTitle: '$(testRunTitle)'
+ buildPlatform: $(buildPlatform)
+ buildConfiguration: $(buildConfiguration)
+
+ - task: powershell@2
+ displayName: 'UpdateUnreliableTests.ps1'
+ condition: always()
+ env:
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ inputs:
+ targetType: filePath
+ filePath: $(helixScriptPath)\UpdateUnreliableTests-Pipeline.ps1
+ arguments: -RerunPassesRequiredToAvoidFailure ${{ parameters.rerunPassesRequiredToAvoidFailure }} -TestRunTitle $(testRunTitle) -SubResultsDirPath $(uploadRootInner)
+
\ No newline at end of file
diff --git a/build/AzurePipelinesTemplates/MUX-WACKTests-Job.yml b/build/AzurePipelinesTemplates/MUX-WACKTests-Job.yml
index 82850cf877..890d6fecf2 100644
--- a/build/AzurePipelinesTemplates/MUX-WACKTests-Job.yml
+++ b/build/AzurePipelinesTemplates/MUX-WACKTests-Job.yml
@@ -18,8 +18,11 @@ parameters:
jobs:
- job: ${{ parameters.name }}
dependsOn: ${{ parameters.dependsOn }}
- pool:
- vmImage: windows-latest
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-S
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-S
strategy:
maxParallel: 10
matrix: ${{ parameters.matrix }}
diff --git a/build/CopyFilesToStagingDir.ps1 b/build/CopyFilesToStagingDir.ps1
index 94b9fd9cee..f6d521f157 100644
--- a/build/CopyFilesToStagingDir.ps1
+++ b/build/CopyFilesToStagingDir.ps1
@@ -52,6 +52,8 @@ PublishFile -IfExists $FullBuildOutput\Microsoft.Experimental.UI.Xaml\Generic.xa
# cx test app instead of releasetest.dll since these are architecture specific and the ReleaseTest assembly is AnyCPU.
PublishFile -IfExists $FullBuildOutput\NugetPackageTestAppCX\pgosweep.exe $FullPublishDir\Test\
PublishFile -IfExists $FullBuildOutput\NugetPackageTestAppCX\vcruntime140.dll $FullPublishDir\Test\
+PublishFile -IfExists $FullBuildOutput\NugetPackageTestAppCX\vc_redist.x64.exe $FullPublishDir\Test\
+PublishFile -IfExists $FullBuildOutput\NugetPackageTestAppCX\vc_redist.x86.exe $FullPublishDir\Test\
PublishFile -IfExists $FullBuildOutput\FrameworkPackage\*.* $FullPublishDir\FrameworkPackage
diff --git a/build/Helix/CopyPGOFiles.ps1 b/build/Helix/CopyPGOFiles.ps1
index 44e84dfda2..42c063d55f 100644
--- a/build/Helix/CopyPGOFiles.ps1
+++ b/build/Helix/CopyPGOFiles.ps1
@@ -10,7 +10,7 @@ foreach($pgcFile in $pgcFiles)
$flavorPath = $pgcFile.Name.Split('.')[0]
$archPath = $pgcFile.Name.Split('.')[1]
$fileName = $pgcFile.Name.Remove(0, $flavorPath.length + $archPath.length + 2)
- $fullPath = "$OutputFolder\PGO\$flavorPath\$archPath"
+ $fullPath = "$OutputFolder\PGO\$archPath"
$destination = "$fullPath\$fileName"
Write-Host "Copying $($pgcFile.Name) to $destination"
diff --git a/build/Helix/PrepareHelixPayload.ps1 b/build/Helix/PrepareHelixPayload.ps1
index 40a8587b20..f0c00b211b 100644
--- a/build/Helix/PrepareHelixPayload.ps1
+++ b/build/Helix/PrepareHelixPayload.ps1
@@ -95,6 +95,7 @@ Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\
# Copy files from the 'NugetPkgTestsDrop' or 'FrameworkPkgTestsDrop' artifact dir
Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\Test\MUXControls.ReleaseTest.dll" $payloadDir
Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\Test\pgosweep.exe" $payloadDir
+Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\Test\vc_redist.*.exe" $payloadDir
Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\Test\vcruntime140.dll" $payloadDir
Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\AppxPackages\NugetPackageTestApp_Test\*" $payloadDir
Copy-If-Exists "$repoDirectory\Artifacts\$ArtifactName\$Configuration\$Platform\AppxPackages\NugetPackageTestApp_Test\Dependencies\$Platform\*" $payloadDir
diff --git a/build/Helix/packages.config b/build/Helix/packages.config
index eed38069a4..8277f24345 100644
--- a/build/Helix/packages.config
+++ b/build/Helix/packages.config
@@ -4,5 +4,5 @@
-
+
diff --git a/build/Helix/scripts/TestPass-PreRun.ps1 b/build/Helix/scripts/TestPass-OneTimeMachineSetup.ps1
similarity index 95%
rename from build/Helix/scripts/TestPass-PreRun.ps1
rename to build/Helix/scripts/TestPass-OneTimeMachineSetup.ps1
index 0460eea050..9c1c513ee9 100644
--- a/build/Helix/scripts/TestPass-PreRun.ps1
+++ b/build/Helix/scripts/TestPass-OneTimeMachineSetup.ps1
@@ -6,6 +6,17 @@ if(!$Platform)
$Platform = "x86"
}
+Write-Host "Installing VC Redist"
+if(Test-Path ./vc_redist.x64.exe)
+{
+ & ./vc_redist.x64.exe /install /quiet /norestart
+}
+else
+{
+ Write-Host "Not found: vc_redist.x64.exe"
+}
+
+
function UninstallTestApps {
Param([string[]]$appsToUninstall)
diff --git a/build/MUX-CI.yml b/build/MUX-CI.yml
index 48cc44f192..477cfd47f2 100644
--- a/build/MUX-CI.yml
+++ b/build/MUX-CI.yml
@@ -2,84 +2,78 @@ name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
variables:
minimumExpectedTestsExecutedCount: 2000 # Sanity check for minimum expected tests to be reported
rerunPassesRequiredToAvoidFailure: 5
-jobs:
-- job: Build
- pool:
- ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
- name: WinDevPoolOSS-L
- ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
- name: WinDevPool-L
- demands: ImageOverride -equals WinDevVS17-latest
- timeoutInMinutes: 120
- strategy:
- maxParallel: 10
- matrix:
- Debug_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Debug'
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- PGOBuildMode: 'Optimize'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
- PGOBuildMode: 'Optimize'
- Release_Arm:
- buildPlatform: 'arm'
- buildConfiguration: 'Release'
- Release_Arm64:
- buildPlatform: 'arm64'
- buildConfiguration: 'Release'
- variables:
- appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
- buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
- publishDir : $(Build.ArtifactStagingDirectory)
- steps:
- - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
- - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
+stages:
+- stage: Build
+ jobs:
+ - job: Build
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-L
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-L
+ demands: ImageOverride -equals WinDevVS17-latest
+ timeoutInMinutes: 120
+ strategy:
+ maxParallel: 10
+ matrix:
+ Debug_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Debug'
+ Release_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Release'
+ PGOBuildMode: 'Optimize'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
+ PGOBuildMode: 'Optimize'
+ Release_Arm:
+ buildPlatform: 'arm'
+ buildConfiguration: 'Release'
+ Release_Arm64:
+ buildPlatform: 'arm64'
+ buildConfiguration: 'Release'
-- template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
- parameters:
- name: 'RunTestsInHelix'
- dependsOn: Build
- condition: in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
- testSuite: 'DevTestSuite'
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
+ variables:
+ appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
+ buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
+ publishDir : $(Build.ArtifactStagingDirectory)
+ steps:
+ - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
+ - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
-# Create Nuget Package
-- template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
- parameters:
- jobName: CreateNugetPackage
- dependsOn: Build
- prereleaseVersionTag: ci
+- stage: Test
+ dependsOn: Build
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
+ parameters:
+ name: 'RunTestsInHelix'
+ rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
-# Build solution that depends on nuget package
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- buildJobName: 'BuildNugetPkgTests'
- buildArtifactName: 'NugetPkgTestsDrop'
- runTestJobName: 'RunNugetPkgTestsInHelix'
- helixType: 'test/nuget'
- dependsOn: CreateNugetPackage
- useFrameworkPkg: false
+ # Create Nuget Package
+- stage: Pack
+ dependsOn: Build
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
+ parameters:
+ jobName: CreateNugetPackage
+ prereleaseVersionTag: ci
-# Framework package tests
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- buildJobName: 'BuildFrameworkPkgTests'
- buildArtifactName: 'FrameworkPkgTestsDrop'
- runTestJobName: 'RunFrameworkPkgTestsInHelix'
- helixType: 'test/frpkg'
- dependsOn: CreateNugetPackage
- useFrameworkPkg: true
+ # Build solution that depends on nuget package
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ buildJobName: 'BuildNugetPkgTests'
+ buildArtifactName: 'NugetPkgTestsDrop'
+ runTestJobName: 'RunNugetPkgTestsInHelix'
+ dependsOn: CreateNugetPackage
+ useFrameworkPkg: false
-- template: AzurePipelinesTemplates\MUX-ProcessTestResults-Job.yml
- parameters:
- dependsOn:
- - RunTestsInHelix
- - RunNugetPkgTestsInHelix
- - RunFrameworkPkgTestsInHelix
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
- minimumExpectedTestsExecutedCount: $(minimumExpectedTestsExecutedCount)
\ No newline at end of file
+ # Framework package tests
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ buildJobName: 'BuildFrameworkPkgTests'
+ buildArtifactName: 'FrameworkPkgTestsDrop'
+ runTestJobName: 'RunFrameworkPkgTestsInHelix'
+ dependsOn: CreateNugetPackage
+ useFrameworkPkg: true
\ No newline at end of file
diff --git a/build/MUX-PGOInstrument.yml b/build/MUX-PGOInstrument.yml
index 744515d290..0cbbd1084f 100644
--- a/build/MUX-PGOInstrument.yml
+++ b/build/MUX-PGOInstrument.yml
@@ -5,95 +5,86 @@ variables:
pgdFile: $(module).pgd
pgoArtifact: PGO
-jobs:
-- job: Build
- pool:
- name: WinDevPool-L
- demands: ImageOverride -equals WinDevVS17-latest
- timeoutInMinutes: 120
- strategy:
- maxParallel: 10
- matrix:
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
- variables:
- appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
- buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
- publishDir : $(Build.ArtifactStagingDirectory)
- PGOBuildMode: 'Instrument'
- steps:
- - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
- - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
- - task: CopyFiles@2
- inputs:
- sourceFolder: $(buildOutputDir)\$(buildConfiguration)\$(buildPlatform)\$(module)
- contents: $(pgdFile)
- targetFolder: $(Build.ArtifactStagingDirectory)\$(pgoArtifact)\$(buildPlatform)
- - task: PublishBuildArtifacts@1
- displayName: 'Publish pgd files'
- inputs:
- PathtoPublish: $(Build.ArtifactStagingDirectory)\$(pgoArtifact)
- artifactName: $(pgoArtifact)
+stages:
+- stage: Build
+ jobs:
+ - job: Build
+ pool:
+ name: WinDevPool-L
+ demands: ImageOverride -equals WinDevVS17-latest
+ timeoutInMinutes: 120
+ strategy:
+ maxParallel: 10
+ matrix:
+ Release_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Release'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
+ variables:
+ appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
+ buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
+ publishDir : $(Build.ArtifactStagingDirectory)
+ PGOBuildMode: 'Instrument'
+ steps:
+ - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
+ - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: $(buildOutputDir)\$(buildConfiguration)\$(buildPlatform)\$(module)
+ contents: $(pgdFile)
+ targetFolder: $(Build.ArtifactStagingDirectory)\$(pgoArtifact)\$(buildPlatform)
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish pgd files'
+ inputs:
+ PathtoPublish: $(Build.ArtifactStagingDirectory)\$(pgoArtifact)
+ artifactName: $(pgoArtifact)
-# Create Nuget Package
-- template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
- parameters:
- jobName: CreateNugetPackage
- dependsOn: Build
- prereleaseVersionTag: pgo
+- stage: Pack
+ dependsOn: Build
+ jobs:
+ # Create Nuget Package
+ - template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
+ parameters:
+ jobName: CreateNugetPackage
+ prereleaseVersionTag: pgo
-# Framework package tests
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- buildJobName: 'BuildFrameworkPkgTests'
- buildArtifactName: 'FrameworkPkgTestsDrop'
- runTestJobName: 'RunFrameworkPkgTestsInHelix'
- helixType: 'test/frpkg'
- dependsOn: CreateNugetPackage
- useFrameworkPkg: true
- matrix:
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
- test_matrix:
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- closedHelixTargetQueues: 'Windows.10.Amd64.Client21H1.xaml'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
- closedHelixTargetQueues: 'Windows.10.Amd64.Client21H1.xaml'
+- stage: Train
+ dependsOn: Pack
+ jobs:
+ # Framework package tests
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ buildJobName: 'BuildFrameworkPkgTests'
+ buildArtifactName: 'FrameworkPkgTestsDrop'
+ runTestJobName: 'RunFrameworkPkgTestsInHelix'
+ useFrameworkPkg: true
+ matrix:
+ Release_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Release'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
-- template: AzurePipelinesTemplates\MUX-ProcessTestResults-Job.yml
- parameters:
- dependsOn: RunFrameworkPkgTestsInHelix
- rerunPassesRequiredToAvoidFailure: 5
- minimumExpectedTestsExecutedCount: 10
- pgoArtifact: $(pgoArtifact)
+- stage: Merge
+ dependsOn: Train
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-MergePGD-Job.yml
+ parameters:
+ pgdFile: $(pgdFile)
+ pgoArtifact: $(pgoArtifact)
+ matrix:
+ Release_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Release'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
-- template: AzurePipelinesTemplates\MUX-MergePGD-Job.yml
- parameters:
- dependsOn: ProcessTestResults
- pgdFile: $(pgdFile)
- pgoArtifact: $(pgoArtifact)
- matrix:
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
-
-- template: AzurePipelinesTemplates\MUX-BuildAndPublishPGONuGet-Job.yml
- parameters:
- dependsOn: MergePGD
- pgdFile: $(pgdFile)
- pgoArtifact: $(pgoArtifact)
\ No newline at end of file
+ - template: AzurePipelinesTemplates\MUX-BuildAndPublishPGONuGet-Job.yml
+ parameters:
+ dependsOn: MergePGD
+ pgdFile: $(pgdFile)
+ pgoArtifact: $(pgoArtifact)
\ No newline at end of file
diff --git a/build/MUX-PR.yml b/build/MUX-PR.yml
index 8823449571..9f25c27f5e 100644
--- a/build/MUX-PR.yml
+++ b/build/MUX-PR.yml
@@ -2,94 +2,84 @@ name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
variables:
minimumExpectedTestsExecutedCount: 2000 # Sanity check for minimum expected tests to be reported
rerunPassesRequiredToAvoidFailure: 5
-jobs:
-- job: Setup
- pool:
- vmImage: 'windows-latest'
- steps:
- - task: powershell@2
- name: checkPayload
- displayName: 'Check if build is required for this PR'
- inputs:
- targetType: filePath
- filePath: build\ShouldSkipPRBuild.ps1
+ useBuildOutputFromBuildId: ''
-- job: Build
+stages:
+- stage: Setup
+ jobs:
+ - job: Setup
+ pool:
+ vmImage: 'windows-latest'
+ steps:
+ - task: powershell@2
+ name: checkPayload
+ displayName: 'Check if build is required for this PR'
+ inputs:
+ targetType: filePath
+ filePath: build\ShouldSkipPRBuild.ps1
+
+- stage: Build
dependsOn: Setup
condition: |
- and
- (
- eq(variables['useBuildOutputFromBuildId'],''),
- ne(dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'],'True')
- )
- pool:
- ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
- name: WinDevPoolOSS-L
- ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
- name: WinDevPool-L
- demands: ImageOverride -equals WinDevVS17-latest
- timeoutInMinutes: 120
- strategy:
- maxParallel: 10
- matrix:
- Debug_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Debug'
- Release_x86:
- buildPlatform: 'x86'
- buildConfiguration: 'Release'
- PGOBuildMode: 'Optimize'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
- PGOBuildMode: 'Optimize'
- variables:
- appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
- buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
- publishDir : $(Build.ArtifactStagingDirectory)
- steps:
- - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
- - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
+ ne(stageDependencies.Setup.Setup.outputs['checkPayload.shouldSkipPRBuild'],'True')
+ jobs:
+ - job: Build
+ condition: eq(variables['useBuildOutputFromBuildId'],'')
+ pool:
+ ${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPoolOSS-L
+ ${{ if ne(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
+ name: WinDevPool-L
+ demands: ImageOverride -equals WinDevVS17-latest
+ timeoutInMinutes: 120
+ strategy:
+ maxParallel: 10
+ matrix:
+ Debug_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Debug'
+ Release_x86:
+ buildPlatform: 'x86'
+ buildConfiguration: 'Release'
+ PGOBuildMode: 'Optimize'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
+ PGOBuildMode: 'Optimize'
+ variables:
+ appxPackageDir : $(build.artifactStagingDirectory)\$(buildConfiguration)\$(buildPlatform)\AppxPackages
+ buildOutputDir : $(Build.SourcesDirectory)\BuildOutput
+ publishDir : $(Build.ArtifactStagingDirectory)
+ steps:
+ - template: AzurePipelinesTemplates\MUX-BuildDevProject-Steps.yml
+ - template: AzurePipelinesTemplates\MUX-PublishProjectOutput-Steps.yml
-- template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
- parameters:
- name: 'RunTestsInHelix'
- dependsOn:
- - Setup
- - Build
- condition: |
- and
- (
- ne(dependencies.Setup.outputs['checkPayload.shouldSkipPRBuild'],'True'),
- in(dependencies.Build.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
- )
- testSuite: 'DevTestSuite'
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
+- stage: Test
+ dependsOn: Build
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
+ parameters:
+ rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
# Create Nuget Package
-- template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
- parameters:
- jobName: CreateNugetPackage
- dependsOn: Build
- primaryBuildArch: x64
- prereleaseVersionTag: pr
-
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- dependsOn: CreateNugetPackage
- useFrameworkPkg: false
- runTests: 'false'
- matrix:
- Debug_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Debug'
- Release_x64:
- buildPlatform: 'x64'
- buildConfiguration: 'Release'
+- stage: Pack
+ dependsOn: Build
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-CreateNugetPackage-Job.yml
+ parameters:
+ jobName: CreateNugetPackage
+ primaryBuildArch: x64
+ prereleaseVersionTag: pr
-- template: AzurePipelinesTemplates\MUX-ProcessTestResults-Job.yml
- parameters:
- dependsOn: RunTestsInHelix
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
- minimumExpectedTestsExecutedCount: $(minimumExpectedTestsExecutedCount)
- checkJobAttempt: true
\ No newline at end of file
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ dependsOn: CreateNugetPackage
+ useFrameworkPkg: false
+ runTests: 'false'
+ matrix:
+ Debug_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Debug'
+ Release_x64:
+ buildPlatform: 'x64'
+ buildConfiguration: 'Release'
\ No newline at end of file
diff --git a/build/WinUI-Official-Validation.yml b/build/WinUI-Official-Validation.yml
index 8ad4040778..9562af490d 100644
--- a/build/WinUI-Official-Validation.yml
+++ b/build/WinUI-Official-Validation.yml
@@ -16,145 +16,138 @@ resources:
- main
- user/kmahone/ob
-jobs:
-
-# This job gets the build from the WinUI-OB-Official pipeline
-# The following jobs validate the build by running tests.
-- job: GetBuild
- pool:
- name: WinDevPool-L
- demands: ImageOverride -equals WinDevVS17-latest
- timeoutInMinutes: 120
-
- variables:
- buildIdToTest: $(resources.pipeline.WinUI-OB-Official.runID)
- buildPipelineDefinition: 98255 # This is WinUI-OB-Official
-
- steps:
-
- - powershell: |
- cmd.exe /c set
- displayName: 'display env vars'
- continueOnError: true
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifactName: drop_build_main_x64_Release
- targetPath: $(Build.SourcesDirectory)\Artifacts\drop
- buildType: specific
- project: $(System.TeamProjectId)
- definition: $(buildPipelineDefinition)
- buildVersionToDownload: specific
- pipelineId : $(buildIdToTest)
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifactName: drop_build_main_x86_Release
- targetPath: $(Build.SourcesDirectory)\Artifacts\drop
- buildType: specific
- project: $(System.TeamProjectId)
- definition: $(buildPipelineDefinition)
- buildVersionToDownload: specific
- pipelineId : $(buildIdToTest)
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifactName: drop_build_main_arm_Release
- targetPath: $(Build.SourcesDirectory)\Artifacts\drop
- buildType: specific
- project: $(System.TeamProjectId)
- definition: $(buildPipelineDefinition)
- buildVersionToDownload: specific
- pipelineId : $(buildIdToTest)
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifactName: drop_build_main_arm64_Release
- targetPath: $(Build.SourcesDirectory)\Artifacts\drop
- buildType: specific
- project: $(System.TeamProjectId)
- definition: $(buildPipelineDefinition)
- buildVersionToDownload: specific
- pipelineId : $(buildIdToTest)
-
- - task: DownloadPipelineArtifact@2
- inputs:
- artifactName: drop_pack_nupkg
- targetPath: $(Build.SourcesDirectory)\Artifacts\drop
- buildType: specific
- project: $(System.TeamProjectId)
- definition: $(buildPipelineDefinition)
- buildVersionToDownload: specific
- pipelineId : $(buildIdToTest)
-
- - task: PublishBuildArtifacts@1
- displayName: 'Publish artifact: drop'
- inputs:
- PathtoPublish: $(Build.SourcesDirectory)\Artifacts\drop
- artifactName: drop
-
- # We can't publish to the public Symbol Server from the main OneBranch build, so we do it here instead.
- - task: PublishSymbols@2 # Publish symbols to public Microsoft Symbol Server
- displayName: 'Publish symbols (public)'
- continueOnError: true
- inputs:
- SymbolsFolder: $(Build.SourcesDirectory)\Artifacts\drop
- SearchPattern: '**/Microsoft.UI.Xaml.pdb'
- SymbolServerType: 'TeamServices'
- IndexSources: false
- env:
- ArtifactServices_Symbol_AccountName: microsoftpublicsymbols
- ArtifactServices_Symbol_PAT: $(WinUILab-Pipeline-PAT)
-
-
-- template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
- parameters:
- name: 'RunTestsInHelix'
- dependsOn: GetBuild
- testSuite: 'DevTestSuite'
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
-
-# Build solution that depends on nuget package
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- buildJobName: 'BuildNugetPkgTests'
- buildArtifactName: 'NugetPkgTestsDrop'
- runTestJobName: 'RunNugetPkgTestsInHelix'
- helixType: 'test/nuget'
- dependsOn: GetBuild
- useFrameworkPkg: false
-
-# Framework package tests
-- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
- parameters:
- buildJobName: 'BuildFrameworkPkgTests'
- buildArtifactName: 'FrameworkPkgTestsDrop'
- runTestJobName: 'RunFrameworkPkgTestsInHelix'
- helixType: 'test/frpkg'
- dependsOn: GetBuild
- useFrameworkPkg: true
-
-- template: AzurePipelinesTemplates\MUX-ProcessTestResults-Job.yml
- parameters:
- dependsOn:
- - RunTestsInHelix
- - RunNugetPkgTestsInHelix
- - RunFrameworkPkgTestsInHelix
- rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
- minimumExpectedTestsExecutedCount: $(minimumExpectedTestsExecutedCount)
-
-# NuGet package WACK tests
-- template: AzurePipelinesTemplates\MUX-WACKTests-Job.yml
- parameters:
- name: 'NugetPkgWACKTests'
- dependsOn: BuildNugetPkgTests
- artifactName: 'NugetPkgTestsDrop'
-
-# Framework package WACK tests
-- template: AzurePipelinesTemplates\MUX-WACKTests-Job.yml
- parameters:
- name: 'FrameworkPkgWACKTests'
- dependsOn: BuildFrameworkPkgTests
- artifactName: 'FrameworkPkgTestsDrop'
+stages:
+- stage: Build
+ jobs:
+
+
+ # This job gets the build from the WinUI-OB-Official pipeline
+ # The following jobs validate the build by running tests.
+ - job: GetBuild
+ pool:
+ name: WinDevPool-L
+ demands: ImageOverride -equals WinDevVS17-latest
+ timeoutInMinutes: 120
+
+ variables:
+ buildIdToTest: $(resources.pipeline.WinUI-OB-Official.runID)
+ buildPipelineDefinition: 98255 # This is WinUI-OB-Official
+
+ steps:
+
+ - powershell: |
+ cmd.exe /c set
+ displayName: 'display env vars'
+ continueOnError: true
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: drop_build_main_x64_Release
+ targetPath: $(Build.SourcesDirectory)\Artifacts\drop
+ buildType: specific
+ project: $(System.TeamProjectId)
+ definition: $(buildPipelineDefinition)
+ buildVersionToDownload: specific
+ pipelineId : $(buildIdToTest)
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: drop_build_main_x86_Release
+ targetPath: $(Build.SourcesDirectory)\Artifacts\drop
+ buildType: specific
+ project: $(System.TeamProjectId)
+ definition: $(buildPipelineDefinition)
+ buildVersionToDownload: specific
+ pipelineId : $(buildIdToTest)
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: drop_build_main_arm_Release
+ targetPath: $(Build.SourcesDirectory)\Artifacts\drop
+ buildType: specific
+ project: $(System.TeamProjectId)
+ definition: $(buildPipelineDefinition)
+ buildVersionToDownload: specific
+ pipelineId : $(buildIdToTest)
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: drop_build_main_arm64_Release
+ targetPath: $(Build.SourcesDirectory)\Artifacts\drop
+ buildType: specific
+ project: $(System.TeamProjectId)
+ definition: $(buildPipelineDefinition)
+ buildVersionToDownload: specific
+ pipelineId : $(buildIdToTest)
+
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ artifactName: drop_pack_nupkg
+ targetPath: $(Build.SourcesDirectory)\Artifacts\drop
+ buildType: specific
+ project: $(System.TeamProjectId)
+ definition: $(buildPipelineDefinition)
+ buildVersionToDownload: specific
+ pipelineId : $(buildIdToTest)
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish artifact: drop'
+ inputs:
+ PathtoPublish: $(Build.SourcesDirectory)\Artifacts\drop
+ artifactName: drop
+
+ # We can't publish to the public Symbol Server from the main OneBranch build, so we do it here instead.
+ - task: PublishSymbols@2 # Publish symbols to public Microsoft Symbol Server
+ displayName: 'Publish symbols (public)'
+ continueOnError: true
+ inputs:
+ SymbolsFolder: $(Build.SourcesDirectory)\Artifacts\drop
+ SearchPattern: '**/Microsoft.UI.Xaml.pdb'
+ SymbolServerType: 'TeamServices'
+ IndexSources: false
+ env:
+ ArtifactServices_Symbol_AccountName: microsoftpublicsymbols
+ ArtifactServices_Symbol_PAT: $(WinUILab-Pipeline-PAT)
+
+- stage: Test
+ dependsOn: Build
+ jobs:
+ - template: AzurePipelinesTemplates\MUX-RunHelixTests-Job.yml
+ parameters:
+ name: 'RunTestsInHelix'
+ rerunPassesRequiredToAvoidFailure: $(rerunPassesRequiredToAvoidFailure)
+
+- stage: TestNupkg
+ dependsOn: Build
+ jobs:
+ # Build solution that depends on nuget package
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ buildJobName: 'BuildNugetPkgTests'
+ buildArtifactName: 'NugetPkgTestsDrop'
+ runTestJobName: 'RunNugetPkgTestsInHelix'
+ useFrameworkPkg: false
+
+ # Framework package tests
+ - template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
+ parameters:
+ buildJobName: 'BuildFrameworkPkgTests'
+ buildArtifactName: 'FrameworkPkgTestsDrop'
+ runTestJobName: 'RunFrameworkPkgTestsInHelix'
+ useFrameworkPkg: true
+
+ # NuGet package WACK tests
+ - template: AzurePipelinesTemplates\MUX-WACKTests-Job.yml
+ parameters:
+ name: 'NugetPkgWACKTests'
+ dependsOn: BuildNugetPkgTests
+ artifactName: 'NugetPkgTestsDrop'
+
+ # Framework package WACK tests
+ - template: AzurePipelinesTemplates\MUX-WACKTests-Job.yml
+ parameters:
+ name: 'FrameworkPkgWACKTests'
+ dependsOn: BuildFrameworkPkgTests
+ artifactName: 'FrameworkPkgTestsDrop'
diff --git a/environment.props b/environment.props
index 16dab7ea0c..8fab06092a 100644
--- a/environment.props
+++ b/environment.props
@@ -31,6 +31,9 @@
%(PreprocessorDefinitions);MUX_PRERELEASE
+
+ $(DefineConstants);MUX_PRERELEASE
+
%(PreprocessorDefinitions);USE_INSIDER_SDK
diff --git a/test/IXMPTestApp/Tests/MetadataProviderTests.cs b/test/IXMPTestApp/Tests/MetadataProviderTests.cs
index 506c2d7bb5..b5fcc09e93 100644
--- a/test/IXMPTestApp/Tests/MetadataProviderTests.cs
+++ b/test/IXMPTestApp/Tests/MetadataProviderTests.cs
@@ -21,11 +21,12 @@ namespace IXMPTestApp.Tests
public class MetadataProviderTests
{
-#if MUX_PRERELEASE
+
[TestMethod]
-#endif
+
public void CanLoadXamlFragments()
{
+#if MUX_PRERELEASE
var dispatcher = CoreApplication.MainView.Dispatcher;
dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
{
@@ -173,6 +174,8 @@ public void CanLoadXamlFragments()
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'/>");
}).AsTask().Wait();
+
+#endif
}
}
}