ci: enhance cleanup-space action for release builds
What changed, and why it matters
This commit only changes a GitHub Actions workflow that deletes unused software from build machines to free up disk space. It is a routine infrastructure/maintenance change and does not modify any wallet, network, or cryptographic code. There is no security issue visible in the diff.
No security action required. Treat as normal CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch expands .github/actions/cleanup-space/action.yml to remove additional pre-installed toolchains, Docker images, apt packages, and caches from GitHub-hosted runners. The stated goal is to reclaim 20-25 GB of disk space so release builds for 15 cross-compilation targets do not run out of space. No application code, secrets, permissions, or network behavior are changed.
Changed components
.github/actions/cleanup-space/action.ymlInspect captured patch +22 / −0
diff --git a/.github/actions/cleanup-space/action.yml b/.github/actions/cleanup-space/action.yml
index 037435f..78b5a75 100644
--- a/.github/actions/cleanup-space/action.yml
+++ b/.github/actions/cleanup-space/action.yml
@@ -8,9 +8,31 @@ runs:
shell: bash
run: |
echo "Removing large toolsets to free up disk space..."
+ echo "Disk space before cleanup:"
+ df -h
+
# Remove dotnet to save disk space.
sudo rm -rf /usr/share/dotnet
# Remove android to save disk space.
sudo rm -rf /usr/local/lib/android
# Remove ghc to save disk space.
sudo rm -rf /opt/ghc
+ # Remove large packages.
+ sudo rm -rf /usr/share/swift
+ sudo rm -rf /usr/local/julia*
+ sudo rm -rf /opt/hostedtoolcache
+
+ # Remove docker images to save space.
+ docker image prune -a -f || true
+
+ # Remove large apt packages.
+ sudo apt-get remove -y '^aspnetcore-.*' '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' '^mysql-.*' azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri 2>/dev/null || true
+ sudo apt-get autoremove -y
+ sudo apt-get clean
+
+ # Remove caches.
+ sudo rm -rf /usr/local/share/boost
+ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
+
+ echo "Disk space after cleanup:"
+ df -h
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.