-
Notifications
You must be signed in to change notification settings - Fork 14
73 lines (64 loc) · 2.09 KB
/
ios.yml
File metadata and controls
73 lines (64 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and run tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and Test SDKHostApp scheme using any available iPhone simulator
# macos-26 is required: only this image's installed Xcodes include
# 26.4.1+, where the stricter protocol-witness availability check
# this PR exists to fix (issue #310) lives. macos-15 tops out at
# Xcode 26.3, which does not exercise the check and would let
# regressions of the @available annotations slip through.
runs-on: macos-26
env:
SCHEME: SDKHostApp
PROJECT: IFTTT SDK.xcodeproj
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Toolchain versions
run: |
xcodebuild -version
swift --version
- name: Install xcbeautify
run: |
if ! command -v xcbeautify >/dev/null 2>&1; then
brew install xcbeautify
fi
- name: Pick iPhone simulator
id: sim
run: |
udid=$(xcrun simctl list devices available --json \
| jq -r '
[ .devices
| to_entries[]
| select(.key | contains("iOS"))
| .value[]
| select((.name | startswith("iPhone")) and .isAvailable == true)
]
| (.[0].udid // empty)
')
if [ -z "$udid" ]; then
echo "No available iPhone simulator found" >&2
exit 1
fi
echo "destination=platform=iOS Simulator,id=$udid" >> "$GITHUB_OUTPUT"
echo "Using simulator $udid"
- name: Build & test
run: |
set -o pipefail
xcodebuild test \
-project "$PROJECT" \
-scheme "$SCHEME" \
-destination "${{ steps.sim.outputs.destination }}" \
| xcbeautify --renderer github-actions