From 3d563794af0231d3249e1ca0da51dd069353ec0e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 12 Jun 2026 06:11:15 +0000 Subject: [PATCH] docker ci: aggressive runner disk reclaim before image builds A staging run of the studio image build died with ENOSPC during the Studio venv install: the hosted runners' default free space does not fit the base image plus buildkit state plus the Studio layer. Drop all unused preinstalled toolchains and the runner's preloaded docker images in both build jobs. --- .github/workflows/docker-publish.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 8b0794b4ee..c5ce565e5e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -90,8 +90,19 @@ jobs: # arm64 image lacks /usr/share/dotnet, hence `|| true`. - name: Reclaim disk run: | + # The hosted runners keep ~14-20 GB free, which is not enough for + # the image plus buildkit state (empirically confirmed: the Studio + # layer install died with ENOSPC on a staging run before this list + # was extended). None of these preinstalled toolchains are used + # here; some paths differ between the amd64 and arm64 runner + # images, hence `|| true`. sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ - /opt/hostedtoolcache/CodeQL "$AGENT_TOOLSDIRECTORY" || true + /opt/hostedtoolcache "$AGENT_TOOLSDIRECTORY" \ + /usr/local/.ghcup /usr/share/swift \ + /usr/local/share/powershell /usr/local/lib/node_modules \ + /usr/local/julia* /opt/microsoft /usr/share/miniconda \ + /opt/az /usr/local/share/boost /usr/local/share/chromium || true + sudo docker image prune -af >/dev/null 2>&1 || true df -h / - uses: docker/setup-buildx-action@v3 @@ -277,8 +288,19 @@ jobs: - name: Reclaim disk run: | + # The hosted runners keep ~14-20 GB free, which is not enough for + # the image plus buildkit state (empirically confirmed: the Studio + # layer install died with ENOSPC on a staging run before this list + # was extended). None of these preinstalled toolchains are used + # here; some paths differ between the amd64 and arm64 runner + # images, hence `|| true`. sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \ - /opt/hostedtoolcache/CodeQL "$AGENT_TOOLSDIRECTORY" || true + /opt/hostedtoolcache "$AGENT_TOOLSDIRECTORY" \ + /usr/local/.ghcup /usr/share/swift \ + /usr/local/share/powershell /usr/local/lib/node_modules \ + /usr/local/julia* /opt/microsoft /usr/share/miniconda \ + /opt/az /usr/local/share/boost /usr/local/share/chromium || true + sudo docker image prune -af >/dev/null 2>&1 || true df -h / - uses: docker/setup-buildx-action@v3