From 89d6486915ba2a2db00d8a007c466e1a3eb542b1 Mon Sep 17 00:00:00 2001 From: Scott Schreckengaust Date: Tue, 26 May 2026 14:54:51 -0700 Subject: [PATCH 1/2] feat(ci): clear disk space on github hosted runners Add a step to free disk space before checkout. --- .github/workflows/build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d04a1c8..2cc07c71 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,18 @@ jobs: # remaining tools that are intentionally skipped here. MISE_DISABLE_TOOLS: "aqua:aquasecurity/trivy,grype,semgrep" steps: + - name: Free Disk Space + shell: bash + run: | + sudo rm -rf \ + /usr/local/lib/android \ + /usr/share/dotnet \ + /opt/hostedtoolcache \ + /opt/ghc \ + /usr/local/.ghcup \ + /usr/local/share/powershell \ + /usr/share/swift \ + /usr/lib/jvm || true - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: From d1b838a88fd9c30f3df5e9d20ab57b67f7f3c023 Mon Sep 17 00:00:00 2001 From: Scott Schreckengaust Date: Tue, 26 May 2026 15:00:09 -0700 Subject: [PATCH 2/2] fix(ci): Update cleanup script in build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed multiple directories from cleanup except hostedtoolcache. ```table ┌──────────────────────────────┬────────────────┬──────────────────────────┬─────────────────────┐ │ Directory │ Size │ Deletion speed │ Keep? │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /usr/local/lib/android │ ~14 GB │ Fast (large files) │ Yes │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /usr/share/dotnet │ ~2.7 GB │ Fast │ Yes │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /opt/hostedtoolcache │ ~5.9 GB │ Moderate (many files) │ Yes │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /opt/ghc + /usr/local/.ghcup │ ~5 GB combined │ Moderate │ Optional │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /usr/share/swift │ ~1.5 GB │ Slow (many object files) │ Drop │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /usr/lib/jvm │ ~1 GB │ Slow (many small files) │ Drop │ ├──────────────────────────────┼────────────────┼──────────────────────────┼─────────────────────┤ │ /usr/local/share/powershell │ ~300 MB │ Fast │ Drop (not worth it) │ └──────────────────────────────┴────────────────┴──────────────────────────┴─────────────────────┘ ``` Trimming to just the top 3 gets ~22 GB in ~10-15 seconds: --- .github/workflows/build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cc07c71..0a7b8b8b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,12 +45,7 @@ jobs: sudo rm -rf \ /usr/local/lib/android \ /usr/share/dotnet \ - /opt/hostedtoolcache \ - /opt/ghc \ - /usr/local/.ghcup \ - /usr/local/share/powershell \ - /usr/share/swift \ - /usr/lib/jvm || true + /opt/hostedtoolcache || true - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: