ci(docker): identical, more aggressive disk reclaim in both image jobs

The two builds flip-flopped against the runner disk ceiling: CUDA hit
ENOSPC this morning (fixed by adding the reclaim step), then ROCm hit it
this afternoon even WITH the original list. Reclaim everything neither
job can use (~40-45 GB: full hostedtoolcache, swift, boost, global
node_modules, apt cache) and keep the list byte-identical in both jobs
so they can't drift apart again.
This commit is contained in:
debpalash
2026-07-16 21:47:11 +05:30
parent 1c6124b9d5
commit 82ccb9e829
+13 -10
View File
@@ -58,16 +58,17 @@ jobs:
steps:
- uses: actions/checkout@v4
# The CUDA base + torch wheels + build layers no longer fit in the
# runner's default free space (first hit 2026-07-16: `uv pip install`
# died with ENOSPC while the ROCm job — which already had this step —
# passed). Same reclaim as the ROCm job: ~25-30 GB of toolchains this
# job never uses.
# Both image builds run right at the runner's disk ceiling (CUDA hit
# ENOSPC 2026-07-16 morning; ROCm hit it the same afternoon even with
# the original reclaim list). Reclaim everything these jobs can never
# use — ~40-45 GB total. Keep this list identical in both jobs.
- name: Free runner disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/.ghcup /opt/hostedtoolcache/CodeQL
/usr/local/.ghcup /opt/hostedtoolcache /usr/share/swift \
/usr/local/share/boost /usr/local/lib/node_modules
sudo docker image prune --all --force
sudo apt-get clean
df -h /
# QEMU enables cross-platform builds (arm64 on x64 runner).
@@ -168,14 +169,16 @@ jobs:
steps:
- uses: actions/checkout@v4
# The ROCm base plus the built image don't fit in the runner's default
# free space. Drop the preinstalled toolchains this job never uses
# (~25-30 GB reclaimed).
# The ROCm base (~25 GB unpacked) plus build layers need every GB.
# Same reclaim list as the CUDA job above — keep them identical
# (2026-07-16: ROCm hit ENOSPC with the shorter list).
- name: Free runner disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/.ghcup /opt/hostedtoolcache/CodeQL
/usr/local/.ghcup /opt/hostedtoolcache /usr/share/swift \
/usr/local/share/boost /usr/local/lib/node_modules
sudo docker image prune --all --force
sudo apt-get clean
df -h /
- name: Set up Docker Buildx