diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 63203c6..8110a73 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,11 @@ concurrency: jobs: test: - runs-on: macos-15 + # macos-26 carries Xcode 26.x, which the embedded-Python (Columba) scheme + # needs — the Python.framework clang module map fails to resolve under + # Xcode 16.x ("module 'Python' … not defined in any loaded module map"), + # which is what devs build with locally (26.x). See the Select Xcode step. + runs-on: macos-26 steps: - uses: actions/checkout@v4 @@ -32,11 +36,31 @@ jobs: - name: Select Xcode run: | - XCODE=$(ls -d /Applications/Xcode_16*.app 2>/dev/null | sort -V | tail -1) + echo "Available Xcodes:"; ls -d /Applications/Xcode_*.app 2>/dev/null || true + # Pick the newest Xcode on the runner (was pinned to 16.x, which can't + # build the Python scheme — see runs-on comment). Version-sort so 26.x + # wins over 16.x regardless of exact point release. + XCODE=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -1) echo "Using $XCODE" sudo xcode-select -s "$XCODE" xcodebuild -version + # Resolve the local Swift packages (reticulum-swift / LXMF-swift / LXST-swift) + # once, up front. Without this the `xcodebuild test` action can intermittently + # fail to resolve LXMFSwift/ReticulumSwift for the ColumbaAppTests target even + # though the app build steps resolved them fine — a fresh-runner resolution + # race. One explicit resolve makes every later build/test step reuse it. + - name: Resolve Swift packages + run: | + # Pre-warm both schemes' package deps (same sibling packages, same + # .xcodeproj, but be explicit so the Swift-native build benefits too). + xcodebuild -resolvePackageDependencies \ + -project Columba.xcodeproj \ + -scheme Columba + xcodebuild -resolvePackageDependencies \ + -project Columba.xcodeproj \ + -scheme Columba-Swift + - name: Find simulator id: sim run: |