diff --git a/.github/workflows/ios-sim.yml b/.github/workflows/ios-sim.yml index 22628fa600..4bf096cc68 100644 --- a/.github/workflows/ios-sim.yml +++ b/.github/workflows/ios-sim.yml @@ -76,6 +76,9 @@ jobs: xcrun --show-sdk-path ls /Library/Developer/CommandLineTools/SDKs || true + - name: Use the macOS 26 SDK + run: scripts/ci/ios-sim/use-macos26-sdk.sh + # without ~/.cabal, cabal 3.10 keeps its store in XDG directories, not where setup-haskell reports it - name: Use ~/.cabal for cabal run: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" @@ -144,6 +147,9 @@ jobs: xcrun --show-sdk-path ls /Library/Developer/CommandLineTools/SDKs || true + - name: Use the macOS 26 SDK + run: scripts/ci/ios-sim/use-macos26-sdk.sh + - name: Use ~/.cabal for cabal run: echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" @@ -212,6 +218,9 @@ jobs: ls /Library/Developer/CommandLineTools/SDKs || true xcrun simctl list runtimes + - name: Use the macOS 26 SDK + run: scripts/ci/ios-sim/use-macos26-sdk.sh + - name: Download core library uses: actions/download-artifact@v4 with: diff --git a/scripts/ci/ios-sim/use-macos26-sdk.sh b/scripts/ci/ios-sim/use-macos26-sdk.sh new file mode 100755 index 0000000000..d69a6a6af8 --- /dev/null +++ b/scripts/ci/ios-sim/use-macos26-sdk.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Runner images from 20261013 add Command Line Tools whose default SDK is macOS 27, which Xcode 26.6's linker cannot read +# ("tapi error: malformed file"); GHC's links reach it despite DEVELOPER_DIR, so the default goes back to macOS 26.5. + +set -euo pipefail + +sdks=/Library/Developer/CommandLineTools/SDKs +if [ -L "$sdks/MacOSX.sdk" ] && [ -d "$sdks/MacOSX26.5.sdk" ]; then + sudo ln -sfn MacOSX26.5.sdk "$sdks/MacOSX.sdk" +fi +ls -l "$sdks"