Skip to content

ci(test): reclaim ubuntu runner disk + drop test debug-info#295

Merged
coseto6125 merged 1 commit into
mainfrom
chore/ci-disk-hygiene
May 21, 2026
Merged

ci(test): reclaim ubuntu runner disk + drop test debug-info#295
coseto6125 merged 1 commit into
mainfrom
chore/ci-disk-hygiene

Conversation

@coseto6125
Copy link
Copy Markdown
Owner

@coseto6125 coseto6125 commented May 21, 2026

Why

PR #291 (T4-7 MirrorsField) hit a misleading CI failure on ubuntu-latest
(run 26240379100):

error: failed to build archive at `.../libtantivy-895456c1b8c7e622.rlib`:
  No space left on device (os error 28)
error: could not compile `ecp-analyzer` (test "callmeta_c_cpp") due to 1 previous error

Root cause: runner disk exhaustion, not a code bug. macOS test passed,
clippy/audit passed. The "test callmeta_c_cpp" line is a cascading cargo
report — the actual linker failure was os error 28.

The math: 14 tree-sitter parsers × ~30 test binaries × default debug-info
(true) ≈ 30 GB in target/debug/deps/. Default ubuntu runner free disk
is ~14 GB. Inevitable as the workspace grew.

What

Two stacked mitigations, both ubuntu-targeted but the env var applies to
all OSes since it's harmless elsewhere:

  1. jlumbroso/free-disk-space step before checkout (ubuntu-only)
    reclaims ~30 GB by dropping tool-cache + android SDK + dotnet + haskell.
    large-packages left off — adds ~5 min for ~1 GB. swap-storage off —
    risky if any step needs swap. Action pinned to v1.3.1 SHA per repo
    convention (matches step-security/harden-runner, actions/checkout).
  2. Job-level CARGO_PROFILE_TEST_DEBUG=0 drops DWARF symbols from
    test binaries (~70 % size reduction). Assertions and overflow checks
    stay on; only stack-trace symbolication is lost — cargo nextest
    output already includes test names + file:line via panic hooks, so
    diagnostic value is preserved.

Combined: ~14 GB baseline + ~30 GB reclaimed − ~9 GB build ≈ ~35 GB
buffer. Future language / dependency growth has headroom.

Test plan

Notes

Ubuntu CI was hitting os error 28 (No space left on device) at link
time — 14 tree-sitter parsers × 30+ test binaries × default debug-info
filled the runner's 14 GB free space (last seen on PR #291 run 26240379100,
tantivy.rlib link failed mid-cascade with callmeta_c_cpp misreported as
the failing test).

Two stacked mitigations:

1. Ubuntu-only `jlumbroso/free-disk-space` step before checkout — drops
   tool-cache + android + dotnet + haskell, reclaiming ~30 GB. macOS &
   windows have 50+ GB free by default; skipped there.
2. Job-level `CARGO_PROFILE_TEST_DEBUG=0` — shrinks target/debug/deps/
   roughly 70%. Assertions stay on; only DWARF data is dropped.
@coseto6125 coseto6125 enabled auto-merge (squash) May 21, 2026 17:13
@coseto6125 coseto6125 disabled auto-merge May 21, 2026 17:13
@coseto6125 coseto6125 enabled auto-merge (squash) May 21, 2026 17:14
@coseto6125 coseto6125 merged commit 6f8703f into main May 21, 2026
13 checks passed
@coseto6125 coseto6125 deleted the chore/ci-disk-hygiene branch May 21, 2026 17:41
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