-
Notifications
You must be signed in to change notification settings - Fork 5
27 lines (24 loc) · 883 Bytes
/
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
name: iOS Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest
env:
scheme: 'SBQuickLook'
platform: ${{ 'iOS Simulator' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
xcodebuild -scheme "$scheme" -destination "platform=$platform,name=$device"
- name: Test
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
xcodebuild test -scheme "$scheme" -destination "platform=$platform,name=$device"