mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
* Upgraded projects to target .NET 8 * Updated .NET runtime package targets to use latest .NET 8 build * Updated PowerToys Interop to target .NET 8 * Switch to use ArgumentNullException.ThrowIfNull * ArgumentNullException.ThrowIfNull for CropAndLockViewModel * Switching to ObjectDisposedException.ThrowIf * Upgrade System.ComponentModel.Composition to 8.0 * ArgumentNullException.ThrowIfNull in Helper * Switch to StartsWith using StringComparison.Ordinal * Disabled CA1859, CA1716, SYSLIB1096 analyzers * Update RIDs to reflect breaking changes in .NET 8 * Updated Microsoft NuGet packages to RC1 * Updated Analyzer package to latest .NET 8 preview package * CA1854: Use TryGetValue instead of ContainsKey * [Build] Update TFM to .NET 8 for publish profiles * [Analyzers] Remove CA1309, CA1860-CA1865, CA1869, CA2208 from warning. * [Analyzers] Fix for C26495 * [Analyzers] Disable CS1615, CS9191 * [CI] Target .NET 8 in YAML * [CI] Add .NET preview version flag temporarily. * [FileLocksmith] Update TFM to .NET 8 * [CI] Switch to preview agent * [CI] Update NOTICE.md * [CI] Update Release to target .NET 8 and use Preview agent * [Analyzers] Disable CA1854 * Fix typo * Updated Microsoft.CodeAnalysis.NetAnalyzers to latest preview Updated packages to rc2 * [Analyzers][CPP] Turn off warning for 5271 * [Analyzers][CPP] Turn off warning for 26493 * [KeyboardListener] Add mutex include to resolve error * [PT Run][Folder] Use static SearchValues to resolve CA1870 * [PowerLauncher] Fix TryGetValue * [MouseJumpSettings] Use ArgumentNullException.ThrowIfNull * [Build] Disable parallel dotnet tool restore * [Build] No cache of dotnet tool packages * [Build] Temporarily move .NET 8 SDK task before XAML formatting * [Build][Temp] Try using .NET 7 prior to XAML formatting and then switch to .NET 8 after * [Build] Use .NET 6 for XAML Styler * [CI] Updated NOTICE.md * [FancyZones] Update TFM to .NET 8 * [EnvVar] Update TFM to .NET 8 and update RID * [EnvVar] Use ArgumentNullException.ThrowIfNull * [Dev] Updated packages to .NET 8 RTM version * [Dev] Updated Microsoft.CodeAnalysis.NetAnalyzers to latest * [CI] Updated NOTICE.md with latest package versions * Fix new utility target fameworks and runtimeids * Don't use preview images anymore * [CI] Add script to update VCToolsVersion environment variable * [CI] Add Step to Verify VCToolsVersion * [CI] Use latest flag for vswhere to set proper VCToolsVersion * Add VCToolsVersion checking to release.yml * Remove net publishing from local/ PR CI builds * Revert "Remove net publishing from local/ PR CI builds" This reverts commitf469778996. * Only publish necessary projects * Add verbosity to release pipelines builds of PowerTOys * Set VCToolsVersion for publish.cmd when called from installer * [Installer] Moved project publish logic to MSBuild Task * [CI] Revert using publish.cmd * [CI] Set VCToolsVersion and unset ClearDevCommandPromptEnvVars property * Installer publishes for x64 too * Revert "Add verbosity to release pipelines builds of PowerTOys" This reverts commit654d4a7f78. * [Dev] Update CodeAnalysis library to non-preview package * Remove unneeded warning removal * Fix Notice.md * Rename VCToolsVersion file and task name * Remove unneeded mutex header include --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
271 lines
9.0 KiB
YAML
271 lines
9.0 KiB
YAML
parameters:
|
|
additionalBuildArguments: ''
|
|
|
|
steps:
|
|
- checkout: self
|
|
fetchDepth: 1
|
|
submodules: true
|
|
clean: true
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 6 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
version: '6.x'
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify XAML formatting
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\applyXamlStyling.ps1'
|
|
arguments: -Passive
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Nuget package versions for PowerToys.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNugetPackages.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for PowerToys.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for BugReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for WebcamReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for StylesReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for PowerToysSetup.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify and set latest VCToolsVersion usage
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
|
|
pwsh: true
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 8 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
version: '8.x'
|
|
includePreviewVersions: true
|
|
|
|
- task: VisualStudioTestPlatformInstaller@1
|
|
displayName: Ensure VSTest Platform
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys.sln'
|
|
inputs:
|
|
solution: '**\PowerToys.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }}
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build BugReportTool.sln'
|
|
inputs:
|
|
solution: '**\BugReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }}
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build WebcamReportTool.sln'
|
|
inputs:
|
|
solution: '**\WebcamReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }}
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build StylesReportTool.sln'
|
|
inputs:
|
|
solution: '**\StylesReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }}
|
|
maximumCpuCount: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Download and install WiX 3.14 development build
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\installWiX.ps1'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-machine MSI'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysInstaller -restore ${{ parameters.additionalBuildArguments }}
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-machine Bootstrapper'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysBootstrapper ${{ parameters.additionalBuildArguments }}
|
|
clean: false
|
|
maximumCpuCount: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Clean installer dir before building per-user installer
|
|
inputs:
|
|
targetType: inline
|
|
script: git clean -xfd -e *exe -- .\installer\
|
|
pwsh: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-user MSI'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysInstaller -restore ${{ parameters.additionalBuildArguments }} /p:PerUser=true
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-user Bootstrapper'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysBootstrapper ${{ parameters.additionalBuildArguments }} /p:PerUser=true
|
|
clean: false
|
|
maximumCpuCount: true
|
|
|
|
# Check if deps.json files don't reference different dll versions.
|
|
- task: PowerShell@2
|
|
displayName: Audit deps.json files for all applications
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyDepsJsonLibraryVersions.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
pwsh: true
|
|
|
|
# Check if asset files on the main application paths are playing nice and avoiding basic conflicts.
|
|
- task: PowerShell@2
|
|
displayName: Audit base applications path asset conflicts
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyPossibleAssetConflicts.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Audit WinAppSDK applications path asset conflicts
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyPossibleAssetConflicts.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)\WinUI3Apps'
|
|
pwsh: true
|
|
|
|
# directly not doing WinAppDriver testing
|
|
- task: VSTest@2
|
|
displayName: 'MS Tests'
|
|
condition: ne(variables['BuildPlatform'], 'arm64') # No arm64 agents to run the tests.
|
|
inputs:
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
testSelector: 'testAssemblies'
|
|
testAssemblyVer2: |
|
|
**\UnitTests-GcodeThumbnailProvider.dll
|
|
**\UnitTests-StlThumbnailProvider.dll
|
|
**\UnitTests-PdfThumbnailProvider.dll
|
|
**\UnitTests-QoiThumbnailProvider.dll
|
|
**\Settings.UI.UnitTests.dll
|
|
**\UnitTests-GcodePreviewHandler.dll
|
|
**\UnitTests-QoiPreviewHandler.dll
|
|
**\UnitTests-FancyZonesEditor.dll
|
|
**\UnitTests-PdfPreviewHandler.dll
|
|
**\UnitTests-PreviewHandlerCommon.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.Registry.UnitTests.dll
|
|
**\UnitTest-ColorPickerUI.dll
|
|
**\Microsoft.Interop.Tests.dll
|
|
**\ImageResizer.Test.dll
|
|
**\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest.dll
|
|
**\Community.PowerToys.Run.Plugin.ValueGenerator.UnitTests.dll
|
|
**\Microsoft.Plugin.Folder.UnitTests.dll
|
|
**\Microsoft.Plugin.Program.UnitTests.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest.dll
|
|
**\Microsoft.Plugin.Uri.UnitTests.dll
|
|
**\Wox.Test.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.System.UnitTests.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests.dll
|
|
**\Microsoft.Plugin.WindowsTerminal.UnitTests.dll
|
|
**\Microsoft.Plugin.WindowWalker.UnitTests.dll
|
|
**\PreviewPaneUnitTests.dll
|
|
**\UnitTests-SvgThumbnailProvider.dll
|
|
**\UnitTests-SvgPreviewHandler.dll
|
|
**\PowerToys.Hosts.Tests.dll
|
|
**\MouseJumpUI.UnitTests.dll
|
|
!**\obj\**
|
|
!**\ref\**
|
|
|
|
# Native dlls
|
|
- task: VSTest@2
|
|
condition: ne(variables['BuildPlatform'],'arm64') # No arm64 agents to run the tests.
|
|
displayName: 'Native Tests'
|
|
inputs:
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
testSelector: 'testAssemblies'
|
|
testAssemblyVer2: |
|
|
**\KeyboardManagerEngineTest.dll
|
|
**\KeyboardManagerEditorTest.dll
|
|
**\UnitTests-CommonLib.dll
|
|
**\PowerRenameUnitTests.dll
|
|
**\powerpreviewTest.dll
|
|
**\UnitTests-FancyZones.dll
|
|
!**\obj\**
|
|
|
|
- task: PowerShell@2
|
|
displayName: Trigger dotnet welcome message so that it does not cause errors on other scripts
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
dotnet list $(build.sourcesdirectory)\src\common\Common.UI\Common.UI.csproj package
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Notice.md and Nuget packages match
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNoticeMdAgainstNugetPackages.ps1'
|
|
arguments: -path '$(build.sourcesdirectory)\'
|
|
pwsh: true
|