diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6538120e5e52..0e7bbe095c64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,18 +10,37 @@ jobs: strategy: fail-fast: false steps: - - name: free disk space + - name: Aggressive Disk Space Cleanup 🧹 run: | + # 0. Check available space before cleanup + echo "Disk space before cleanup:" + df -h + + # 1. Clear out swap space. sudo swapoff -a sudo rm -f /swapfile sudo apt clean - docker image prune -a -f + + # 2. Aggressively remove unused Docker components (superset of `docker image prune -a -f`). + docker system prune --all --force --volumes + + # Note: We only need Python and we need more space. + + echo "Removing .NET SDK" + sudo rm -rf /usr/share/dotnet + + echo "Removing Android SDKs" + sudo rm -rf /usr/local/lib/android + + # 3. Check available space after cleanup to verify effectiveness + echo "Disk space after aggressive cleanup:" df -h + - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -30,7 +49,7 @@ jobs: working-directory: ./update run: | python update_symbols.py - - name: commit + - name: commit run: | git add . git diff --staged --quiet || git -c user.name='GitHub Actions Bot' -c user.email='<>' commit -m 'Update Symbols'