[vcpkg-ci] Modify task names (#23361)

* Add triplet to name of main CI task

* Fix osx bootstrap task name

* Hide output from switch to parent hash

* Bump test port version

* Hardcode osx+linux triplet names

* Improve logging order

* Add error handling to each tool download

* Revert "Bump test port version"

* Don't prefetch 7zip
This commit is contained in:
Kai Pastor 2022-03-07 20:39:32 +01:00 committed by GitHub
parent 106bbc1fd1
commit 61a704cfd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 10 deletions

View File

@ -41,7 +41,7 @@ jobs:
inputs:
filePath: bootstrap-vcpkg.sh
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
displayName: '*** Test Modified Ports for x64-linux'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'

View File

@ -35,11 +35,11 @@ jobs:
exit 0
displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}'
- task: Bash@3
displayName: 'Build vcpkg'
displayName: 'Bootstrap vcpkg'
inputs:
filePath: bootstrap-vcpkg.sh
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
displayName: '*** Test Modified Ports for x64-osx'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'

View File

@ -153,20 +153,23 @@ $parentHashes = @()
if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
{
# Prefetch tools for better output
& "./vcpkg$executableExtension" fetch 7zip
& "./vcpkg$executableExtension" fetch cmake
& "./vcpkg$executableExtension" fetch ninja
& "./vcpkg$executableExtension" fetch git
foreach ($tool in @('cmake', 'ninja', 'git')) {
& "./vcpkg$executableExtension" fetch $tool
if ($LASTEXITCODE -ne 0)
{
throw "Failed to fetch $tool"
}
}
Write-Host "Determining parent hashes using HEAD~1"
$parentHashesFile = Join-Path $WorkingRoot 'parent-hashes.json'
$parentHashes = @("--parent-hashes=$parentHashesFile")
& git revert -n -m 1 HEAD
& git revert -n -m 1 HEAD | Out-Null
& "./vcpkg$executableExtension" ci $Triplet --dry-run --exclude=$skipList @hostArgs @commonArgs --no-binarycaching "--output-hashes=$parentHashesFile" `
| ForEach-Object { if ($_ -match ' dependency information| determine pass') { Write-Host $_ } }
& git reset --hard HEAD
Write-Host "Running CI using parent hashes"
& git reset --hard HEAD
}
& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @hostArgs @commonArgs @cachingArgs @parentHashes

View File

@ -62,7 +62,7 @@ jobs:
PathtoPublish: '$(DiffFile)'
ArtifactName: 'format.diff'
- task: PowerShell@2
displayName: '*** Test Modified Ports and Prepare Test Logs ***'
displayName: '*** Test Modified Ports for ${{ parameters.triplet }}'
inputs:
failOnStderr: true
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'