From bfca1b29a9c59c794edd1940c59bd0c3bc36a9a9 Mon Sep 17 00:00:00 2001 From: Quinn Dawkins Date: Thu, 12 Mar 2026 16:00:19 -0400 Subject: [PATCH 1/2] [CI] Reclaim more disk space on macOS arm64 runner The macos-14 GitHub-hosted runner has ~320Gi total disk with ~265Gi pre-used by system tools. Only removing the Android SDK (~13Gi) left insufficient free space for building IREE. Remove additional unused SDKs and tools: iOS simulators, .NET SDK, Haskell/GHC, hostedtoolcache, and old Xcode versions. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci_macos_arm64_clang.yml | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_macos_arm64_clang.yml b/.github/workflows/ci_macos_arm64_clang.yml index 653d603c8228..3c78778ba5ee 100644 --- a/.github/workflows/ci_macos_arm64_clang.yml +++ b/.github/workflows/ci_macos_arm64_clang.yml @@ -41,14 +41,29 @@ jobs: python-version: "3.11" cache: "pip" - name: "Reclaim disk space" - # GitHub-hosted runners have 14GB of disk space -- reclaim some by removing SDKs - # we don't need. run: | - echo "Free space before" - df -h + echo "=== Free space before ===" + df -h / + echo "=== Removing unused SDKs and tools ===" + # Android SDK (~13Gi) sudo rm -rf /Users/runner/Library/Android/sdk - echo "Free space after" - df -h + # iOS simulators (~13Gi) + sudo rm -rf /Library/Developer/CoreSimulator/Volumes/iOS_* + # .NET SDK (~3Gi) + sudo rm -rf /usr/local/share/dotnet + # Haskell / GHC (~3Gi) + sudo rm -rf /opt/ghc + # Cached tool archives (~2Gi) + sudo rm -rf /opt/hostedtoolcache + # Old Xcode versions if present (~10Gi+ each) + for xcode in /Applications/Xcode_*.app; do + if [ -d "$xcode" ] && [ "$xcode" != "$(xcode-select -p | sed 's|/Contents/Developer||')" ]; then + echo "Removing unused Xcode: $xcode" + sudo rm -rf "$xcode" + fi + done + echo "=== Free space after ===" + df -h / - name: "Installing Python packages" run: pip install -r runtime/bindings/python/iree/runtime/build_requirements.txt - name: "Installing requirements" From 50202638d09589276ebbc553129f200b023b16f5 Mon Sep 17 00:00:00 2001 From: Quinn Dawkins Date: Thu, 12 Mar 2026 21:38:37 -0400 Subject: [PATCH 2/2] [CI] Fix Xcode deletion to preserve active toolchain Resolve the Xcode.app symlink before comparing, since /Applications/Xcode.app is a symlink to a versioned Xcode_*.app directory. Without resolving, the active Xcode (and its metal toolchain) was being deleted. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci_macos_arm64_clang.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_macos_arm64_clang.yml b/.github/workflows/ci_macos_arm64_clang.yml index 3c78778ba5ee..bad12faabd16 100644 --- a/.github/workflows/ci_macos_arm64_clang.yml +++ b/.github/workflows/ci_macos_arm64_clang.yml @@ -55,9 +55,12 @@ jobs: sudo rm -rf /opt/ghc # Cached tool archives (~2Gi) sudo rm -rf /opt/hostedtoolcache - # Old Xcode versions if present (~10Gi+ each) + # Old Xcode versions if present (~10Gi+ each). + # Resolve the symlink since /Applications/Xcode.app is typically a + # symlink to one of the versioned Xcode_*.app directories. + ACTIVE_XCODE="$(readlink -f "$(xcode-select -p)/../..")" for xcode in /Applications/Xcode_*.app; do - if [ -d "$xcode" ] && [ "$xcode" != "$(xcode-select -p | sed 's|/Contents/Developer||')" ]; then + if [ -d "$xcode" ] && [ "$(readlink -f "$xcode")" != "$ACTIVE_XCODE" ]; then echo "Removing unused Xcode: $xcode" sudo rm -rf "$xcode" fi