Skip to content

[invalid] Test uploads with azcopy #45461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 29 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
17f12a7
[invalid] Test uploads with azcopy
dg0yt May 11, 2025
35b7dff
Test vcpkg without azcopy capability
dg0yt May 12, 2025
347f4a6
Revert "Test vcpkg without azcopy capability"
dg0yt May 12, 2025
d038528
WIP
dg0yt May 12, 2025
c178e54
Use vcpkg fetch
dg0yt May 12, 2025
181c48b
Fixup
dg0yt May 13, 2025
928c0dd
Update `azcopy` to `10.29.1` (vcpkg-tools.json)
xavier2k6 Jun 11, 2025
fdabaf0
Merge remote-tracking branch 'origin/master' into azcopy
dg0yt Jun 11, 2025
7454d40
Merge branch 'vcpkg_azcopy' of https://github.com/xavier2k6/vcpkg int…
dg0yt Jun 11, 2025
b4c3d59
Merge remote-tracking branch 'origin/master' into azcopy
dg0yt Jul 2, 2025
9d7d55b
Use default tool
dg0yt Jul 2, 2025
129a745
Skip fetching azcopy
dg0yt Jul 2, 2025
a1e454c
Test
dg0yt Jul 3, 2025
49aa1ba
WIP
dg0yt Jul 21, 2025
6e9ff62
Use azcopy for binary caching
vicroms Aug 1, 2025
764e78e
Test with zlib
vicroms Aug 1, 2025
1c2eb5a
Set azcopy log and plan location
vicroms Aug 1, 2025
6707c0e
Use test port
vicroms Aug 2, 2025
26056ad
Trigger CI
vicroms Aug 2, 2025
14255c9
Trigger CI
vicroms Aug 4, 2025
e7e7d3e
Downgrade to 10.28.0
vicroms Aug 5, 2025
2e1709b
Use azcopy-sas for all platforms
vicroms Aug 5, 2025
7e80bb1
Merge branch 'azcopy-test' of https://github.com/vicroms/vcpkg into a…
dg0yt Aug 5, 2025
a5d6661
Revert vcpkg-ci-boost
dg0yt Aug 5, 2025
ebcd230
WIP
dg0yt Aug 5, 2025
83a98a9
Update scripts/azure-pipelines/test-modified-ports.ps1
vicroms Aug 5, 2025
0978f5f
Publish azcopy logs
vicroms Aug 5, 2025
281f565
Merge branch 'azcopy' of https://github.com/dg0yt/vcpkg into azcopy
vicroms Aug 5, 2025
b5c2319
Publish azcopy logs
vicroms Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/android/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
-File scripts/azure-pipelines/test-modified-ports.ps1 \
-Triplet ${{ replace(parameters.jobName, '_', '-') }} \
-BuildReason $(Build.Reason) \
-BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \
-BinarySourceStub "x-azcopy-sas,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \
-WorkingRoot ${{ variables.WORKING_ROOT }}
- task: PublishPipelineArtifact@1
displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}"
Expand Down
6 changes: 3 additions & 3 deletions scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ parameters:
- name: vcpkgToolSha
displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
type: string
default: 'use default'
default: 'refs/pull/1738/merge'
- name: tripletPattern
displayName: 'Enable triplets which contain this substring'
displayName: 'Enable triplets which contain this substring (^ matches begin, $ matches end)'
type: string
default: '-'
default: '^'

jobs:
- template: windows/azure-pipelines.yml
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/linux/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
-File scripts/azure-pipelines/test-modified-ports.ps1 \
-Triplet ${{ replace(parameters.jobName, '_', '-') }} \
-BuildReason $(Build.Reason) \
-BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \
-BinarySourceStub "x-azcopy-sas,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" \
-WorkingRoot ${{ variables.WORKING_ROOT }}
- task: PublishPipelineArtifact@1
displayName: "Publish Artifact: failure logs for ${{ replace(parameters.jobName, '_', '-') }}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/osx/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
$binarySas = az storage container generate-sas --name cache --account-name vcpkgbinarycachewus --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv | Out-String
$binarySas = $binarySas.Trim()
$env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus.blob.core.windows.net/cache,$assetSas,readwrite"
& scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)
& scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azcopy-sas,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact: failure logs for x64-osx'
inputs:
Expand Down
39 changes: 38 additions & 1 deletion scripts/azure-pipelines/test-modified-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ if ((-Not [string]::IsNullOrWhiteSpace($ArchivesRoot))) {
$buildtreesRoot = Join-Path $WorkingRoot 'b'
$installRoot = Join-Path $WorkingRoot 'installed'
$packagesRoot = Join-Path $WorkingRoot 'p'
$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs'

$env:AZCOPY_LOG_LOCATION = Join-Path $failureLogs 'azcopy-logs'
$env:AZCOPY_JOB_PLAN_LOCATION = Join-Path $WorkingRoot 'azcopy-plans'

New-Item -Type Directory -Path $env:AZCOPY_LOG_LOCATION -Force | Out-Null

$commonArgs = @(
"--x-buildtrees-root=$buildtreesRoot",
Expand Down Expand Up @@ -128,7 +134,38 @@ if ($Triplet -eq 'x64-windows-release') {
$tripletArg = "--triplet=$Triplet"
}

$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs'
# Build large artifacts with unique ABI hashes
Get-Date | Out-File "scripts/manual-tests/azcopy/test-upload-artifacts/mutable"
# 3 GB < single max write (5 GB) < 6 GB, in files of 1.5 GB random data
$data = New-Object byte[] 1.5GB
(New-Object System.Random).NextBytes($data)
[System.IO.File]::WriteAllBytes("scripts/manual-tests/azcopy/core-1.dat", $data)
(New-Object System.Random).NextBytes($data)
[System.IO.File]::WriteAllBytes("scripts/manual-tests/azcopy/core-2.dat", $data)
(New-Object System.Random).NextBytes($data)
[System.IO.File]::WriteAllBytes("scripts/manual-tests/azcopy/large-1.dat", $data)
(New-Object System.Random).NextBytes($data)
[System.IO.File]::WriteAllBytes("scripts/manual-tests/azcopy/large-2.dat", $data)
Get-ChildItem -File scripts/manual-tests/azcopy
# Build and upload [core], [core,large]
$env:VCPKG_DEFAULT_BINARY_CACHE = Join-Path $WorkingRoot 'archives-azcopy'
New-Item -Type Directory -Path $env:VCPKG_DEFAULT_BINARY_CACHE -Force | Out-Null
& $vcpkgExe x-test-features test-upload-artifacts --overlay-ports=scripts/manual-tests/azcopy $tripletArg @commonArgs @cachingArgs
$lastLastExitCode = $LASTEXITCODE
$env:VCPKG_DEFAULT_BINARY_CACHE = $null
if ($lastLastExitCode -eq 0)
{
# Try restore from cache
& $vcpkgExe remove test-upload-artifacts $tripletArg @commonArgs @cachingArgs
$xunitFile = Join-Path $ArtifactStagingDirectory "$Triplet-results.xml"
$xunitArg = "--x-xunit=$xunitFile"
& $vcpkgExe install --only-binarycaching "test-upload-artifacts[*]" --overlay-ports=scripts/manual-tests/azcopy $tripletArg $xunitArg @commonArgs @cachingArgs
$lastLastExitCode = $LASTEXITCODE
Write-Host "##vso[task.setvariable variable=XML_RESULTS_FILE]$xunitFile"
}
Write-Host "##vso[task.setvariable variable=FAILURE_LOGS_EMPTY]$true"
exit $lastLastExitCode

$failureLogsArg = "--failure-logs=$failureLogs"
$knownFailuresFromArgs = @()
if ($testFeatures) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/windows/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
$binarySas = $binarySas.Trim()
$env:X_VCPKG_ASSET_SOURCES = "x-azurl,https://vcpkgassetcachewus.blob.core.windows.net/cache,$assetSas,readwrite"
./vcpkg.exe fetch python3
& scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azblob,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)
& scripts/azure-pipelines/test-modified-ports.ps1 -Triplet ${{ replace(parameters.jobName, '_', '-') }} -BuildReason $(Build.Reason) -BinarySourceStub "x-azcopy-sas,https://vcpkgbinarycachewus.blob.core.windows.net/cache,$binarySas" -WorkingRoot $env:WORKING_ROOT -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)
- task: PowerShell@2
displayName: 'Validate version files'
condition: eq('${{ replace(parameters.jobName, '_', '-') }}', '${{ variables.ExtraChecksTriplet }}')
Expand Down
1 change: 1 addition & 0 deletions scripts/manual-tests/azcopy/core-1.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
1 change: 1 addition & 0 deletions scripts/manual-tests/azcopy/core-2.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
1 change: 1 addition & 0 deletions scripts/manual-tests/azcopy/large-1.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
1 change: 1 addition & 0 deletions scripts/manual-tests/azcopy/large-2.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
1 change: 1 addition & 0 deletions scripts/manual-tests/azcopy/test-upload-artifacts/mutable
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

file(INSTALL "${CURRENT_PORT_DIR}/mutable" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
foreach(name IN LISTS FEATURES)
file(GLOB blobs "${CURRENT_PORT_DIR}/../${name}-*.dat")
file(INSTALL ${blobs} DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
endforeach()
15 changes: 15 additions & 0 deletions scripts/manual-tests/azcopy/test-upload-artifacts/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "test-upload-artifacts",
"version-string": "ci",
"description": [
"Tests uploading artifacts of varying size.",
"Write suitable amounts of random data to the datafiles before installing the port."
],
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
"features": {
"large" : {
"description": "Install large.dat"
}
}
}
48 changes: 24 additions & 24 deletions scripts/vcpkg-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
{
"name": "node",
"os": "windows",
"arch":"x64",
"arch": "x64",
"version": "24.3.0",
"executable": "node-v24.3.0-win-x64/node.exe",
"url": "https://nodejs.org/dist/v24.3.0/node-v24.3.0-win-x64.7z",
Expand All @@ -316,7 +316,7 @@
{
"name": "node",
"os": "windows",
"arch":"arm64",
"arch": "arm64",
"version": "24.3.0",
"executable": "node-v24.3.0-win-arm64/node.exe",
"url": "https://nodejs.org/dist/v24.3.0/node-v24.3.0-win-arm64.7z",
Expand All @@ -326,7 +326,7 @@
{
"name": "node",
"os": "linux",
"arch":"x64",
"arch": "x64",
"version": "24.3.0",
"executable": "node-v24.3.0-linux-x64/bin/node",
"url": "https://nodejs.org/dist/v24.3.0/node-v24.3.0-linux-x64.tar.gz",
Expand All @@ -346,7 +346,7 @@
{
"name": "node",
"os": "osx",
"arch":"x64",
"arch": "x64",
"version": "24.3.0",
"executable": "node-v24.3.0-darwin-x64/bin/node",
"url": "https://nodejs.org/dist/v24.3.0/node-v24.3.0-darwin-x64.tar.gz",
Expand All @@ -367,41 +367,41 @@
"name": "azcopy",
"os": "linux",
"arch": "amd64",
"version": "10.29.1",
"executable": "azcopy_linux_amd64_10.29.1/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.29.1/azcopy_linux_amd64_10.29.1.tar.gz",
"sha512": "e2fe66658d790784e5d32f397254aad2bb3fa3faec6929e5a9800111d8feee8353db0250feb7d9e49a77118a5437513162704506e0324903b5aeb96f8d85e8fb",
"archive": "azcopy_linux_amd64_10.29.1.tar.gz"
"version": "10.28.0",
"executable": "azcopy_linux_amd64_10.28.0/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.28.0/azcopy_linux_amd64_10.28.0.tar.gz",
"sha512": "3fb8f6c902f9f89535f6f50efbf57032db31d26e3ad4a3d0fe1c973a3715983b14e26fecfc8f1e65bd57a60b71e282ecde05208309e6db875877bacb0e875566",
"archive": "azcopy_linux_amd64_10.28.0.tar.gz"
},
{
"name": "azcopy",
"os": "osx",
"arch": "amd64",
"version": "10.29.1",
"executable": "azcopy_darwin_amd64_10.29.1/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.29.1/azcopy_darwin_amd64_10.29.1.zip",
"sha512": "12481665136e6a10c8b1f784a097420c76d47336e8d2d5dc8b004012ab75e0e91d846fbd8cd0fb75bd6e9603db660cd5eb5ce71a8e003994a4356f19e3c02ec2",
"archive": "azcopy_darwin_amd64_10.29.1.zip"
"version": "10.28.0",
"executable": "azcopy_darwin_amd64_10.28.0/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.28.0/azcopy_darwin_amd64_10.28.0.zip",
"sha512": "e49da705aaa2399a5aec2ff3ae26d8776d338a3c32874abe6d9888393a080960ba1b8ca9add352323b048d82b88a4afc38b26b5c39ec25ecd253544a309ec252",
"archive": "azcopy_darwin_amd64_10.28.0.zip"
},
{
"name": "azcopy",
"os": "osx",
"arch": "arm64",
"version": "10.29.1",
"executable": "azcopy_darwin_arm64_10.29.1/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.29.1/azcopy_darwin_arm64_10.29.1.zip",
"sha512": "025bbc13b6617ab341fd0344a7a6342b44e6d10e5b7fb009a35988bfcebc442e0d3c6040f7245ea4e3c0643410a0342eff17aab295dea7667441f1e78801b845",
"archive": "azcopy_darwin_arm64_10.29.1.zip"
"version": "10.28.0",
"executable": "azcopy_darwin_arm64_10.28.0/azcopy",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.28.0/azcopy_darwin_arm64_10.28.0.zip",
"sha512": "53923b9379c0532c889b9b5f806e1bbdfef05362dadc3e060972e4de34c8a6a1bb44084171991aaeb5792965ef6670956f1cbf078c755368f3349d356b734364",
"archive": "azcopy_darwin_arm64_10.28.0.zip"
},
{
"name": "azcopy",
"os": "windows",
"arch": "amd64",
"version": "10.29.1",
"executable": "azcopy_windows_amd64_10.29.1/azcopy.exe",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.29.1/azcopy_windows_amd64_10.29.1.zip",
"sha512": "f3f30b51d7447e27912bb42241ff187cc89596a0ca0c7138367891ecb01282e947a70f6ba1f248f79ef4f4707e03cceeabcc7b3bc8187cb661e32c2195ddfdd2",
"archive": "azcopy_windows_amd64_10.29.1.zip"
"version": "10.28.0",
"executable": "azcopy_windows_amd64_10.28.0/azcopy.exe",
"url": "https://github.com/Azure/azure-storage-azcopy/releases/download/v10.28.0/azcopy_windows_amd64_10.28.0.zip",
"sha512": "67aa0a03fc5d71c318025447ef6de612956191e0523cb16e6e1472c35994e26090a2f9f063c408b146bf6209de0215a65e7790b1cfc694538189925878d8f5cb",
"archive": "azcopy_windows_amd64_10.28.0.zip"
}
]
}