49 строки
1.7 KiB
YAML
49 строки
1.7 KiB
YAML
parameters:
|
|
dependsOn: ''
|
|
pgdFile: Microsoft.UI.Xaml.pgd
|
|
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 *.pgc ${{ parameters.pgdFile }}
|
|
displayName: 'Merge pgc files into pgd'
|
|
workingDirectory: $(pgoArtifactsPath)
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy merged pgd to artifact staging'
|
|
inputs:
|
|
sourceFolder: $(pgoArtifactsPath)
|
|
contents: '**\$(buildPlatform)\${{ parameters.pgdFile }}'
|
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
inputs:
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)
|
|
artifactName: ${{ parameters.pgoArtifact }} |