From e2810a140e2ecd665f08b1ee4f53b77c8697e8d8 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Wed, 22 Jan 2025 06:13:23 +0100 Subject: [PATCH 1/3] Enable MTP --- Directory.Build.props | 4 ++++ Directory.Packages.props | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 02a848c87e48..30be3ab7cd97 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -17,6 +17,10 @@ direct false $(Platform) + + + true + true diff --git a/Directory.Packages.props b/Directory.Packages.props index c04a97ec804f..88e114d7e087 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -56,7 +56,7 @@ - + From a39de35bcb6cbc22b65f55663599aeb980363fd6 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Wed, 22 Jan 2025 06:47:56 +0100 Subject: [PATCH 2/3] Infra --- .pipelines/v2/templates/job-build-project.yml | 16 +++--------- .pipelines/v2/templates/job-test-project.yml | 3 --- Directory.Build.props | 26 ------------------- 3 files changed, 4 insertions(+), 41 deletions(-) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index f55d9f71a9fc..07a784ec31dd 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -106,10 +106,6 @@ jobs: JobOutputArtifactName: build-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }} NUGET_RESTORE_MSBUILD_ARGS: /p:Platform=$(BuildPlatform) # Required for nuget to work due to self contained NODE_OPTIONS: --max_old_space_size=16384 - ${{ if eq(parameters.runTests, true) }}: - MSBuildMainBuildTargets: Build;Test - ${{ else }}: - MSBuildMainBuildTargets: Build ${{ insert }}: ${{ parameters.variables }} ${{ if eq(parameters.useLatestWinAppSDK, true) }}: RestoreAdditionalProjectSourcesArg: '/p:RestoreAdditionalProjectSources="$(Build.SourcesDirectory)\localpackages\NugetPackages"' @@ -157,10 +153,6 @@ jobs: sdk: true version: '9.0' - - ${{ if eq(parameters.runTests, true) }}: - - task: VisualStudioTestPlatformInstaller@1 - displayName: Ensure VSTest Platform - - pwsh: |- & '.pipelines/applyXamlStyling.ps1' -Passive displayName: Verify XAML formatting @@ -218,9 +210,6 @@ jobs: - ${{ parameters.beforeBuildSteps }} - task: VSBuild@1 - ${{ if eq(parameters.runTests, true) }}: - displayName: Build and Test PowerToys main project - ${{ else }}: displayName: Build PowerToys main project inputs: solution: 'PowerToys.sln' @@ -232,7 +221,6 @@ jobs: /bl:$(LogOutputDirectory)\build-0-main.binlog ${{ parameters.additionalBuildOptions }} $(MSBuildCacheParameters) - /t:$(MSBuildMainBuildTargets) $(RestoreAdditionalProjectSourcesArg) platform: $(BuildPlatform) configuration: $(BuildConfiguration) @@ -242,6 +230,10 @@ jobs: env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) + - pwsh: | + dotnet test PowerToys.sln --no-build -- --report-trx + displayName: Test PowerToys main project + - task: VSBuild@1 displayName: Build BugReportTool inputs: diff --git a/.pipelines/v2/templates/job-test-project.yml b/.pipelines/v2/templates/job-test-project.yml index 0bf4641e429f..836ecda5e6a1 100644 --- a/.pipelines/v2/templates/job-test-project.yml +++ b/.pipelines/v2/templates/job-test-project.yml @@ -73,9 +73,6 @@ jobs: sdk: true version: '9.0' - - task: VisualStudioTestPlatformInstaller@1 - displayName: Ensure VSTest Platform - - pwsh: |- & '$(build.sourcesdirectory)\.pipelines\InstallWinAppDriver.ps1' displayName: Download and install WinAppDriver diff --git a/Directory.Build.props b/Directory.Build.props index 30be3ab7cd97..a44cbf0fc549 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -49,32 +49,6 @@ - - - - - - - - trx - - $(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow - - false - - From 3f6418611072137fe3f0d47583fb4e375876f911 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Wed, 22 Jan 2025 10:01:38 +0100 Subject: [PATCH 3/3] Revert some changes --- .pipelines/v2/templates/job-build-project.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index 07a784ec31dd..f55d9f71a9fc 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -106,6 +106,10 @@ jobs: JobOutputArtifactName: build-$(BuildPlatform)-$(BuildConfiguration)${{ parameters.artifactStem }} NUGET_RESTORE_MSBUILD_ARGS: /p:Platform=$(BuildPlatform) # Required for nuget to work due to self contained NODE_OPTIONS: --max_old_space_size=16384 + ${{ if eq(parameters.runTests, true) }}: + MSBuildMainBuildTargets: Build;Test + ${{ else }}: + MSBuildMainBuildTargets: Build ${{ insert }}: ${{ parameters.variables }} ${{ if eq(parameters.useLatestWinAppSDK, true) }}: RestoreAdditionalProjectSourcesArg: '/p:RestoreAdditionalProjectSources="$(Build.SourcesDirectory)\localpackages\NugetPackages"' @@ -153,6 +157,10 @@ jobs: sdk: true version: '9.0' + - ${{ if eq(parameters.runTests, true) }}: + - task: VisualStudioTestPlatformInstaller@1 + displayName: Ensure VSTest Platform + - pwsh: |- & '.pipelines/applyXamlStyling.ps1' -Passive displayName: Verify XAML formatting @@ -210,6 +218,9 @@ jobs: - ${{ parameters.beforeBuildSteps }} - task: VSBuild@1 + ${{ if eq(parameters.runTests, true) }}: + displayName: Build and Test PowerToys main project + ${{ else }}: displayName: Build PowerToys main project inputs: solution: 'PowerToys.sln' @@ -221,6 +232,7 @@ jobs: /bl:$(LogOutputDirectory)\build-0-main.binlog ${{ parameters.additionalBuildOptions }} $(MSBuildCacheParameters) + /t:$(MSBuildMainBuildTargets) $(RestoreAdditionalProjectSourcesArg) platform: $(BuildPlatform) configuration: $(BuildConfiguration) @@ -230,10 +242,6 @@ jobs: env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - pwsh: | - dotnet test PowerToys.sln --no-build -- --report-trx - displayName: Test PowerToys main project - - task: VSBuild@1 displayName: Build BugReportTool inputs: