diff --git a/.pipelines/v2/release.yml b/.pipelines/v2/release.yml index b4a6a80833..6141a40b2d 100644 --- a/.pipelines/v2/release.yml +++ b/.pipelines/v2/release.yml @@ -85,22 +85,3 @@ extends: .pipelines/versionSetting.ps1 -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment '' displayName: Prepare versioning - # Prepare the localizations and telemetry config before the release build - - template: .pipelines/v2/templates/steps-fetch-and-prepare-localizations.yml@self - - - script: | - call nuget.exe restore -configFile .pipelines/release-nuget.config -PackagesDirectory . .pipelines/packages.config || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" || exit /b 1 - move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1 - displayName: Emplace telemetry files - - - stage: Publish - displayName: Publish - dependsOn: [Build] - jobs: - - template: .pipelines/v2/templates/job-publish-symbols-using-symbolrequestprod-api.yml@self - parameters: - versionNumber: ${{ parameters.versionNumber }} - includePublicSymbolServer: ${{ parameters.publishSymbolsToPublic }} - subscription: $(SymbolPublishingServiceConnection) - symbolProject: $(SymbolPublishingProject) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index d24158658b..439c73ed3d 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -143,16 +143,6 @@ jobs: - task: VisualStudioTestPlatformInstaller@1 displayName: Ensure VSTest Platform - - pwsh: |- - & '.pipelines/applyXamlStyling.ps1' -Passive - & '.pipelines/verifyNugetPackages.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln' - & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\PowerToys.sln' - & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln' - & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln' - & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln' - & '.pipelines/verifyArm64Configuration.ps1' -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln' - displayName: Verify formatting, nuget, and ARM64 configurations - - ${{ if eq(parameters.enablePackageCaching, true) }}: - task: Cache@2 displayName: 'Cache nuget packages (PackageReference)' @@ -265,272 +255,6 @@ jobs: flattenFolders: True targetFolder: $(JobOutputDirectory)/nupkg - - ${{ if eq(parameters.codeSign, true) }}: - - template: steps-esrp-signing.yml - parameters: - displayName: Sign NuGet packages - signingIdentity: ${{ parameters.signingIdentity }} - inputs: - FolderPath: $(JobOutputDirectory)/nupkg - Pattern: '*.nupkg' - 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" - } - ] - - - task: VSBuild@1 - displayName: Build BugReportTool - inputs: - solution: '**/tools/BugReportTool/BugReportTool.sln' - vsVersion: 17.0 - msbuildArgs: >- - -restore -graph - /p:RestorePackagesConfig=true - /p:CIBuild=true - /bl:$(LogOutputDirectory)\build-bug-report.binlog - ${{ parameters.additionalBuildOptions }} - $(MSBuildCacheParameters) - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - msbuildArchitecture: x64 - maximumCpuCount: true - ${{ if eq(parameters.enableMsBuildCaching, true) }}: - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - - task: VSBuild@1 - displayName: Build WebcamReportTool - inputs: - solution: '**/tools/WebcamReportTool/WebcamReportTool.sln' - vsVersion: 17.0 - msbuildArgs: >- - -restore -graph - /p:RestorePackagesConfig=true - /p:CIBuild=true - /bl:$(LogOutputDirectory)\build-webcam-report.binlog - ${{ parameters.additionalBuildOptions }} - $(MSBuildCacheParameters) - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - msbuildArchitecture: x64 - maximumCpuCount: true - ${{ if eq(parameters.enableMsBuildCaching, true) }}: - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - - task: VSBuild@1 - displayName: Build StylesReportTool - inputs: - solution: '**/tools/StylesReportTool/StylesReportTool.sln' - vsVersion: 17.0 - msbuildArgs: >- - -restore -graph - /p:RestorePackagesConfig=true - /p:CIBuild=true - /bl:$(LogOutputDirectory)\build-styles-report.binlog - ${{ parameters.additionalBuildOptions }} - $(MSBuildCacheParameters) - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - msbuildArchitecture: x64 - maximumCpuCount: true - ${{ if eq(parameters.enableMsBuildCaching, true) }}: - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - - ${{ each project in parameters.csProjectsToPublish }}: - - task: VSBuild@1 - displayName: Publish ${{ project }} for Packaging - inputs: - solution: ${{ project }} - vsVersion: 17.0 - msbuildArgs: >- - /target:Publish - /graph - /p:Configuration=$(BuildConfiguration);Platform=$(BuildPlatform);AppxBundle=Never - /p:VCRTForwarders-IncludeDebugCRT=false - /p:PowerToysRoot=$(Build.SourcesDirectory) - /p:PublishProfile=InstallationPublishProfile.pubxml - /bl:$(LogOutputDirectory)\publish-${{ join('_',split(project, '/')) }}.binlog - platform: $(BuildPlatform) - configuration: $(BuildConfiguration) - msbuildArchitecture: x64 - maximumCpuCount: true - - # Check if deps.json files don't reference different dll versions. - - pwsh: |- - & '.pipelines/verifyDepsJsonLibraryVersions.ps1' -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)' - displayName: Audit deps.json files for all applications - - # Check if asset files on the main application paths are playing nice and avoiding basic conflicts. - - pwsh: |- - & '.pipelines/verifyPossibleAssetConflicts.ps1' -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)' - displayName: Audit base applications path asset conflicts - - - pwsh: |- - & '.pipelines/verifyPossibleAssetConflicts.ps1' -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)\WinUI3Apps' - displayName: Audit WinAppSDK applications path asset conflicts - - - pwsh: |- - & '.pipelines/verifyNoticeMdAgainstNugetPackages.ps1' -path '$(build.sourcesdirectory)\' - displayName: Verify NOTICE.md and NuGet packages match - - - ${{ if eq(parameters.runTests, true) }}: - # Publish test results which ran in MSBuild - - task: PublishTestResults@2 - displayName: 'Publish Test Results' - inputs: - testResultsFormat: VSTest - testResultsFiles: '**/*.trx' - condition: ne(variables['BuildPlatform'],'arm64') - - # 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 - **\UnitTests-FancyZones.dll - !**\obj\** - - - ${{ if eq(parameters.codeSign, true) }}: - - template: steps-esrp-signing.yml - parameters: - displayName: Sign Core PowerToys - signingIdentity: ${{ parameters.signingIdentity }} - inputs: - FolderPath: '$(BuildPlatform)/$(BuildConfiguration)' # Video conf uses x86 and x64. - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_core.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' - - - template: steps-esrp-signing.yml - parameters: - displayName: Sign DSC files - signingIdentity: ${{ parameters.signingIdentity }} - inputs: - FolderPath: 'src/dsc/Microsoft.PowerToys.Configure' - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_DSC.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' - - - template: steps-esrp-signing.yml - parameters: - displayName: Sign x86 DirectShow VCM - signingIdentity: ${{ parameters.signingIdentity }} - inputs: - FolderPath: 'x86/$(BuildConfiguration)' # Video conf uses x86 and x64. - signType: batchSigning - batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_vcm.json' - ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' - - - template: steps-build-installer.yml - parameters: - codeSign: ${{ parameters.codeSign }} - signingIdentity: ${{ parameters.signingIdentity }} - versionNumber: ${{ parameters.versionNumber }} - additionalBuildOptions: ${{ parameters.additionalBuildOptions }} - - - template: steps-build-installer.yml - parameters: - codeSign: ${{ parameters.codeSign }} - signingIdentity: ${{ parameters.signingIdentity }} - versionNumber: ${{ parameters.versionNumber }} - additionalBuildOptions: ${{ parameters.additionalBuildOptions }} - buildUserInstaller: true # NOTE: This is the distinction between the above and below rules - - # This saves ~1GiB per architecture. We won't need these later. - # Removes: - # - All .pdbs from any static libs .libs (which were only used during linking) - - pwsh: |- - $binDir = '$(Build.SourcesDirectory)' - $ImportLibs = Get-ChildItem $binDir -Recurse -File -Filter '*.exp' | ForEach-Object { $_.FullName -Replace "exp$","lib" } - $StaticLibs = Get-ChildItem $binDir -Recurse -File -Filter '*.lib' | Where-Object FullName -NotIn $ImportLibs - - $Items = @() - $Items += Get-Item ($StaticLibs.FullName -Replace "lib$","pdb") -ErrorAction:Ignore - - $Items | Remove-Item -Recurse -Force -Verbose -ErrorAction:Ignore - displayName: Clean up static libs PDBs - errorActionPreference: silentlyContinue # It's OK if this silently fails - - - task: CopyFiles@2 - displayName: Stage Installers - inputs: - contents: "**/PowerToys*Setup-*.exe" - flattenFolders: True - targetFolder: $(JobOutputDirectory) - - - task: CopyFiles@2 - displayName: Stage Symbols - inputs: - contents: |- - **\*.pdb - !**\vc143.pdb - !**\*test*.pdb - flattenFolders: True - targetFolder: $(JobOutputDirectory)/symbols-$(BuildPlatform)/ - - - pwsh: |- - $p = "$(JobOutputDirectory)\" - $userHash = ((Get-Item $p\PowerToysUserSetup*.exe | Get-FileHash).Hash); - $machineHash = ((Get-Item $p\PowerToysSetup*.exe | Get-FileHash).Hash); - $userPlat = "hash_user_$(BuildPlatform).txt"; - $machinePlat = "hash_machine_$(BuildPlatform).txt"; - $combinedUserPath = $p + $userPlat; - $combinedMachinePath = $p + $machinePlat; - - echo $p - - echo $userPlat - echo $userHash - echo $combinedUserPath - - echo $machinePlat - echo $machineHash - echo $combinedMachinePath - - $userHash | out-file -filepath $combinedUserPath - $machineHash | out-file -filepath $combinedMachinePath - displayName: Calculate file hashes - - # Publishing the GPO files - - pwsh: |- - New-Item "$(JobOutputDirectory)/gpo" -Type Directory - Copy-Item src\gpo\assets\* "$(JobOutputDirectory)/gpo" -Recurse - displayName: Stage GPO files - - # Running the tests may result in future jobs consuming artifacts out of this build - - ${{ if eq(parameters.runTests, true) }}: - - task: CopyFiles@2 - displayName: Stage entire build output - inputs: - sourceFolder: '$(Build.SourcesDirectory)' - contents: '$(BuildPlatform)/$(BuildConfiguration)/**/*' - targetFolder: '$(JobOutputDirectory)\$(BuildPlatform)\$(BuildConfiguration)' - - ${{ if eq(parameters.publishArtifacts, true) }}: - publish: $(JobOutputDirectory) artifact: $(JobOutputArtifactName)