mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:29:00 +08:00
Update vcpkg-tool to 2024-08-01 and fix hidden CI failures (#40198)
This commit is contained in:
parent
1a1d9c8a64
commit
df8e3eb37b
@ -3,10 +3,6 @@
|
||||
#
|
||||
|
||||
parameters:
|
||||
- name: vcpkgToolSha
|
||||
displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
|
||||
type: string
|
||||
default: 'use default'
|
||||
- name: jobName
|
||||
type: string
|
||||
- name: dockerImage
|
||||
@ -49,38 +45,19 @@ jobs:
|
||||
docker rm -f $CONTAINERS
|
||||
fi
|
||||
displayName: 'Stop and remove all docker containers'
|
||||
- task: AzureCLI@2
|
||||
displayName: 'Pull Docker Container'
|
||||
inputs:
|
||||
azureSubscription: 'VcpkgPrFleet'
|
||||
scriptType: bash
|
||||
failOnStandardError: true
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
az acr login --name vcpkgandroidwus3
|
||||
docker pull ${{ parameters.dockerImage }}
|
||||
- bash: |
|
||||
docker run --rm \
|
||||
--mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
|
||||
${{ parameters.dockerImage }} \
|
||||
./bootstrap-vcpkg.sh
|
||||
displayName: 'Bootstrap vcpkg'
|
||||
condition: eq('use default', '${{ parameters.vcpkgToolSha }}')
|
||||
- bash: |
|
||||
docker run --rm \
|
||||
--mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
|
||||
${{ parameters.dockerImage }} \
|
||||
./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
|
||||
displayName: "Build vcpkg with CMake"
|
||||
condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
|
||||
- task: AzureCLI@2
|
||||
displayName: '*** Test Modified Ports'
|
||||
inputs:
|
||||
azureSubscription: 'VcpkgPrFleet'
|
||||
scriptType: bash
|
||||
failOnStandardError: true
|
||||
scriptLocation: 'inlineScript'
|
||||
scriptLocation: 'inlineScript' # Be very very careful that the exit code from the last pwsh is reported correctly
|
||||
inlineScript: |
|
||||
az acr login --name vcpkgandroidwus3
|
||||
docker pull ${{ parameters.dockerImage }}
|
||||
docker run --rm \
|
||||
--mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
|
||||
${{ parameters.dockerImage }} \
|
||||
./bootstrap-vcpkg.sh
|
||||
end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'`
|
||||
assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv`
|
||||
binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv`
|
||||
|
@ -81,19 +81,16 @@ jobs:
|
||||
parameters:
|
||||
jobName: arm_neon_android
|
||||
dockerImage: $(linux-docker-image)
|
||||
vcpkgToolSha: ${{ parameters.vcpkgToolSha }}
|
||||
tripletPattern: ${{ parameters.tripletPattern }}
|
||||
|
||||
- template: android/azure-pipelines.yml
|
||||
parameters:
|
||||
jobName: x64_android
|
||||
dockerImage: $(linux-docker-image)
|
||||
vcpkgToolSha: ${{ parameters.vcpkgToolSha }}
|
||||
tripletPattern: ${{ parameters.tripletPattern }}
|
||||
|
||||
- template: android/azure-pipelines.yml
|
||||
parameters:
|
||||
jobName: arm64_android
|
||||
dockerImage: $(linux-docker-image)
|
||||
vcpkgToolSha: ${{ parameters.vcpkgToolSha }}
|
||||
tripletPattern: ${{ parameters.tripletPattern }}
|
||||
|
@ -48,7 +48,6 @@ jobs:
|
||||
inputs:
|
||||
azureSubscription: 'VcpkgPrFleet'
|
||||
scriptType: 'pscore'
|
||||
failOnStandardError: true
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
$current = Get-Date -AsUtc
|
||||
|
@ -47,7 +47,6 @@ jobs:
|
||||
inputs:
|
||||
azureSubscription: 'VcpkgPrFleet'
|
||||
scriptType: 'pscore'
|
||||
failOnStandardError: true
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
$current = Get-Date -AsUtc
|
||||
|
@ -58,13 +58,13 @@ Param(
|
||||
|
||||
if (-Not ((Test-Path "triplets/$Triplet.cmake") -or (Test-Path "triplets/community/$Triplet.cmake"))) {
|
||||
Write-Error "Incorrect triplet '$Triplet', please supply a valid triplet."
|
||||
throw
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ((-Not [string]::IsNullOrWhiteSpace($ArchivesRoot))) {
|
||||
if ((-Not [string]::IsNullOrWhiteSpace($BinarySourceStub))) {
|
||||
Write-Error "Only one binary caching setting may be used."
|
||||
throw
|
||||
exit 1
|
||||
}
|
||||
|
||||
$BinarySourceStub = "files,$ArchivesRoot"
|
||||
@ -121,9 +121,11 @@ if ($IsWindows) {
|
||||
}
|
||||
|
||||
& "./vcpkg$executableExtension" x-ci-clean @commonArgs
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
throw "vcpkg clean failed"
|
||||
Write-Error "vcpkg clean failed"
|
||||
exit $lastLastExitCode
|
||||
}
|
||||
|
||||
$parentHashes = @()
|
||||
@ -134,14 +136,23 @@ if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
|
||||
# Prefetch tools for better output
|
||||
foreach ($tool in @('cmake', 'ninja', 'git')) {
|
||||
& "./vcpkg$executableExtension" fetch $tool
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
throw "Failed to fetch $tool"
|
||||
Write-Error "Failed to fetch $tool"
|
||||
exit $lastLastExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Comparing with HEAD~1"
|
||||
& git revert -n -m 1 HEAD | Out-Null
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
Write-Error "git revert failed"
|
||||
exit $lastLastExitCode
|
||||
}
|
||||
|
||||
$parentBaseline = Get-Content "$PSScriptRoot/../ci.baseline.txt" -Raw
|
||||
if ($parentBaseline -eq $headBaseline)
|
||||
{
|
||||
@ -153,13 +164,26 @@ if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
|
||||
Copy-Item "scripts/buildsystems/vcpkg.cmake" -Destination "scripts/test_ports/cmake"
|
||||
Copy-Item "scripts/buildsystems/vcpkg.cmake" -Destination "scripts/test_ports/cmake-user"
|
||||
& "./vcpkg$executableExtension" ci "--triplet=$Triplet" --dry-run "--ci-baseline=$PSScriptRoot/../ci.baseline.txt" @commonArgs --no-binarycaching "--output-hashes=$parentHashesFile"
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
Write-Error "Generating parent hashes failed; this is usually an infrastructure problem with vcpkg"
|
||||
exit $lastLastExitCode
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "CI baseline was modified, not using parent hashes"
|
||||
}
|
||||
|
||||
Write-Host "Running CI for HEAD"
|
||||
& git reset --hard HEAD
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
Write-Error "git reset failed"
|
||||
exit $lastLastExitCode
|
||||
}
|
||||
}
|
||||
|
||||
# The vcpkg.cmake toolchain file is not part of ABI hashing,
|
||||
@ -167,13 +191,16 @@ if (($BuildReason -eq 'PullRequest') -and -not $NoParentHashes)
|
||||
Copy-Item "scripts/buildsystems/vcpkg.cmake" -Destination "scripts/test_ports/cmake"
|
||||
Copy-Item "scripts/buildsystems/vcpkg.cmake" -Destination "scripts/test_ports/cmake-user"
|
||||
& "./vcpkg$executableExtension" ci "--triplet=$Triplet" --failure-logs=$failureLogs --x-xunit=$xunitFile "--ci-baseline=$PSScriptRoot/../ci.baseline.txt" @commonArgs @cachingArgs @parentHashes @skipFailuresArg
|
||||
$lastLastExitCode = $LASTEXITCODE
|
||||
|
||||
$failureLogsEmpty = (-Not (Test-Path $failureLogs) -Or ((Get-ChildItem $failureLogs).count -eq 0))
|
||||
Write-Host "##vso[task.setvariable variable=FAILURE_LOGS_EMPTY]$failureLogsEmpty"
|
||||
|
||||
if ($LASTEXITCODE -ne 0)
|
||||
Write-Host "##vso[task.setvariable variable=XML_RESULTS_FILE]$xunitFile"
|
||||
|
||||
if ($lastLastExitCode -ne 0)
|
||||
{
|
||||
throw "vcpkg ci failed"
|
||||
Write-Error "vcpkg ci testing failed; this is usually a bug in a port. Check for failure logs attached to the run in Azure Pipelines."
|
||||
}
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=XML_RESULTS_FILE]$xunitFile"
|
||||
exit $lastLastExitCode
|
||||
|
@ -61,7 +61,6 @@ jobs:
|
||||
inputs:
|
||||
azureSubscription: 'VcpkgPrFleet'
|
||||
scriptType: 'pscore'
|
||||
failOnStandardError: true
|
||||
scriptLocation: 'inlineScript'
|
||||
inlineScript: |
|
||||
$current = Get-Date -AsUtc
|
||||
|
@ -1,5 +1,5 @@
|
||||
VCPKG_TOOL_RELEASE_TAG=2024-07-10
|
||||
VCPKG_MACOS_SHA=65cf231b157ade67eb0675e2d718404e0edaa20d1622f36c3bfe26910a03555154747b01d3fd3fdad238c948c79005741c2b617770cd523270c021ec825e21c0
|
||||
VCPKG_MUSLC_SHA=054f67f8e34d8701c14282e42a5be9b4d0fe4c4a3e42b17399088ed9b20f2bc87bc44ed4892cc3ac40c0d274d23ac7bdadd1e208891982701b3c39c8e62b554a
|
||||
VCPKG_GLIBC_SHA=3a92070fad7de7fc8c6ec480e0c7dffaf21b75974c078cbaad74b99406fd9ad9c4a1cbb27a8d6a5c1488a41e1af5df3aa02b0d3b35b8e0c58b05be7c3fdcce4b
|
||||
VCPKG_TOOL_SOURCE_SHA=e34d28345fd9a1b7296d97ffd141293396b0262fd92cd0a61c7fc1433b2944d936fcb685c65eaafecbe2c24a4c30039e75aaf2ecbf53e7080efa1ca63d9447b8
|
||||
VCPKG_TOOL_RELEASE_TAG=2024-08-01
|
||||
VCPKG_MACOS_SHA=73de51901c1e84b6b9d0483ef4054887f55ba17995b39084784dbd60aa2a163a0fdb2d39203c6148007f67e6ccb22b634d44ee884e32c31b291326e8c437581b
|
||||
VCPKG_MUSLC_SHA=4e1cdb44fba087969a23d7be429abf9926255eee39ff00c5f6c84ab886d80fa79060850fd15eacafec6bea67dbfe54657126aac5e3a597331705e5082c3eef58
|
||||
VCPKG_GLIBC_SHA=dcf14bac483c67d52a9a8e29d8cdb2193fcf962e1434dc0176de577e322a654e8a6807b8e91c0cba452e715ef2c89ef8a9e16bd36bd5032c366e7f52210452b9
|
||||
VCPKG_TOOL_SOURCE_SHA=1fe18281ffa52da4bcc29820b89bb9f75b811cc008cc2485565ab4e11ebb8b97c34765b4aa665514493608061957ba089cc6dc4d5a75715b9fb98c4e9656b5c8
|
||||
|
Loading…
Reference in New Issue
Block a user