From f93858d9629baa29d5ea09acbf8486176adc7407 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 13:16:43 +0200 Subject: [PATCH 1/8] ci: pin xcodes 2.0.3 for iOS runtime installs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The macos-15-xlarge runner's preinstalled xcodes fails to decode Apple's current runtime-downloadables JSON (new `authentication: "none"` value), so every `xcodes runtimes install` step dies before compiling anything. Download the pinned 2.0.3 release binary — verified to decode the current list — and invoke it by explicit path, since sudo's secure_path ignores the job PATH. Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 48dd1aafc..d6aeb5c22 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,7 +50,13 @@ jobs: - name: Install iOS ${{ matrix.sdk }} if: ${{ matrix.installation_required }} - run: sudo xcodes runtimes install "iOS ${{ matrix.sdk }}" + # The runner's preinstalled xcodes is too old to decode Apple's current + # runtime list, so pin one that can. Invoke by explicit path because + # sudo's secure_path ignores the job PATH. + run: | + curl -fsSL -o /tmp/xcodes.zip https://github.com/XcodesOrg/xcodes/releases/download/2.0.3/xcodes.zip + unzip -o /tmp/xcodes.zip -d /tmp + sudo /tmp/xcodes runtimes install "iOS ${{ matrix.sdk }}" - name: Ensure sim exists run: | From de594cb563ce8100cc0c2736f3d2aa1d78a56f89 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 13:35:46 +0200 Subject: [PATCH 2/8] ci: install xcodes via brew instead of curling the release zip Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d6aeb5c22..aee28d7b6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -51,12 +51,11 @@ jobs: - name: Install iOS ${{ matrix.sdk }} if: ${{ matrix.installation_required }} # The runner's preinstalled xcodes is too old to decode Apple's current - # runtime list, so pin one that can. Invoke by explicit path because + # runtime list, so install the latest. Invoke by explicit path because # sudo's secure_path ignores the job PATH. run: | - curl -fsSL -o /tmp/xcodes.zip https://github.com/XcodesOrg/xcodes/releases/download/2.0.3/xcodes.zip - unzip -o /tmp/xcodes.zip -d /tmp - sudo /tmp/xcodes runtimes install "iOS ${{ matrix.sdk }}" + brew install xcodes || brew upgrade xcodes + sudo "$(brew --prefix)/bin/xcodes" runtimes install "iOS ${{ matrix.sdk }}" - name: Ensure sim exists run: | From 15935df1468407c971fd685638f752778c134ccb Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 13:41:16 +0200 Subject: [PATCH 3/8] ci: brew update before upgrading xcodes The runner image's formula index is frozen at image-build time (brew auto-update is disabled), so `brew install`/`upgrade` alone considers the stale xcodes 2.0.2 up-to-date and never installs 2.0.3. Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index aee28d7b6..002eaea41 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -53,8 +53,11 @@ jobs: # The runner's preinstalled xcodes is too old to decode Apple's current # runtime list, so install the latest. Invoke by explicit path because # sudo's secure_path ignores the job PATH. + # (brew update first: the image's formula index is frozen at build time, + # so upgrade alone is a no-op.) run: | - brew install xcodes || brew upgrade xcodes + brew update --quiet + brew upgrade xcodes sudo "$(brew --prefix)/bin/xcodes" runtimes install "iOS ${{ matrix.sdk }}" - name: Ensure sim exists From 5a634ce8f7f5ae0c9319935d7700bd6139c3f99f Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 14:27:16 +0200 Subject: [PATCH 4/8] ci: only upgrade xcodes when older than 2.0.3 Skips the brew update/upgrade once the runner image ships a new enough xcodes. Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 002eaea41..ae7732e23 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,14 +50,15 @@ jobs: - name: Install iOS ${{ matrix.sdk }} if: ${{ matrix.installation_required }} - # The runner's preinstalled xcodes is too old to decode Apple's current - # runtime list, so install the latest. Invoke by explicit path because - # sudo's secure_path ignores the job PATH. - # (brew update first: the image's formula index is frozen at build time, - # so upgrade alone is a no-op.) + # xcodes >= 2.0.3 is needed to decode Apple's current runtime list; the + # runner's preinstalled copy may be older. brew update first because the + # image's formula index is frozen at build time, and invoke by explicit + # path because sudo's secure_path ignores the job PATH. run: | - brew update --quiet - brew upgrade xcodes + if [ "$(printf '2.0.3\n%s' "$(xcodes version)" | sort -V | head -1)" != "2.0.3" ]; then + brew update --quiet + brew upgrade xcodes + fi sudo "$(brew --prefix)/bin/xcodes" runtimes install "iOS ${{ matrix.sdk }}" - name: Ensure sim exists From 5f6dbfbac01965519af0ab0396552cacc875654f Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 14:28:53 +0200 Subject: [PATCH 5/8] ci: make the xcodes version check readable Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ae7732e23..5ec877011 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -55,7 +55,10 @@ jobs: # image's formula index is frozen at build time, and invoke by explicit # path because sudo's secure_path ignores the job PATH. run: | - if [ "$(printf '2.0.3\n%s' "$(xcodes version)" | sort -V | head -1)" != "2.0.3" ]; then + required="2.0.3" + installed="$(xcodes version)" + # sort -C exits 0 when the pair is in version order, i.e. required <= installed + if ! printf '%s\n%s\n' "$required" "$installed" | sort --check=silent --version-sort; then brew update --quiet brew upgrade xcodes fi From 1d370cd6f8f0ebdf2ae5fb417baeaeb9f0be7f14 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 14:42:13 +0200 Subject: [PATCH 6/8] ci: simplify the xcodes version check to an integer comparison Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5ec877011..409194eb5 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -50,15 +50,15 @@ jobs: - name: Install iOS ${{ matrix.sdk }} if: ${{ matrix.installation_required }} - # xcodes >= 2.0.3 is needed to decode Apple's current runtime list; the - # runner's preinstalled copy may be older. brew update first because the - # image's formula index is frozen at build time, and invoke by explicit - # path because sudo's secure_path ignores the job PATH. + # Upgrade xcodes if it's too old to decode Apple's runtime list. + # brew update: the image's formula index is stale without it. + # explicit path: sudo's secure_path ignores the job PATH. run: | - required="2.0.3" - installed="$(xcodes version)" - # sort -C exits 0 when the pair is in version order, i.e. required <= installed - if ! printf '%s\n%s\n' "$required" "$installed" | sort --check=silent --version-sort; then + # ver "2.0.3" -> 2000003, so versions compare as plain integers + ver() { echo "$1" | awk -F. '{ printf("%d%03d%03d", $1, $2, $3) }'; } + required=$(ver "2.0.3") + installed=$(ver "$(xcodes version)") + if [ "$installed" -lt "$required" ]; then brew update --quiet brew upgrade xcodes fi From 1034342371a18d0b9803991616934575046d69fb Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 14:43:34 +0200 Subject: [PATCH 7/8] ci: version-sort the xcodes check and compare the lesser to required Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 409194eb5..41e7d5d1b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -54,11 +54,10 @@ jobs: # brew update: the image's formula index is stale without it. # explicit path: sudo's secure_path ignores the job PATH. run: | - # ver "2.0.3" -> 2000003, so versions compare as plain integers - ver() { echo "$1" | awk -F. '{ printf("%d%03d%03d", $1, $2, $3) }'; } - required=$(ver "2.0.3") - installed=$(ver "$(xcodes version)") - if [ "$installed" -lt "$required" ]; then + required="2.0.3" + installed="$(xcodes version)" + lesser="$(printf '%s\n%s\n' "$required" "$installed" | sort --version-sort | head -1)" + if [ "$lesser" != "$required" ]; then brew update --quiet brew upgrade xcodes fi From df1de3a7e6b69d8d7160f7dcc1ae0c1b3f4fc330 Mon Sep 17 00:00:00 2001 From: Alex Odawa Date: Thu, 9 Jul 2026 15:25:29 +0200 Subject: [PATCH 8/8] ci: check and invoke the same xcodes binary Addresses review feedback: the version check resolved xcodes via the job PATH while the install used the brew path explicitly. Co-Authored-By: Claude Fable 5 --- .github/workflows/tests.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 41e7d5d1b..00613943c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -54,14 +54,15 @@ jobs: # brew update: the image's formula index is stale without it. # explicit path: sudo's secure_path ignores the job PATH. run: | + xcodes="$(brew --prefix)/bin/xcodes" required="2.0.3" - installed="$(xcodes version)" + installed="$("$xcodes" version)" lesser="$(printf '%s\n%s\n' "$required" "$installed" | sort --version-sort | head -1)" if [ "$lesser" != "$required" ]; then brew update --quiet brew upgrade xcodes fi - sudo "$(brew --prefix)/bin/xcodes" runtimes install "iOS ${{ matrix.sdk }}" + sudo "$xcodes" runtimes install "iOS ${{ matrix.sdk }}" - name: Ensure sim exists run: |