Skip to content

Commit ad02f95

Browse files
hjmjohnsonclaude
andcommitted
COMP: Use dynamic Xcode selection instead of hardcoded version
The macos-14 runner no longer has Xcode 14.3.1 installed. Instead of hardcoding a specific Xcode version, detect the latest installed Xcode app dynamically. This approach works across runner updates without needing to track which Xcode versions are pre-installed. xcode-select: error: invalid developer directory '/Applications/Xcode_14.3.1.app' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dacd568 commit ad02f95

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/build-test-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ jobs:
4444
- name: Get specific version of CMake, Ninja
4545
uses: lukka/get-cmake@v3.24.2
4646

47-
- name: Specific XCode version
48-
if: matrix.os == 'macos-14'
47+
- name: Select Xcode
48+
if: startsWith(matrix.os, 'macos')
4949
run: |
50-
sudo xcode-select -s "/Applications/Xcode_14.3.1.app"
50+
XCODE_APP=$(ls -d /Applications/Xcode*.app 2>/dev/null | sort -V | tail -1)
51+
sudo xcode-select -s "${XCODE_APP}/Contents/Developer"
5152
5253
- name: Download ITK
5354
run: |

0 commit comments

Comments
 (0)