Skip to content

Commit 3bd05ca

Browse files
committed
Revert "fix(ci): expand Windows pre-checkout kill list and add robocopy workspace wipe"
This reverts commit d969aeb.
1 parent d969aeb commit 3bd05ca

1 file changed

Lines changed: 10 additions & 27 deletions

File tree

.github/workflows/test-audience-sample-app.yml

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -98,34 +98,17 @@ jobs:
9898
# actions/checkout@v4 deletes the prior workspace before cloning. If a
9999
# previous run's Unity Editor / IL2CPP build process is still holding
100100
# handles inside examples/audience, checkout dies with EBUSY. Kill any
101-
# leftover Unity-family and MSVC/IL2CPP build-tool processes — IL2CPP
102-
# spawns MSBuild, cl.exe, link.exe, mspdbsrv.exe etc. which outlive the
103-
# Unity editor and are not caught by the Unity* glob alone.
104-
$patterns = @(
105-
'Unity*','il2cpp*','UnityShaderCompiler*','UnityCrashHandler*',
106-
'MSBuild','cl','link','mspdbsrv','vctip','VBCSCompiler'
107-
)
108-
foreach ($pat in $patterns) {
109-
Get-Process -Name $pat -ErrorAction SilentlyContinue | ForEach-Object {
110-
Write-Host "Killing stale process: $($_.Name) (pid $($_.Id))"
111-
Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
112-
}
113-
}
114-
Start-Sleep -Seconds 5
115-
116-
# Robocopy-mirror an empty directory over the workspace then delete it.
117-
# This handles files that Node.js fs.rmdir (used inside actions/checkout)
118-
# cannot remove when a process still holds a handle — the root cause of
119-
# the EBUSY errors seen on this runner.
120-
$ws = $env:GITHUB_WORKSPACE
121-
if (Test-Path $ws) {
122-
$empty = "$env:RUNNER_TEMP\empty_wipe"
123-
New-Item -ItemType Directory -Force -Path $empty | Out-Null
124-
Write-Host "Force-wiping workspace: $ws"
125-
robocopy $empty $ws /MIR /R:1 /W:1 /NP /NFL /NDL | Out-Null
126-
Remove-Item $ws -Recurse -Force -ErrorAction SilentlyContinue
127-
Write-Host "Workspace cleared."
101+
# leftover Unity-family process here so checkout's cleanup succeeds.
102+
Get-Process | Where-Object {
103+
$_.Name -like 'Unity*' -or
104+
$_.Name -like 'il2cpp*' -or
105+
$_.Name -like 'UnityShaderCompiler*' -or
106+
$_.Name -like 'UnityCrashHandler*'
107+
} | ForEach-Object {
108+
Write-Host "Killing stale process: $($_.Name) (pid $($_.Id))"
109+
Stop-Process -Id $_.Id -Force -ErrorAction SilentlyContinue
128110
}
111+
Start-Sleep -Seconds 2
129112
130113
- uses: actions/checkout@v4
131114
with:

0 commit comments

Comments
 (0)