-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (71 loc) · 2.38 KB
/
build-example.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
name: Build Example
on:
push:
branches: [ develop ]
pull_request:
branches: [ main ]
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
PROJECT_DIR: Example
PROJECT_NAME: Example.xcodeproj
iOSSCHEME: Example (iOS)
OSXSCHEME: Example
TVSCHEME: Example
WATCHSCHEME: Example
jobs:
build-iOS-example:
name: Build iOS examples
runs-on: macOS-latest
strategy:
matrix:
iosDestination: ['platform=iOS Simulator,OS=15.0,name=iPhone 8','platform=iOS Simulator,OS=15.5,name=iPhone X','platform=iOS Simulator,OS=16.0,name=iPhone 14']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build iOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.iOSSCHEME }}" | xcpretty
env:
destination: ${{ matrix.iosDestination }}
build-macOS-example:
name: Build macOS examples
runs-on: macOS-latest
strategy:
matrix:
macOSDestination: ["platform=macOS,arch=x86_64"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build macOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.OSXSCHEME }}" | xcpretty
env:
destination: ${{ matrix.macOSDestination }}
build-tvOS-example:
name: Build tvOS examples
runs-on: macOS-latest
strategy:
matrix:
tvOSDestination: ["platform=tvOS Simulator,name=Apple TV 4K"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build tvOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.TVSCHEME }}" | xcpretty
env:
destination: ${{ matrix.tvOSDestination }}
build-watchOS-example:
name: Build watchOS examples
runs-on: macOS-latest
strategy:
matrix:
watchOSdestination: ['platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build watchOS
run: |
xcodebuild clean build -project "${{ env.PROJECT_DIR }}/${{ env.PROJECT_NAME }}" -scheme "${{ env.WATCHSCHEME }}" | xcpretty
env:
destination: ${{ matrix.watchOSdestination }}