-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Struct out PGO scripts and jobs borrowed from MUX
- Loading branch information
Showing
23 changed files
with
569 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
trigger: none | ||
pr: none | ||
|
||
variables: | ||
- name: runCodesignValidationInjectionBG | ||
value: false | ||
|
||
# 0.0.yyMM.dd## | ||
# 0.0.1904.0900 | ||
name: 0.0.$(Date:yyMM).$(Date:dd)$(Rev:rr) | ||
|
||
stages: | ||
- stage: Build_x64 | ||
displayName: Build x64 | ||
dependsOn: [] | ||
condition: succeeded() | ||
jobs: | ||
- template: ./templates/build-console-pgo.yml | ||
parameters: | ||
platform: x64 | ||
- stage: Build_x86 | ||
displayName: Build x86 | ||
dependsOn: [] | ||
jobs: | ||
- template: ./templates/build-console-pgo.yml | ||
parameters: | ||
platform: x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
parameters: | ||
configuration: 'Release' | ||
platform: '' | ||
additionalBuildArguments: '' | ||
minimumExpectedTestsExecutedCount: 10 # Sanity check for minimum expected tests to be reported | ||
rerunPassesRequiredToAvoidFailure: 5 | ||
|
||
jobs: | ||
- job: Build${{ parameters.platform }}${{ parameters.configuration }} | ||
displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }} | ||
variables: | ||
BuildConfiguration: ${{ parameters.configuration }} | ||
BuildPlatform: ${{ parameters.platform }} | ||
PGOBuildMode: 'Instrument' | ||
pool: "windevbuildagents" | ||
# The public pool is also an option! | ||
# pool: { vmImage: windows-2019 } | ||
|
||
steps: | ||
- template: build-console-steps.yml | ||
parameters: | ||
additionalBuildArguments: ${{ parameters.additionalBuildArguments }} | ||
|
||
- template: helix-runtests-job.yml | ||
parameters: | ||
name: 'RunTestsInHelix' | ||
dependsOn: Build${{ parameters.platform }}${{ parameters.configuration }} | ||
condition: succeeded() | ||
testSuite: 'PgoInstrumentationSuite' | ||
rerunPassesRequiredToAvoidFailure: ${{ parameters.rerunPassesRequiredToAvoidFailure }} | ||
|
||
- template: helix-processtestresults-job.yml | ||
parameters: | ||
name: 'ProcessTestResults' | ||
dependsOn: | ||
- RunTestsInHelix | ||
condition: succeededOrFailed() | ||
rerunPassesRequiredToAvoidFailure: ${{ parameters.rerunPassesRequiredToAvoidFailure }} | ||
minimumExpectedTestsExecutedCount: ${{ parameters.minimumExpectedTestsExecutedCount }} | ||
|
||
- template: pgo-merge-pgd-job.yml | ||
parameters: | ||
name: 'MergePGD' | ||
dependsOn: | ||
- ProcessTestResults | ||
pgoArtifact: 'PGO' | ||
|
||
- template: pgo-build-and-publish-nuget-job.yml | ||
parameters: | ||
dependsOn: | ||
- MergePGD | ||
pgoArtifact: 'PGO' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
build/pipelines/templates/pgo-build-and-publish-nuget-job.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# From our friends at MUX: https://github.com/microsoft/microsoft-ui-xaml/blob/main/build/AzurePipelinesTemplates/MUX-BuildAndPublishPGONuGet-Job.yml | ||
|
||
parameters: | ||
dependsOn: '' | ||
pgoArtifact: PGO | ||
|
||
jobs: | ||
- job: BuildAndPublishPGONuGet | ||
dependsOn: ${{ parameters.dependsOn }} | ||
pool: | ||
vmImage: 'windows-2019' | ||
variables: | ||
artifactsPath: $(Build.SourcesDirectory)\Artifacts | ||
pgoToolsPath: $(Build.SourcesDirectory)\tools\PGODatabase | ||
nuspecPath: $(pgoToolsPath)\NuSpecs | ||
nuspecFilename: PGO.nuspec | ||
|
||
steps: | ||
- task: DownloadBuildArtifacts@0 | ||
inputs: | ||
artifactName: ${{ parameters.pgoArtifact }} | ||
downloadPath: $(artifactsPath) | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy pgd files to NuGet build directory' | ||
inputs: | ||
sourceFolder: $(artifactsPath)\${{ parameters.pgoArtifact }} | ||
contents: '**\*.pgd' | ||
targetFolder: $(nuspecPath)\tools | ||
|
||
- task: powershell@2 | ||
displayName: 'Generate NuSpec file' | ||
inputs: | ||
targetType: filePath | ||
filePath: $(pgoToolsPath)\generate-nuspec.ps1 | ||
workingDirectory: $(pgoToolsPath) | ||
arguments: $(nuspecPath)\$(nuspecFilename).template $(nuspecPath)\$(nuspecFilename) | ||
|
||
- task: CmdLine@1 | ||
displayName: 'Build NuGet package' | ||
inputs: | ||
filename: '$(Build.SourcesDirectory)\tools\NugetWrapper.cmd' | ||
arguments: pack "$(nuspecPath)\$(nuspecFilename)" -BasePath "$(nuspecPath)" -OutputDirectory "$(Build.ArtifactStagingDirectory)" -properties PROGRAMFILES="%ProgramFiles(x86)%" | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathToPublish: $(Build.ArtifactStagingDirectory) | ||
artifactName: ${{ parameters.pgoArtifact }} | ||
|
||
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2 | ||
displayName: 'NuGet push' | ||
inputs: | ||
command: push | ||
publishVstsFeed: Terminal/TerminalDependencies | ||
packagesToPush: $(Build.ArtifactStagingDirectory)/*.nupkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
parameters: | ||
dependsOn: '' | ||
pgoArtifact: PGO | ||
|
||
jobs: | ||
- job: MergePGD | ||
dependsOn: ${{ parameters.dependsOn }} | ||
pool: | ||
vmImage: 'windows-2019' | ||
variables: | ||
artifactsPath: $(Build.SourcesDirectory)\Artifacts | ||
pgoArtifactsPath: $(artifactsPath)\${{ parameters.pgoArtifact }} | ||
strategy: | ||
matrix: ${{ parameters.matrix }} | ||
|
||
steps: | ||
# The environment variable VCToolsInstallDir isn't defined on lab machines, so we need to retrieve it ourselves. | ||
- script: | | ||
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -Latest -requires Microsoft.Component.MSBuild -property InstallationPath > %TEMP%\vsinstalldir.txt | ||
set /p _VSINSTALLDIR15=<%TEMP%\vsinstalldir.txt | ||
del %TEMP%\vsinstalldir.txt | ||
call "%_VSINSTALLDIR15%\Common7\Tools\VsDevCmd.bat" | ||
echo VCToolsInstallDir = %VCToolsInstallDir% | ||
echo ##vso[task.setvariable variable=VCToolsInstallDir]%VCToolsInstallDir% | ||
displayName: 'Retrieve VC tools directory' | ||
- task: DownloadBuildArtifacts@0 | ||
inputs: | ||
artifactName: ${{ parameters.pgoArtifact }} | ||
downloadPath: $(artifactsPath) | ||
- script: | | ||
cd $(buildPlatform) | ||
"%VCToolsInstallDir%\bin\hostx64\x64\pgomgr.exe" /merge WindowsTerminal*.pgc WindowsTerminal.pgd | ||
displayName: 'Merge Terminal pgc files into pgd' | ||
workingDirectory: $(pgoArtifactsPath) | ||
- script: | | ||
cd $(buildPlatform) | ||
"%VCToolsInstallDir%\bin\hostx64\x64\pgomgr.exe" /merge OpenConsole*.pgc OpenConsole.pgd | ||
displayName: 'Merge OpenConsole pgc files into pgd' | ||
workingDirectory: $(pgoArtifactsPath) | ||
- task: CopyFiles@2 | ||
displayName: 'Copy merged pgd to artifact staging' | ||
inputs: | ||
sourceFolder: $(pgoArtifactsPath) | ||
contents: '**\$(buildPlatform)\*.pgd' | ||
targetFolder: $(Build.ArtifactStagingDirectory) | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathToPublish: $(Build.ArtifactStagingDirectory) | ||
artifactName: ${{ parameters.pgoArtifact }} |
Oops, something went wrong.
This comment was marked as duplicate.
Sorry, something went wrong.