Skip to content

Free runner disk space before building wheels - #152

Merged
timkpaine merged 1 commit into
mainfrom
tkp/free-disk-space-before-dist
Jul 28, 2026
Merged

Free runner disk space before building wheels#152
timkpaine merged 1 commit into
mainfrom
tkp/free-disk-space-before-dist

Conversation

@timkpaine

Copy link
Copy Markdown
Member

The cibuildwheel container shares the runner's 72G root filesystem with the
host, and the Linux dist step exhausts it before the wheel test install runs:

ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device
cibuildwheel: Command ['pip', 'install', '...whl[develop]'] failed with code 1

Measured on a failing job, at the point the container starts testing:

Free on /
Host, start of Make dist 7.2G of 72G
Container, at test time 168M, 100% full

The container's overlay and the host's /dev/root are the same filesystem.
What consumes the remaining headroom:

  • /project/target — 4.2G, the bind-mounted workspace Rust target dir, already
    populated by the earlier make build / make coverage steps
  • /root/.rustup 756M + /root/.cargo 129M, from before-all installing the
    aarch64 and x86_64 toolchains inside the container
  • /var/lib/docker 4.0K to 2.1G just pulling the manylinux image

Dropping the Android/dotnet/GHC/Swift toolchains, none of which these builds
use, takes free space from 7.2G to 30G. /opt/hostedtoolcache is deliberately
left alone since setup-python's interpreter lives there.

Verified on 1kbgz/crowdsource-admin, which was failing reproducibly: free space
went 7.2G to 30G and Testing wheel... now completes instead of dying.

Applied to the rust and rustjswasm variants only. cpp and cppjswasm
have the same dist step shape, but the three consumers above are Rust-specific,
so I did not want to ship an unvalidated change to variants that may not have
the problem.

Worth noting separately: test-extras = "develop" installs the entire dev
toolchain (uv, ty, ruff, cibuildwheel, twine, bump-my-version, ...) into the
container to run the test suite. That is what pushes disk over the edge, so
narrowing it to a test-only extra would address the cause rather than buy
headroom.

The cibuildwheel container shares the runner's 72G root filesystem, and
the Rust target dir, the in-container rustup toolchains, and the manylinux
image together exhaust it before the wheel test install runs. Dropping the
unused Android/dotnet/GHC/Swift toolchains takes free space from 7G to 30G.

Verified on 1kbgz/crowdsource-admin, which was failing with
'OSError: [Errno 28] No space left on device'.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@timkpaine
timkpaine merged commit b82727f into main Jul 28, 2026
14 checks passed
@timkpaine
timkpaine deleted the tkp/free-disk-space-before-dist branch July 28, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant