ci(windows): free build working set before persist copy (oscdimg OK, persist OOM)
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 45s
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 45s
Build got through the ISO repack but failed copying the 5GB ISO to C:\silvermetal\out
('not enough space'): the build's working set (extracted ISO tree + expanded install.wim
+ 5GB base ISO) fills the single-volume runner, leaving <5GB for the persist copy. The
image grew again with the injected driver. Delete RUNNER_TEMP\smbuild + base.iso (no
longer needed post-build/validate) right before the copy to reclaim ~10GB.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -184,6 +184,15 @@ jobs:
|
||||
# RUNNER_TEMP is per-job/ephemeral. Keep the latest validated build at a
|
||||
# stable path so it can be retrieved (e.g. for VM boot-testing) out of band.
|
||||
New-Item -ItemType Directory -Force 'C:\silvermetal\out' | Out-Null
|
||||
# The ISO is already built + validated; free the build working set (extracted ISO
|
||||
# tree + the mounted/expanded install.wim + the 5GB base ISO) BEFORE the ~5GB persist
|
||||
# copy, or the single-volume runner runs out of space mid-copy. The ISO itself lives
|
||||
# in RUNNER_TEMP\out (untouched) and the SBOM/SHA uploads read from there too.
|
||||
$before = [math]::Round((Get-PSDrive C).Free/1GB,1)
|
||||
Remove-Item "$env:RUNNER_TEMP\smbuild" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item "$env:RUNNER_TEMP\base.iso" -Force -ErrorAction SilentlyContinue
|
||||
$after = [math]::Round((Get-PSDrive C).Free/1GB,1)
|
||||
Write-Host " freed build working set: C: ${before}GB -> ${after}GB before persist"
|
||||
Copy-Item "$env:RUNNER_TEMP\out\*" 'C:\silvermetal\out\' -Force
|
||||
Get-ChildItem 'C:\silvermetal\out' | ForEach-Object { Write-Host $_.Name }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user