Skip to content

Commit 486704c

Browse files
ci: pin EXACT Xcode 26.3 on all macOS jobs (stop per-image newest drift) (#758)
Even with SDKROOT pinned, build-macos failed because the macOS jobs ran on runner images with different *newest* Xcodes: the ogre/assimp producers sometimes resolved Xcode 26.5 (newest on their image) and cached an SDK whose Codec_Assimp/ogre CMake export hardcodes 26.5's libz.tbd path, while the consumer (26.3) couldn't link it. "sort -V | tail -1" is non-deterministic across images. Pin a SPECIFIC Xcode (26.3) that's present on all current macos-latest images, falling back to newest only if absent — so producers and consumer always agree on the SDK. Bump MACOS_CACHE_VERSION → xc263pin to discard the assimp+ogre caches that still carry a 26.5 path. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent dc03896 commit 486704c

1 file changed

Lines changed: 30 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env:
3030
# build, fails with "No rule to make target '.../Xcode_26.5/...libz.tbd'"
3131
# (this broke the 3.9.1 macOS deploy). Bump this whenever the pinned Xcode
3232
# changes so the SDK is rebuilt against it. (xcode263 = under Pin step Xcode 26.3.)
33-
MACOS_CACHE_VERSION: 'sdkpin1'
33+
MACOS_CACHE_VERSION: 'xc263pin'
3434

3535
jobs:
3636
# send-slack-notification:
@@ -1574,11 +1574,20 @@ jobs:
15741574
steps:
15751575
- name: Pin newest stable Xcode (consistent SDK across all macOS jobs)
15761576
run: |
1577-
# All three macOS jobs must use the SAME Xcode/SDK: the OGRE/Assimp
1577+
# All macOS jobs MUST use the SAME exact Xcode/SDK: the OGRE/Assimp
15781578
# builds bake the active SDK's absolute libz.tbd path into their
1579-
# CMake export, and the consumer build links against it. Different
1580-
# default Xcodes per job → "No rule to make target '<SDK>/libz.tbd'".
1581-
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1579+
# CMake export, and the consumer links against it. The per-job runner
1580+
# images carry different *newest* Xcodes (one job got 26.5, another
1581+
# 26.3), so "sort -V | tail -1" (newest) made jobs disagree and the
1582+
# cached SDK's baked path failed to link → "No rule to make target
1583+
# '.../Xcode_XX/...libz.tbd'". Pin a SPECIFIC version present on all
1584+
# current images (26.3); fall back to newest only if it's absent.
1585+
PIN="/Applications/Xcode_26.3.app/Contents/Developer"
1586+
if [ -d "$PIN" ]; then
1587+
DEV="$PIN"
1588+
else
1589+
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1590+
fi
15821591
if [ -z "$DEV" ]; then DEV="$(xcode-select -p)"; fi
15831592
echo "Selected Xcode: $DEV"
15841593
sudo xcode-select -s "$DEV"
@@ -1650,7 +1659,14 @@ jobs:
16501659
steps:
16511660
- name: Pin newest stable Xcode (consistent SDK across all macOS jobs)
16521661
run: |
1653-
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1662+
# Pin a SPECIFIC Xcode present on all macos-latest images (26.3) so
1663+
# producers and consumer agree on the SDK; "newest" drifts per image.
1664+
PIN="/Applications/Xcode_26.3.app/Contents/Developer"
1665+
if [ -d "$PIN" ]; then
1666+
DEV="$PIN"
1667+
else
1668+
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1669+
fi
16541670
if [ -z "$DEV" ]; then DEV="$(xcode-select -p)"; fi
16551671
echo "Selected Xcode: $DEV"
16561672
sudo xcode-select -s "$DEV"
@@ -1731,7 +1747,14 @@ jobs:
17311747
steps:
17321748
- name: Pin newest stable Xcode (consistent SDK across all macOS jobs)
17331749
run: |
1734-
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1750+
# Pin a SPECIFIC Xcode present on all macos-latest images (26.3) so
1751+
# producers and consumer agree on the SDK; "newest" drifts per image.
1752+
PIN="/Applications/Xcode_26.3.app/Contents/Developer"
1753+
if [ -d "$PIN" ]; then
1754+
DEV="$PIN"
1755+
else
1756+
DEV=$(ls -d /Applications/Xcode_*.app/Contents/Developer 2>/dev/null | sort -V | tail -1)
1757+
fi
17351758
if [ -z "$DEV" ]; then DEV="$(xcode-select -p)"; fi
17361759
echo "Selected Xcode: $DEV"
17371760
sudo xcode-select -s "$DEV"

0 commit comments

Comments
 (0)