Files
hapi/.github/workflows/ios.yml
T
weishuandClaude Opus 5.5 4b7a1cff90 ci(ios): build and test with Xcode 27
The iPhone Duo layout uses UIHingeInteraction, which only exists in
the iOS 27.1 SDK. CI ran Xcode 16.4 (iOS 18.5 SDK) on macos-15, so the
app build failed: #available is a runtime check and cannot hide a
symbol the SDK lacks. ChatView's iOS 26/27 modifiers would have failed
next.

Both jobs now run on the xcode-27 runner image (Xcode 27.1 by default),
the toolchain releases are built with. The READMEs state Xcode 27.1 as
the minimum.

Swift 6.4 also timed out type-checking a long `+` chain in
MultipartEncoderTests, so `swift test` failed to build; the expected
body is now joined from an array.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:25:18 +08:00

61 lines
2.2 KiB
YAML

name: ios
on:
push:
branches:
- main
paths:
- 'ios/**'
- 'shared/fixtures/**'
- '.github/workflows/ios.yml'
pull_request:
paths:
- 'ios/**'
- 'shared/fixtures/**'
- '.github/workflows/ios.yml'
concurrency:
group: ios-${{ github.ref }}
cancel-in-progress: true
jobs:
# Xcode 27.1+ is required: the app uses iOS 27.1 SDK APIs (e.g. UIHingeInteraction).
package-tests:
runs-on: xcode-27
steps:
- uses: actions/checkout@v4
- name: Show toolchain versions
run: |
xcodebuild -version
swift --version
- name: Run HapiKit package tests
run: swift test --package-path ios/Packages/HapiKit
app-build:
runs-on: xcode-27
steps:
- uses: actions/checkout@v4
- name: Show toolchain versions
run: xcodebuild -version
- name: Check manual localization catalog
env:
PYTHONDONTWRITEBYTECODE: '1'
run: |
python3 ios/scripts/localizations.py --check
python3 -m unittest discover -s ios/scripts/tests -p 'test_localizations.py'
- name: Build Hapi app for iOS Simulator
run: xcodebuild build -project ios/Hapi.xcodeproj -scheme Hapi -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO
- name: Transcript layout regression tests
run: ios/scripts/test-transcript.sh
- name: iPad navigation and layout regression tests
env:
HAPI_TEST_DEVICE_TYPE: com.apple.CoreSimulator.SimDeviceType.iPad-Air-11-inch-M2
run: >-
ios/scripts/test-transcript.sh
-only-testing:HapiTests/SessionNavigationTests
-only-testing:HapiTests/SessionSplitPresentationTests
-only-testing:HapiTests/TranscriptTypographyTests
-only-testing:HapiTests/TranscriptGeometryTests
- name: Verify localization catalog was not rewritten
run: git diff --exit-code -- ios/Hapi/Resources/Localizable.xcstrings