-
Notifications
You must be signed in to change notification settings - Fork 20
32 lines (25 loc) · 1.17 KB
/
build.yml
File metadata and controls
32 lines (25 loc) · 1.17 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
name: Build
on:
push:
branches-ignore:
- master
jobs:
build:
runs-on: macOS-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: |
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
echo "latest_iphone: $latest_iphone"
xcodebuild build -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"
- name: Test
run: |
iphone_names=$(xcrun simctl list devices available --json | jq -r '.devices | to_entries[] | .value[] | select(.name | test("^iPhone [0-9]+")) | .name')
if [ -z "$iphone_names" ]; then echo "Error: No iPhone simulators found."; exit 1; fi
latest_iphone=$(echo "$iphone_names" | sort | tail -n 1)
echo "latest_iphone: $latest_iphone"
xcodebuild test -scheme GeoPackage -destination "platform=iOS Simulator,OS=latest,name=$latest_iphone"