Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable MTP #37001

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Infra
  • Loading branch information
Youssef1313 committed Jan 28, 2025
commit 943e38b08b3c8b871a35440ff26cdc398516a0e5
16 changes: 4 additions & 12 deletions .pipelines/v2/templates/job-build-project.yml
Original file line number Diff line number Diff line change
@@ -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
@@ -211,9 +203,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'
@@ -225,7 +214,6 @@ jobs:
/bl:$(LogOutputDirectory)\build-0-main.binlog
${{ parameters.additionalBuildOptions }}
$(MSBuildCacheParameters)
/t:$(MSBuildMainBuildTargets)
$(RestoreAdditionalProjectSourcesArg)
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
@@ -235,6 +223,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:
3 changes: 0 additions & 3 deletions .pipelines/v2/templates/job-test-project.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 0 additions & 26 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -49,32 +49,6 @@
</PackageReference>
</ItemGroup>

<!-- Add ability to run tests via "msbuild /t:Test" -->
<!--
Workaround an MSBuild bug where Microsoft.Common.Test.targets is missing from the Arm64 installation.
See: https://github.com/dotnet/msbuild/pull/9984
NB 1: This means that using "/t:Test" is not supported for Arm64 builds and tests will need to be run in an alternate way,
eg running tests in VS or invoking vstest.console directly.
NB 2: <Sdk> elements do not support conditions, so this is also being worked around.
Once the change referenced above is fixed, the ImportGroup below can be replaced with:
<Sdk Name="Microsoft.Build.RunVSTest" Version="1.0.319" />
-->
<ImportGroup Condition="'$(PROCESSOR_ARCHITECTURE)' != 'ARM64'">
<Import Project="Sdk.props" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
<Import Project="Sdk.targets" Sdk="Microsoft.Build.RunVSTest" Version="1.0.319" />
</ImportGroup>
<PropertyGroup>
<VSTestLogger>trx</VSTestLogger>
<!--
RunVSTest by default uses %VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe,
but some of the CI scenarios don't define %VSINSTALLDIR%, so be explicit about where to look for vstest.
Note: $(VsInstallRoot) is a built-in MSBuild property, so should always be defined.
-->
<VSTestToolPath>$(VsInstallRoot)\Common7\IDE\CommonExtensions\Microsoft\TestWindow</VSTestToolPath>
<!-- No arm64 agents to run the tests. -->
<RunVSTest Condition="'$(Platform)' == 'ARM64'">false</RunVSTest>
</PropertyGroup>

<!-- MSBuildCache -->
<PropertyGroup>
<!-- Off by default -->