Skip to content

Commit 49bcbaf

Browse files
committed
Mac-specific disk freeing
1 parent f55a417 commit 49bcbaf

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

.github/actions/free-disk/action.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ description: "Free up disk space on workers"
44
runs:
55
using: "composite"
66
steps:
7-
- name: Free disk space
7+
- if: runner.os == 'Linux' # Only works on Linux
8+
name: Free disk space
89
uses: >- # v3.2.2
910
endersonmenezes/free-disk-space@7901478139cff6e9d44df5972fd8ab8fcade4db1
1011
with:
@@ -32,3 +33,21 @@ runs:
3233
/usr/share/glade*
3334
/usr/local/share/chromium
3435
/usr/local/share/powershell
36+
37+
# using hints from https://github.com/actions/runner-images/issues/10511#issuecomment-3984466720
38+
- if: runner.os == 'macOS'
39+
name: Free Disk space
40+
shell: bash
41+
run: |
42+
df -h /
43+
44+
# Remove unnecessary pre-installed tools (saves 5-10GB)
45+
sudo rm -rf /usr/local/share/powershell
46+
sudo rm -rf /usr/local/lib/node_modules
47+
sudo rm -rf /Library/Frameworks/Mono.framework
48+
49+
# Remove unused Xcode simulators (can save 2-5GB each)
50+
xcrun simctl delete unavailable
51+
xcrun simctl runtime list | grep -v "iOS 17" | head
52+
53+
df -h /

0 commit comments

Comments
 (0)