Skip to content

Comments

Fix CI disk space issues by running tests sequentially with cleanup#36

Merged
compscidr merged 1 commit intomainfrom
fix/ci-disk-space-issues
Dec 24, 2025
Merged

Fix CI disk space issues by running tests sequentially with cleanup#36
compscidr merged 1 commit intomainfrom
fix/ci-disk-space-issues

Conversation

@compscidr
Copy link
Owner

Summary

  • Fixes disk space exhaustion issues causing java-runner and android-runner molecule tests to fail
  • Runs molecule tests sequentially instead of in parallel to prevent multiple large Docker images from being pulled simultaneously
  • Adds disk cleanup steps to free up ~10-15GB before tests and between tests

Problem

The java-runner and android-runner molecule tests were consistently failing with "no space left on device" errors. Both tests pull the compscidr/github-runner-android image which is ~15GB and includes the full Android SDK/NDK. When running in parallel, GitHub Actions runners (which have ~14GB free initially) run out of space.

Solution

  1. Sequential execution: Added max-parallel: 1 to run tests one at a time
  2. Pre-test cleanup: Remove unused software (.NET SDK, GHC, Boost, agent tools) freeing ~10-15GB
  3. Post-test cleanup: Run docker system prune after each test to ensure space for the next test

Testing

  • This PR will test the fix automatically when CI runs
  • Expected: All molecule tests (default, java-runner, android-runner, org-runner) should pass

Related Issues

Fixes failing PRs: #35, #34, #33, #32, #28

🤖 Generated with Claude Code

The java-runner and android-runner molecule tests were failing due to
running out of disk space on GitHub Actions runners. Both tests pull
the compscidr/github-runner-android image which is ~15GB and includes
the full Android SDK/NDK.

Changes:
- Run molecule tests sequentially (max-parallel: 1) instead of in parallel
- Add disk cleanup step before tests to free up ~10-15GB by removing
  unused software (.NET SDK, GHC, Boost, agent tools)
- Add Docker cleanup after each test to ensure space for next test
- Clean up Docker images and volumes between tests

This ensures each test has sufficient disk space without modifying
the actual runner images or test scenarios.

Fixes failing PRs #35, #34, #33, #32, #28

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings December 24, 2025 06:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes disk space exhaustion issues in GitHub Actions CI that were causing molecule tests to fail. The solution involves running tests sequentially and adding aggressive disk cleanup steps.

  • Configures matrix strategy to run tests sequentially with max-parallel: 1 instead of in parallel
  • Adds pre-test cleanup removing ~10-15GB of unused software (.NET, GHC, Boost, agent tools)
  • Adds post-test Docker cleanup to free space between test runs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo docker system prune -af --volumes
Copy link

Copilot AI Dec 24, 2025

Choose a reason for hiding this comment

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

The docker system prune -af --volumes in the pre-test cleanup step will remove all Docker images and cached layers. Since tests run sequentially with max-parallel: 1, the first test in each job will need to pull all images fresh, but subsequent tests could potentially benefit from reusing layers if this prune is skipped on the first iteration. Consider moving this Docker cleanup to only run in the post-test step, which already cleans up after each test. The filesystem cleanup (dotnet, ghc, boost, agent tools) should be sufficient for the pre-test step.

Suggested change
sudo docker system prune -af --volumes

Copilot uses AI. Check for mistakes.
@compscidr compscidr merged commit 657bf5d into main Dec 24, 2025
11 checks passed
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