From 9fa613b8c159b42ece40c05644a8120a97409fe5 Mon Sep 17 00:00:00 2001 From: sysadmin Date: Wed, 10 Jun 2026 16:35:01 +0100 Subject: [PATCH] ci(windows): free build working set before persist copy (oscdimg OK, persist OOM) 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 --- .gitea/workflows/build-iso-windows.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitea/workflows/build-iso-windows.yaml b/.gitea/workflows/build-iso-windows.yaml index 1509e48..bb95671 100644 --- a/.gitea/workflows/build-iso-windows.yaml +++ b/.gitea/workflows/build-iso-windows.yaml @@ -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 }