-
-
Notifications
You must be signed in to change notification settings - Fork 655
89 lines (73 loc) · 2.35 KB
/
ci-example-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
name: CI / Example iOS
on:
push:
branches: [main, next]
paths:
- 'src/**'
- 'ios/**'
- 'IapExample/ios/**'
- .github/ci-example-ios.yml
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'src/**'
- 'ios/**'
- 'IapExample/ios/**'
- .github/ci-example-ios.yml
jobs:
build_ios_example:
runs-on: macos-14
env:
NO_FLIPPER: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Install dependencies for `IapExample/`
run: yarn install --immutable
working-directory: IapExample
- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
continue-on-error: true
with:
cache_key: ${{ runner.os }}-buildcache-${{ hashFiles('**/Podfile.lock') }}-${{ hashFiles('**/Podfile')}}
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
working-directory: IapExample
bundler-cache: true
ruby-version: '2.7'
- name: Install SwiftLint
run: brew install swiftlint
- name: SwiftLint
run: swiftlint lint --fix --format ios/*.swift --config .swiftlint.yml
- name: Verify no files have changed after auto-fix
run: git diff --exit-code HEAD '*.swift'
- name: Restore Pods cache
uses: actions/cache@v4
with:
path: |
IapExample/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock')}}-${{ hashFiles('**/Podfile')}}
restore-keys: ${{ runner.os }}-pods-
- name: Install Pods
run: bundle exec pod install
working-directory: IapExample/ios
- name: Install xcpretty
run: gem install xcpretty
working-directory: IapExample/ios
- name: Build App
uses: sersoft-gmbh/xcodebuild-action@v3
with:
workspace: IapExample/ios/IapExample.xcworkspace
scheme: IapExample
sdk: iphonesimulator
destination: 'platform=iOS Simulator,name=iPhone 14'
action: build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO