[ci] Attempt to make CI more reliable by using robocopy to delete (#20889)

This commit is contained in:
Billy O'Neal 2021-10-20 22:51:29 -07:00 committed by GitHub
parent 58fbb28f94
commit 4474aba1e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,6 +116,15 @@ $xmlFile = Join-Path $xmlResults "$Triplet.xml"
$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs'
if ($IsWindows)
{
mkdir empty
cmd /c "robocopy.exe empty `"$buildtreesRoot`" /MIR /NFL /NDL /NC /NP > nul"
cmd /c "robocopy.exe empty `"$packagesRoot`" /MIR /NFL /NDL /NC /NP > nul"
cmd /c "robocopy.exe empty `"$installRoot`" /MIR /NFL /NDL /NC /NP > nul"
rmdir empty
}
& "./vcpkg$executableExtension" x-ci-clean @commonArgs
if ($LASTEXITCODE -ne 0)
{