Skip to content

Commit a45e78e

Browse files
committed
ci(test): reclaim disk space before build to avoid linker SIGBUS
The --all-features suite links hundreds of statically linked test binaries into target/, filling the root disk on stock runners and causing rust-lld to fail with SIGBUS during the mmap-backed link write. Remove unused preinstalled toolchains before the build.
1 parent 5903829 commit a45e78e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,21 @@ jobs:
7575
runs-on: ubuntu-latest
7676
steps:
7777
- uses: actions/checkout@v7
78+
- name: Free disk space
79+
# The --all-features suite links hundreds of statically linked test
80+
# binaries into target/; on a stock runner that fills the root disk,
81+
# and the linker (rust-lld) then fails its mmap-backed output write
82+
# with SIGBUS (signal 7) at link time. Reclaim the large preinstalled
83+
# toolchains this build never uses so the link always has headroom.
84+
run: |
85+
sudo rm -rf \
86+
/usr/local/lib/android \
87+
/usr/share/dotnet \
88+
/opt/ghc /usr/local/.ghcup \
89+
/opt/hostedtoolcache/CodeQL \
90+
/usr/share/swift
91+
sudo docker image prune -af || true
92+
df -h /
7893
- name: Install Rust
7994
uses: dtolnay/rust-toolchain@stable
8095
- uses: Swatinem/rust-cache@v2

0 commit comments

Comments
 (0)