70 lines
2.5 KiB
YAML
70 lines
2.5 KiB
YAML
parameters:
|
|
dependsOn: ''
|
|
pgoArtifact: PGO
|
|
platform: ''
|
|
configuration: ''
|
|
|
|
jobs:
|
|
- job: MergePGD
|
|
dependsOn: ${{ parameters.dependsOn }}
|
|
pool:
|
|
vmImage: 'windows-2019'
|
|
variables:
|
|
artifactsPath: $(Build.SourcesDirectory)\Artifacts
|
|
pgoArtifactsPath: $(artifactsPath)\${{ parameters.pgoArtifact }}
|
|
buildPlatform: ${{ parameters.platform }}
|
|
buildConfiguration: ${{ parameters.configuration }}
|
|
|
|
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: NuGetToolInstaller@0
|
|
displayName: 'Use NuGet 5.2.0'
|
|
inputs:
|
|
versionSpec: 5.2.0
|
|
|
|
- task: NuGetAuthenticate@0
|
|
|
|
# In the Microsoft Azure DevOps tenant, NuGetCommand is ambiguous.
|
|
# This should be `task: NuGetCommand@2`
|
|
- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
|
|
displayName: Restore NuGet packages for extraneous build actions
|
|
inputs:
|
|
command: restore
|
|
feedsToUse: config
|
|
configPath: NuGet.config
|
|
restoreSolution: build/packages.config
|
|
restoreDirectory: '$(Build.SourcesDirectory)\packages'
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
inputs:
|
|
artifactName: ${{ parameters.pgoArtifact }}
|
|
downloadPath: $(artifactsPath)
|
|
|
|
- task: MSBuild@1
|
|
displayName: Merge counts into PGD
|
|
inputs:
|
|
solution: $(Build.SourcesDirectory)\OpenConsole.sln
|
|
platform: $(buildPlatform)
|
|
configuration: $(buildConfiguration)
|
|
msbuildArguments: '/t:MergePGOCounts /p:PGDPath=$(pgoArtifactsPath)\$(buildPlatform) /p:PGCRootPath=$(pgoArtifactsPath)\$(buildPlatform)'
|
|
|
|
- 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 }} |