Skip to content

Commit 6a00fe6

Browse files
committed
cleanup windows
1 parent 987cf85 commit 6a00fe6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/cpp-docker.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,20 @@ jobs:
3939
if: runner.os != 'Windows'
4040
run: |
4141
sudo rm -rf /opt/hostedtoolcache/CodeQL
42-
sudo rm -rf /usr/local/lib/android
42+
sudo rm -rf /usr/local/lib/android/sdk
4343
sudo rm -rf /usr/share/dotnet
4444
4545
- name: Free Disk Space
4646
if: runner.os == 'Windows'
47-
shell: cmd
4847
run: |
49-
echo "Cleaning up disk..."
50-
del /f /q /s %TEMP%\*
51-
powershell -Command "Start-Process -Verb runAs cmd.exe '/c del /f /q /s C:\Android'"
52-
powershell -Command "Start-Process -Verb runAs cmd.exe '/c cleanmgr /sagerun:1'"
53-
docker system prune -af || true
48+
Write-Host "Disk before cleanup:"
49+
Get-PSDrive -PSProvider FileSystem
50+
51+
Write-Host "Removing C:\Android\android-sdk (if present)..."
52+
Remove-Item -Path 'C:\Android\android-sdk' -Recurse -Force -ErrorAction SilentlyContinue
53+
54+
Write-Host "Disk after cleanup:"
55+
Get-PSDrive -PSProvider FileSystem
5456
5557
- uses: actions/checkout@v5
5658
- run: git fetch --prune --unshallow --tags

0 commit comments

Comments
 (0)