Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/scripts/free-disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Reclaim disk on GitHub-hosted ubuntu runners before a heavy Cargo build.
#
# `cargo test --all-features` (and `cargo llvm-cov`) link the full
# DataFusion-heavy workspace plus every integration-test binary with debug
# info; the resulting target/ outgrew ubuntu-latest's ~14 GiB root disk and
# failed mid-link with "No space left on device (os error 28)". The big
# preinstalled SDKs below (Android alone is ~9 GiB) are unused by this Rust
# workspace, so removing them buys ample headroom without a third-party
# action (keeping the SHA-pinned-actions / Scorecard posture intact).
set -euo pipefail

echo "Disk before:"
df -h /

# `|| true`: the set is best-effort — a missing dir on a future image must
# not fail the build (the goal is headroom, not a specific layout).
sudo rm -rf \
/usr/local/lib/android \
/usr/share/dotnet \
/opt/ghc \
/usr/local/.ghcup \
/opt/hostedtoolcache/CodeQL \
/usr/local/share/boost || true

echo "Disk after:"
df -h /
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Free runner disk space
run: .github/scripts/free-disk-space.sh
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master (pinned); channel via toolchain input
with:
toolchain: stable
Expand Down Expand Up @@ -218,6 +220,8 @@ jobs:
contents: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Free runner disk space
run: .github/scripts/free-disk-space.sh
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 # master (pinned); channel via toolchain input
with:
toolchain: stable
Expand Down
Loading