From 1e4d5d5a15608421726bc6c7a785672a5a0b4e58 Mon Sep 17 00:00:00 2001 From: liudonghua Date: Mon, 9 Sep 2024 02:04:55 +0000 Subject: [PATCH] release some disk spaces for macos build see also https://github.com/orgs/community/discussions/137481#discussioncomment-10578608, https://github.com/maxim-lobanov/setup-xcode/issues/84 --- .github/workflows/node-build.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/node-build.yml b/.github/workflows/node-build.yml index 5517c9a..acf8400 100644 --- a/.github/workflows/node-build.yml +++ b/.github/workflows/node-build.yml @@ -114,6 +114,18 @@ jobs: - name: Initialization for ${{ env.tag_name }} ... run: | echo ok! + - name: Release some disk spaces for macos build, initialize latest xcode ... + if: startsWith(matrix.os, 'macos') + uses: maxim-lobanov/setup-xcode@v1.6.0 + - name: Release some disk spaces for macos build, remove old xcode versions ... + if: startsWith(matrix.os, 'macos') + run: | + echo "Searching for Xcode versions:" + find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 + echo "Removing old Xcode versions..." + find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 | grep -v ${{ matrix.xcode }} | xargs rm -rf + echo "Available Xcode versions after removal:" + find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1 - name: Building for linux ... if: startsWith(matrix.os, 'ubuntu') run: |