From bb0c04b0795f12cd4b6ce104ab17818b26a174c2 Mon Sep 17 00:00:00 2001 From: jakecastelli <38635403+jakecastelli@users.noreply.github.com> Date: Sat, 31 Aug 2024 02:51:09 +0930 Subject: [PATCH] build: reclaim disk space on macOS GHA runner Refs: https://github.com/nodejs/build/issues/3878 PR-URL: https://github.com/nodejs/node/pull/54658 Reviewed-By: Richard Lau Reviewed-By: Yagiz Nizipli --- .github/workflows/test-macos.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 88ede2e04af774..c64676978d11fa 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -65,6 +65,20 @@ jobs: # information.) - name: tools/doc/node_modules workaround run: make tools/doc/node_modules + # This is needed due to https://github.com/nodejs/build/issues/3878 + - name: Cleanup + run: | + echo "::group::Free space before cleanup" + df -h + echo "::endgroup::" + echo "::group::Cleaned Files" + + sudo rm -rfv /Users/runner/Library/Android/sdk + + echo "::endgroup::" + echo "::group::Free space after cleanup" + df -h + echo "::endgroup::" - name: Build run: make build-ci -j$(getconf _NPROCESSORS_ONLN) V=1 CONFIG_FLAGS="--error-on-warn" - name: Test