CI: Try to limit OOM on Windows

This commit is contained in:
Archi
2021-12-17 14:09:55 +01:00
parent 799b48d1b6
commit f98d33bfa5

View File

@@ -325,9 +325,18 @@ jobs:
foreach ($variant in $env:VARIANTS.Split([char[]] $null, [System.StringSplitOptions]::RemoveEmptyEntries)) {
Start-Job -Name "$variant" $PublishBlock -ArgumentList "$variant"
# Limit active jobs in parallel to help with memory usage
$jobs = $(Get-Job -State Running)
while (@($jobs).Count -ge 5) {
Wait-Job -Job $jobs -Any | Out-Null
$jobs = $(Get-Job -State Running)
}
}
Get-Job | Receive-Job -Wait
Get-Job | Receive-Job -Wait -AutoRemoveJob
- name: Upload ASF-generic
continue-on-error: true