Skip to content

Commit

Permalink
release some disk spaces for macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
liudonghua123 committed Sep 9, 2024
1 parent 0a91187 commit 440feb5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ jobs:
- name: Initialization for ${{ env.tag_name }} ...
run: |
echo ok!
- name: Release some disk spaces for macos build, remove old xcode versions ...
if: startsWith(matrix.os, 'macos')
run: |
echo "Disk spaces before cleanup"
sudo df -h
sudo du -sh /*
echo "Searching for Xcode versions:"
find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1
# https://github.com/actions/runner-images/issues/2840#issuecomment-2334584217
echo "Remove all but the latest Xcode..."
find /Applications/ -name "Xcode*" | sort -r | tail --lines=+2 | xargs rm -rf

This comment has been minimized.

Copy link
@Aaron-Ritter

Aaron-Ritter Sep 9, 2024

FYI - I checked and removed only the Xcode_ folders and not the Xcode.app

echo "Available Xcode versions after removal:"
find /Applications -name "Xcode_*" -maxdepth 1 -mindepth 1
echo "Disk spaces after cleanup"
sudo df -h
sudo du -sh /*
- name: Building for linux ...
if: startsWith(matrix.os, 'ubuntu')
run: |
Expand Down

0 comments on commit 440feb5

Please sign in to comment.