-
Notifications
You must be signed in to change notification settings - Fork 102
89 lines (86 loc) · 2.99 KB
/
xcode.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
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Xcode
on: [push]
jobs:
ios:
name: "Xcode ${{ matrix.env.xcode }}, ${{ matrix.env.runtime }}, ${{ matrix.env.device }}"
runs-on: macOS-14
strategy:
matrix:
env:
- xcode: 15.4
runtime: "iOS 17.5"
device: "iPhone 15 Pro Max"
- xcode: 15.4
runtime: "iOS 16.4"
device: "iPhone 12 mini"
- xcode: 15.4
runtime: "iOS 15.5"
device: "iPhone SE"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Select Xcode ${{ matrix.env.xcode }}"
uses: ./.github/actions/xcode-select
with:
version: ${{ matrix.env.xcode }}
- name: "Cache downloaded simulator runtimes"
uses: actions/cache@v4
with:
path: ~/Downloads/*.dmg
key: Xcode ${{ matrix.env.xcode }}+${{ matrix.env.runtime }}
- name: "Prepare simulator"
id: prepare-simulator
uses: ./.github/actions/prepare-simulator
with:
runtime: ${{ matrix.env.runtime }}
device: ${{ matrix.env.device }}
- name: "Build and test"
run: |
set -o pipefail
xcodebuild test -project "OneTimePassword.xcodeproj" -scheme "OneTimePassword (iOS)" -destination "id=${{ steps.prepare-simulator.outputs.destination-id }}" | xcpretty -c
- uses: sersoft-gmbh/swift-coverage-action@v4
with:
target-name-filter: ^OneTimePassword$
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
watchos:
name: "Xcode ${{ matrix.env.xcode }}, ${{ matrix.env.runtime }}, ${{ matrix.env.device }}"
runs-on: macOS-14
strategy:
matrix:
env:
- xcode: 15.4
runtime: "watchOS 10.5"
device: "Apple Watch Ultra 2 (49mm)"
- xcode: 15.4
runtime: "watchOS 9.4"
device: "Apple Watch SE (44mm) (2nd generation)"
- xcode: 15.4
runtime: "watchOS 8.5"
device: "Apple Watch Series 3 (38mm)"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Select Xcode ${{ matrix.env.xcode }}"
uses: ./.github/actions/xcode-select
with:
version: ${{ matrix.env.xcode }}
- name: "Cache downloaded simulator runtimes"
uses: actions/cache@v4
with:
path: ~/Downloads/*.dmg
key: Xcode ${{ matrix.env.xcode }}+${{ matrix.env.runtime }}
- name: "Prepare simulator"
id: prepare-simulator
uses: ./.github/actions/prepare-simulator
with:
runtime: ${{ matrix.env.runtime }}
device: ${{ matrix.env.device }}
- name: "Build"
run: |
set -o pipefail
xcodebuild build -project "OneTimePassword.xcodeproj" -scheme "OneTimePassword (watchOS)" -destination "id=${{ steps.prepare-simulator.outputs.destination-id }}" | xcpretty -c