-
Notifications
You must be signed in to change notification settings - Fork 24
33 lines (30 loc) · 1.13 KB
/
ios.yml
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
name: iOS
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Get Xcode Version
run: sudo xcode-select -p
- name: Get Swift Version
run: swift --version
- name: Disable SPM Plugin Validation
run: defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
- name: Build
env:
platform: ${{ 'iOS Simulator' }}
run: |
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
xcodebuild build -scheme "Example" -project Example/Example.xcodeproj -destination "platform=$platform,name=$device"