Skip to content

Commit 6a1ff03

Browse files
Save disk space by removing unused Xcode installations
1 parent 78fd631 commit 6a1ff03

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/distribute-toolchain.yml

+11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ jobs:
6161
DARWIN_TOOLCHAIN_INSTALLER_CERT_BASE64: ${{ secrets.DARWIN_TOOLCHAIN_INSTALLER_CERT_BASE64 }}
6262
DARWIN_TOOLCHAIN_INSTALLER_CERT_PASSWORD: ${{ secrets.DARWIN_TOOLCHAIN_INSTALLER_CERT_PASSWORD }}
6363

64+
- name: Free disk space by removing unused Xcode
65+
run: |
66+
IN_USE_XCODE=$(xcode-select -p)
67+
echo "Removing all Xcode installations except $IN_USE_XCODE"
68+
for xcode in /Applications/Xcode*.app; do
69+
if [[ $IN_USE_XCODE != "$xcode"* ]]; then
70+
echo "Removing $xcode"
71+
rm -rf $xcode
72+
fi
73+
done
74+
6475
- run: ./tools/gh-distribute-toolchain --scheme ${{ inputs.scheme }} --verbose --skip-history ${{ inputs.run-id }}
6576
working-directory: ./swiftwasm-build
6677
env:

0 commit comments

Comments
 (0)