Skip to content

chore: add free-disk-space steps to some github actions - #586

Merged
evanspearman merged 1 commit into
mainfrom
evan/free-disk-space
Jun 26, 2026
Merged

chore: add free-disk-space steps to some github actions#586
evanspearman merged 1 commit into
mainfrom
evan/free-disk-space

Conversation

@evanspearman

@evanspearman evanspearman commented Jun 26, 2026

Copy link
Copy Markdown
Member

We were running out of disk space in some CI workflows (see https://github.com/gominimal/minimal/actions/runs/28251278261/job/83703128010?pr=584). We have been using endersonmenezes/free-disk-space to free this in some other instances, so I've added it to a few other good candidates for it as well.

Summary by CodeRabbit

  • Chores
    • Updated multiple CI jobs to reclaim disk space earlier by removing unused preinstalled components and clearing the tool cache before builds and integration tests.
    • Improves reliability on hosted runners by reducing the risk of running out of disk during compilation and caching steps.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7dd05fc7-4378-44cb-bb8c-a5ee0cee9179

📥 Commits

Reviewing files that changed from the base of the PR and between 84ec1cc and 664a505.

📒 Files selected for processing (3)
  • .github/workflows/ci-linux-kvm.yml
  • .github/workflows/ci-netns.yml
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

Three CI workflows add an early disk-cleanup step using endersonmenezes/free-disk-space@v3 before checkout, build, and integration steps.

Changes

CI runner disk cleanup

Layer / File(s) Summary
Add free-disk-space steps to CI jobs
.github/workflows/ci.yml, .github/workflows/ci-netns.yml, .github/workflows/ci-linux-kvm.yml
The three workflows now run endersonmenezes/free-disk-space@v3 early in their jobs, with options to remove Android, .NET, Haskell, and tool cache components as configured per workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

I nibbled the disk space clean and neat,
So CI could hop with lighter feet.
Android, Haskell, .NET took a bow,
The tool cache vanished—look at us now! 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding free-disk-space steps to GitHub Actions workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

112-119: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider enabling remove_tool_cache here too.

The inline comment notes this job has the largest cargo target dir of any Linux job, yet this step omits remove_tool_cache: true while the sibling clippy and test jobs (lines 46-49, 65-68) both enable it. The tool cache (/opt/hostedtoolcache) is ~14 GB, so reclaiming it would give the disk-heaviest job the most headroom. This job has no dtolnay/rust-toolchain step, so verify the build still resolves a Rust toolchain from ~/.rustup/~/.cargo (unaffected by the tool-cache cleanup) before enabling it.

♻️ Optional: reclaim the tool cache for the disk-heaviest job
         with:
           remove_android: true
           remove_dotnet: true
           remove_haskell: true
+          remove_tool_cache: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 112 - 119, Enable tool cache cleanup
in the Free Disk Space step for the disk-heaviest CI job by adding
remove_tool_cache: true to the endersonmenezes/free-disk-space@v3 configuration.
Use the existing clippy and test jobs as the reference pattern, and verify this
job still builds correctly without dtolnay/rust-toolchain because it should
continue resolving Rust from ~/.rustup and ~/.cargo.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 112-119: Enable tool cache cleanup in the Free Disk Space step for
the disk-heaviest CI job by adding remove_tool_cache: true to the
endersonmenezes/free-disk-space@v3 configuration. Use the existing clippy and
test jobs as the reference pattern, and verify this job still builds correctly
without dtolnay/rust-toolchain because it should continue resolving Rust from
~/.rustup and ~/.cargo.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a60f4f6f-f2dc-4d3b-ba8a-7e9807e424de

📥 Commits

Reviewing files that changed from the base of the PR and between bf05ff4 and 84ec1cc.

📒 Files selected for processing (3)
  • .github/workflows/ci-linux-kvm.yml
  • .github/workflows/ci-netns.yml
  • .github/workflows/ci.yml

@evanspearman
evanspearman force-pushed the evan/free-disk-space branch from 84ec1cc to 664a505 Compare June 26, 2026 19:36
@evanspearman
evanspearman merged commit 98b7ae9 into main Jun 26, 2026
37 checks passed
@evanspearman
evanspearman deleted the evan/free-disk-space branch June 26, 2026 19:59
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.

2 participants