COMP: Free disk space between build and test in Pixi CI#6011
COMP: Free disk space between build and test in Pixi CI#6011hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| .github/workflows/pixi.yml | Moves existing .o/.a cleanup into a dedicated step and adds tarball/source-dir removal and ccache trim to free disk space before testing; logic is correct but contains a misleading comment on ccache --cleanup and uses a broad glob for source directory removal. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub Actions
participant Runner as ubuntu-22.04 Runner
participant FS as Filesystem
GH->>Runner: Checkout
GH->>Runner: Install ccache
GH->>Runner: Restore compiler cache
GH->>Runner: Free Disk Space (Ubuntu)
GH->>Runner: Download testing data
Runner->>FS: curl InsightData-*.tar.gz (save ~200MB)
Runner->>FS: cmake -E tar xfz (extract InsightToolkit-X.Y.Z/)
Runner->>FS: cmake -E rename .ExternalData/CID to workspace
GH->>Runner: Configure (pixi run configure-ci)
GH->>Runner: Build (pixi run build)
Runner->>FS: Produces build/ with .o .a binaries
GH->>Runner: Free disk space after build [NEW STEP]
Runner->>FS: find build -delete *.o *.a
Runner->>FS: rm -f InsightData-*.tar.gz
Runner->>FS: rm -rf InsightToolkit-*
Runner->>FS: ccache --cleanup (trim to CCACHE_MAXSIZE)
Runner->>GH: df -h / (post-cleanup report)
GH->>Runner: Test (pixi run test)
GH->>Runner: Save compiler cache
Reviews (1): Last reviewed commit: "COMP: Free disk space between build and ..." | Re-trigger Greptile
- Use ExternalDataVersion variable instead of broad InsightToolkit-* glob for source directory removal. - Fix misleading ccache --cleanup comment: it trims the cache to stay within CCACHE_MAXSIZE, not "flush to persistent cache dir". Addresses review comments from @greptile-apps on PR InsightSoftwareConsortium#6011. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The ubuntu-22.04 runner runs out of disk space during the Test step after a ~2 hour build. The runner has 146GB total and the build tree plus build artifacts can exceed available space, causing the runner to be killed mid-test with no error message. Move the .o/.a cleanup to a dedicated step and add additional cleanup: - Remove InsightData tarball (~200MB, already extracted) - Remove extracted source tarball directory - Flush ccache temp files - Report disk usage after cleanup for diagnostics Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
337f2e4 to
855276a
Compare
|
Addressed both review comments (squashed into the single commit):
|
Analysis: applicability to other CI systemsReviewed all other CI configurations — the disk space cleanup in this PR is specific to
The disk pressure issue is specific to |
No. Two separate items. (both related disk space optimization). This clears disk space before the tests start running in CI only. #6013 is about clearing huge disk usage in all environments (including the 50GB * Debug/Release * clang/Apple Clang = 200GB) in my mac laptop build environments. |
Problem
The
Pixi-Cxx (ubuntu-22.04)job intermittently fails during the Test step with no error message — the runner is killed mid-test due to disk space exhaustion. The runner has 146GB total, and after a ~2 hour ITK build the remaining space is insufficient for CTest to run.This affects PRs #6007, #6009, #6010 (and likely others). The successful main branch build completed in 2h07m, while failing PR builds ran 2h08m-2h55m before being killed ~3-4 minutes into testing.
Fix
Move the existing
.o/.acleanup to a dedicated "Free disk space after build" step and add additional cleanup:InsightData-*.tar.gzdownload (~200MB, already extracted)InsightToolkit-*source directorydf -hafter cleanup for diagnosticsImpact
No functional change — the removed files are not needed for testing. The
.ofiles were already being deleted; this adds the tarball and source directory cleanup.🤖 Generated with Claude Code