Skip to content

ci(test): free runner disk space before the unit-test build (fixes ENOSPC on main)#6089

Merged
houko merged 2 commits into
mainfrom
ci/unit-job-free-disk
Jun 11, 2026
Merged

ci(test): free runner disk space before the unit-test build (fixes ENOSPC on main)#6089
houko merged 2 commits into
mainfrom
ci/unit-job-free-disk

Conversation

@houko

@houko houko commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Problem

Test / Unit (lib+bin) failed on the push-to-main run after #6083 merged — not a test failure, a disk-full failure:

rustc-LLVM ERROR: IO failure on output stream: No space left on device
error: failed to build archive at `.../liblibrefang_desktop.a`: No space left on device (os error 28)

The job's full-run path is cargo nextest run --workspace -E 'kind(lib) | kind(bin)', which debug-compiles every lib+bin target in the workspace (including librefang-desktop's large static archive).
ubuntu-latest leaves only ~14 GB free, the build overruns it, and the linker dies before any test runs.
The job had no disk-cleanup step.

#6081 already added exactly this cleanup to the nix-build job, but it only touched nix-build.yml — the Unit job stayed exposed and is the one that just took down main.

Fix

Add a Free runner disk space step (right after checkout) to the Unit job, identical to #6081's: delete preinstalled toolchains the job never uses (dotnet, Android SDK, GHC, CodeQL, docker images), reclaiming ~25 GB before the build, and print df -h / before and after so the reclaimed space shows in the log.

Scope / notes

Verification

The `Test / Unit (lib+bin)` job's full-run path runs `cargo nextest run --workspace -E 'kind(lib) | kind(bin)'`, which debug-compiles every lib+bin target in the workspace — including librefang-desktop's large static archive — on an ubuntu-latest runner that leaves only ~14 GB free.
The build overruns the disk and the link step dies with "No space left on device" (`rustc-LLVM ERROR: IO failure on output stream`), failing the job before a single test runs.

Add a Free-runner-disk-space step (after checkout) that removes preinstalled toolchains this job never uses — dotnet, Android SDK, GHC, CodeQL, docker images — reclaiming ~25 GB.
This mirrors the fix the nix-build job received in #6081; that PR only touched nix-build.yml, leaving the Unit job exposed.

Verified: ci.yml still parses as valid YAML.
@github-actions github-actions Bot added size/S 10-49 lines changed area/ci CI/CD and build tooling no-rust-required This task does not require Rust knowledge and removed size/S 10-49 lines changed labels Jun 11, 2026
@houko
houko enabled auto-merge (squash) June 11, 2026 13:29
The comment block added in this PR was hard-wrapped at ~72 characters,
splitting sentences across lines.
CLAUDE.md requires prose line breaks only at sentence boundaries.
@github-actions github-actions Bot added the size/XS < 10 lines changed label Jun 11, 2026
@houko
houko merged commit ab179e3 into main Jun 11, 2026
31 checks passed
@houko
houko deleted the ci/unit-job-free-disk branch June 11, 2026 13:39
houko added a commit that referenced this pull request Jun 15, 2026
…fixes ENOSPC on main) (#6112)

* ci(test): free runner disk space before the integration shard build (fixes ENOSPC on main)

The `Test / Ubuntu (shard N/4)` job's full-run path runs `cargo test --workspace --no-run`, which debug-compiles every workspace test binary — each `tests/*.rs` is its own executable, plus dev-dependencies and librefang-desktop's large static archive — on an ubuntu-latest runner that leaves only ~14 GB free.
All four full-run shards do this same heavy build, so the disk sits at the margin: shard 1/4 overran it on main and the runner died with "No space left on device" mid-build, before any test ran.

Add a Free-runner-disk-space step (gated on the same selective-lane skip as the rest of the job) that removes preinstalled toolchains this job never uses — dotnet, Android SDK, GHC, CodeQL, docker images — reclaiming ~25 GB.
This extends the same fix the unit-test job got in #6089 and nix-build got in #6081 to the integration shard lane, the last full-workspace Ubuntu build still exposed.

Verified: ci.yml still parses as valid YAML.

* ci(test): trim integration-shard disk-free comment to one line

Two-line comment block condensed to one short line per project style rules.
The PR body carries the full context; inline comments reference only the
non-obvious constraint (disk headroom).

---------

Co-authored-by: Evan <[email protected]>
Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci CI/CD and build tooling no-rust-required This task does not require Rust knowledge size/XS < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants