@@ -128,6 +128,53 @@ if ($Triplet -eq 'x64-windows-release') {
128128 $tripletArg = " --triplet=$Triplet "
129129}
130130
131+ # Test uploads with azcopy
132+ # Using portable binaries from
133+ # https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf#download-the-azcopy-portable-binary
134+ if ($Triplet -eq ' x64-windows' )
135+ {
136+ $local_name = ' azcopy_windows_amd64_10.29.0'
137+ & $vcpkgExe x- download " $local_name .zip" " --url=https://aka.ms/downloadazcopy-v10-windows" " --sha512=fa2db4d722467eb0daebeddab20625198bbe7cd3102ac0fcec42a1b9f5f633e3d56cf4a02b2396c6ff3459eb291f5bfd5865cc97d4d731b6d05d0db1683c8a57" @cachingArgs
138+ Expand-Archive - Path " $local_name .zip" - Destination azcopy
139+ $env: PATH += " ;$PWD \azcopy\$local_name "
140+ }
141+ elseif ($Triplet -eq ' x64-linux' )
142+ {
143+ $local_name = ' azcopy_linux_amd64_10.29.0'
144+ & $vcpkgExe x- download " $local_name .tgz" " --url=https://aka.ms/downloadazcopy-v10-linux" " --sha512=c5f21fdf57066f9b4c17deb0b3649cb901863d8c6619f1a010abfde80ff7fdadf7ea9483bfa3820ae833e7953558294215b3a413b5efff75967fb368dcb1426a" @cachingArgs
145+ & tar xvzf " $local_name .tgz"
146+ $env: PATH += " :$PWD /$local_name "
147+ }
148+ $env: AZCOPY_LOG_LOCATION = Join-Path $ArtifactStagingDirectory ' azcopy-logs'
149+ $env: AZCOPY_JOB_PLAN_LOCATION = Join-Path $ArtifactStagingDirectory ' azcopy-plans'
150+ & azcopy -- version
151+ $lastLastExitCode = $LASTEXITCODE
152+ if ($lastLastExitCode -ne 0 )
153+ {
154+ Write-Error ' Cannot run azcopy.'
155+ exit $lastLastExitCode
156+ }
157+ # Build large artifacts with unique ABI hashes
158+ Get-Date | Out-File " scripts/manual-tests/azcopy/test-upload-artifacts/mutable"
159+ # 3 GB < single max write (5 GB) < 6 GB, in files of 1.5 GB random data
160+ $data = New-Object byte[] 1.5 GB
161+ (New-Object System.Random).NextBytes($data )
162+ [System.IO.File ]::WriteAllBytes(" scripts/manual-tests/azcopy/core-1.dat" , $data )
163+ (New-Object System.Random).NextBytes($data )
164+ [System.IO.File ]::WriteAllBytes(" scripts/manual-tests/azcopy/core-2.dat" , $data )
165+ (New-Object System.Random).NextBytes($data )
166+ [System.IO.File ]::WriteAllBytes(" scripts/manual-tests/azcopy/large-1.dat" , $data )
167+ (New-Object System.Random).NextBytes($data )
168+ [System.IO.File ]::WriteAllBytes(" scripts/manual-tests/azcopy/large-2.dat" , $data )
169+ & $vcpkgExe x- test-features test-upload - artifacts -- overlay- ports= scripts/ manual- tests/ azcopy $tripletArg $failureLogsArg @commonArgs @cachingArgs
170+ if ($LASTEXITCODE -eq 0 )
171+ {
172+ Get-Item $env: VCPKG_DOWNLOADS
173+ & $vcpkgExe remove test-upload - artifacts $tripletArg @commonArgs @cachingArgs
174+ & $vcpkgExe install -- only- binarycaching -- downloads- root= $env: VCPKG_DOWNLOADS / disabled " test-upload-artifacts[*]" -- overlay- ports= scripts/ manual- tests/ azcopy $tripletArg @commonArgs @cachingArgs
175+ }
176+ exit $LASTEXITCODE
177+
131178$failureLogs = Join-Path $ArtifactStagingDirectory ' failure-logs'
132179$failureLogsArg = " --failure-logs=$failureLogs "
133180$knownFailuresFromArgs = @ ()
0 commit comments