-
Notifications
You must be signed in to change notification settings - Fork 24
113 lines (91 loc) · 3.06 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
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: iOS CI
on:
push:
branches: [ "*" ]
pull_request:
branches: [ main ]
jobs:
build-ferrostar:
runs-on: macos-14
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build iOS XCFramework
run: ./build-ios.sh --release
working-directory: common
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: libferrostar-rs.xcframework.zip
path: common/target/ios/libferrostar-rs.xcframework.zip
retention-days: 5
build-demo:
runs-on: macos-14
needs: build-ferrostar
strategy:
matrix:
scheme: [
"iOS Demo"
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure Package.swift for local development
run: sed -i '' 's/let useLocalFramework = false/let useLocalFramework = true/' Package.swift
- name: Download libferrostar-rs.xcframework.
uses: actions/download-artifact@v4
with:
path: common
name: libferrostar-rs.xcframework.zip
- name: Unzip libferrostar-rs.xcframework
run: unzip libferrostar-rs.xcframework.zip
working-directory: common
- name: Install xcbeautify
run: brew install xcbeautify
- name: Rename API-Keys.plist template
run: mv apple/DemoApp/API-Keys.plist.template apple/DemoApp/API-Keys.plist
- name: Build ${{ matrix.scheme }}
run: xcodebuild -scheme "${{ matrix.scheme }}" build -configuration Debug -skipMacroValidation \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | xcbeautify && exit ${PIPESTATUS[0]}
working-directory: apple/DemoApp
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: Demo-Package.swift
path: Package.swift
retention-days: 5
test:
runs-on: macos-14
needs: build-ferrostar
strategy:
matrix:
scheme: [
FerrostarCore-Package
]
destination: [
# TODO: Add more destinations
'platform=iOS Simulator,name=iPhone 15,OS=17.0.1'
]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure Package.swift for local development
run: sed -i '' 's/let useLocalFramework = false/let useLocalFramework = true/' Package.swift
- name: Download libferrostar-rs.xcframework.
uses: actions/download-artifact@v4
with:
path: common
name: libferrostar-rs.xcframework.zip
- name: Unzip libferrostar-rs.xcframework
run: unzip libferrostar-rs.xcframework.zip
working-directory: common
- name: Install xcbeautify
run: brew install xcbeautify
- name: Test ${{ matrix.scheme }} on ${{ matrix.destination }}
run: xcodebuild -scheme ${{ matrix.scheme }} test -skipMacroValidation -destination '${{ matrix.destination }}' | xcbeautify && exit ${PIPESTATUS[0]}
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: Library-Package.swift
path: Package.swift
retention-days: 5