ci(windows): free disk space before build (clear prior ISO output)
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 21s
Some checks failed
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Failing after 21s
The boot.wim now carries WinPE-NetFx/PowerShell (collector), growing the image ~0.4GB,
and each build persists a ~5GB ISO to C:\silvermetal\out. On the single-volume runner
that accumulation starved oscdimg ('Insufficient disk space'). Clear prior output +
stale smbuild work dirs at job start so free space self-heals each run.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,22 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Free disk space
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Each successful build persists a ~5 GB ISO to C:\silvermetal\out, and the
|
||||
# boot.wim now carries WinPE-NetFx/PowerShell (bigger image). On the single-volume
|
||||
# runner that accumulation starves oscdimg ("Insufficient disk space"). Clear the
|
||||
# prior build output + any stale work dir before building so space self-heals.
|
||||
$before = [math]::Round((Get-PSDrive C).Free/1GB,1)
|
||||
Remove-Item 'C:\silvermetal\out\*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Get-ChildItem 'C:\gitea-runner\workspace' -Directory -ErrorAction SilentlyContinue | ForEach-Object {
|
||||
$t = Join-Path $_.FullName 'tmp\smbuild'
|
||||
if (Test-Path $t) { Remove-Item $t -Recurse -Force -ErrorAction SilentlyContinue }
|
||||
}
|
||||
$after = [math]::Round((Get-PSDrive C).Free/1GB,1)
|
||||
Write-Host " C: free ${before}GB -> ${after}GB (cleared prior ISO output + stale smbuild)"
|
||||
|
||||
- name: Ensure Windows ADK (oscdimg)
|
||||
shell: pwsh
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user