File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,27 @@ jobs:
195195 fail-on-cache-miss : true
196196 enableCrossOsArchive : true
197197
198+ # To avoid disk space issues on the alpine containers, we clean unused native builds
199+ - name : Clean up unused native builds
200+ if : ${{ contains(matrix.container.image, 'alpine') }}
201+ run : |
202+ echo "Disk usage before cleanup:"
203+ df -h
204+ echo "Native build sizes:"
205+ du -sh src/Sentry/Platforms/Native/sentry-native/build-* 2>/dev/null || echo "No builds found yet"
206+
207+ # Keep only the current RID's native build, remove all others
208+ if [ "${{ matrix.rid }}" = "linux-musl-x64" ]; then
209+ find src/Sentry/Platforms/Native/sentry-native -type d -name "build-*" ! -name "*musl-x64*" -exec rm -rf {} + || true
210+ elif [ "${{ matrix.rid }}" = "linux-musl-arm64" ]; then
211+ find src/Sentry/Platforms/Native/sentry-native -type d -name "build-*" ! -name "*musl-arm64*" -exec rm -rf {} + || true
212+ fi
213+
214+ echo "Disk usage after cleanup:"
215+ df -h
216+ echo "Remaining native builds:"
217+ ls -lh src/Sentry/Platforms/Native/sentry-native/ 2>/dev/null || echo "Directory not found"
218+
198219 - name : Build Native Dependencies
199220 if : ${{ !matrix.container }}
200221 uses : ./.github/actions/buildnative
You can’t perform that action at this time.
0 commit comments