diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index 0025750ee2..5c50454b44 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -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' diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 8749826188..ce5c095d2f 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -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' diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 index 6125b07856..12f26d26b6 100755 --- a/scripts/azure-pipelines/test-modified-ports.ps1 +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -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 diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index 60ba6fa1b8..3d494a0425 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -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'