Skip to content

ci: prune macOS coverage artifacts#3667

Merged
vivekgsharma merged 1 commit into
v3.1-devfrom
ci/prune-macos-runner-disk
May 19, 2026
Merged

ci: prune macOS coverage artifacts#3667
vivekgsharma merged 1 commit into
v3.1-devfrom
ci/prune-macos-runner-disk

Conversation

@vivekgsharma
Copy link
Copy Markdown
Collaborator

@vivekgsharma vivekgsharma commented May 19, 2026

Summary

  • prune stale macOS runner artifacts before Rust tests, including target/llvm-cov-target and old target-backup-before-*-clean-* folders
  • lower the emergency target/ cleanup threshold and also clean when free disk drops below 60GB
  • remove cargo llvm-cov build artifacts after coverage upload so they do not accumulate between self-hosted runner jobs

Validation

  • git diff --check -- .github/workflows/tests-rs-workspace.yml
  • python3 -c 'import pathlib, yaml; yaml.safe_load(pathlib.Path(".github/workflows/tests-rs-workspace.yml").read_text()); print("yaml ok")'

Summary by CodeRabbit

Release Notes

  • Chores
    • Improved CI workflow disk management with enhanced artifact pruning and conditional cleanup of build artifacts on macOS test runners based on disk thresholds
    • Optimized build pipeline reliability through better storage handling

Review Change Stack

@github-actions github-actions Bot added this to the v3.1.0 milestone May 19, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 186cf367-f387-46bb-a889-8a0e93eb7789

📥 Commits

Reviewing files that changed from the base of the PR and between 798cd25 and 0b8e1e9.

📒 Files selected for processing (1)
  • .github/workflows/tests-rs-workspace.yml

📝 Walkthrough

Walkthrough

This PR updates CI runner disk management across two workflow jobs. The macOS test job replaces simple cleanup logic with enhanced disk pruning that removes stale artifacts and conditionally deletes the target directory based on size and available disk thresholds, plus adds end-of-run reporting. The Ubuntu lint job's bash script closure is adjusted for consistency.

Changes

Workflow Enhancements

Layer / File(s) Summary
macOS disk-pruning and cleanup enhancements
.github/workflows/tests-rs-workspace.yml
Replaces the prior "clean target if too large" step with a multi-step disk-pruning approach that prunes stale target-backup-before-*-clean-* and target/llvm-cov-target paths, conditionally deletes target/ when it exceeds a size threshold or available disk drops below a minimum free threshold, and adds an end-of-run cleanup step to remove target/llvm-cov-target and report target size.
Ubuntu lint job bash script adjustment
.github/workflows/tests-rs-workspace.yml
Adjusted the final closure portion of the "Detect immutable structure changes" bash block in the Ubuntu lint job.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • dashpay/platform#3632: Both PRs change GitHub Actions workflow cleanup logic around Rust build artifacts—this PR prunes/deletes target/ on macOS (including target/llvm-cov-target), while the related PR preserves target/ to reuse Apple build outputs.

Suggested reviewers

  • QuantumExplorer

Poem

🐰 Disk space doth grow, like carrots in spring,
So prune the old artifacts, and freshly clean things,
With thresholds and checks, the runners stay spry,
No disk-full disasters shall make our tests cry!

🚥 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 'ci: prune macOS coverage artifacts' accurately summarizes the main objective: pruning macOS runner artifacts and coverage-related files to manage disk space.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/prune-macos-runner-disk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@thepastaclaw
Copy link
Copy Markdown
Collaborator

thepastaclaw commented May 19, 2026

Review Gate

Commit: 0b8e1e9c

  • Debounce: 14m ago (need 30m)

  • CI checks: builds passed, 0/0 tests passed

  • CodeRabbit review: comment found

  • Off-peak hours: off-peak (02:01 AM PT Tuesday)

  • Run review now (check to override)

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.05%. Comparing base (cd93b2f) to head (0b8e1e9).
⚠️ Report is 8 commits behind head on v3.1-dev.

Additional details and impacted files
@@             Coverage Diff              @@
##           v3.1-dev    #3667      +/-   ##
============================================
- Coverage     88.06%   88.05%   -0.01%     
============================================
  Files          2521     2521              
  Lines        308995   308781     -214     
============================================
- Hits         272122   271908     -214     
  Misses        36873    36873              
Components Coverage Δ
dpp 88.01% <ø> (ø)
drive 87.03% <ø> (-0.03%) ⬇️
drive-abci 90.05% <ø> (ø)
sdk ∅ <ø> (∅)
dapi-client ∅ <ø> (∅)
platform-version ∅ <ø> (∅)
platform-value 92.17% <ø> (ø)
platform-wallet ∅ <ø> (∅)
drive-proof-verifier 53.13% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vivekgsharma vivekgsharma merged commit 20ed25c into v3.1-dev May 19, 2026
22 checks passed
@vivekgsharma vivekgsharma deleted the ci/prune-macos-runner-disk branch May 19, 2026 09:00
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.

3 participants