Skip to content

Commit d867bb3

Browse files
committed
ci: update workflow for Apple apps
1 parent 27fb93c commit d867bb3

4 files changed

Lines changed: 113 additions & 68 deletions

File tree

.github/actions/androidapp-road-test/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ runs:
3434
${{ runner.os }}-android-androidapp-${{ inputs.flavor }}-gradle-
3535
${{ runner.os }}-android-androidapp-gradle-
3636
37+
# == RN app ==
38+
3739
- name: Package AAR with the Brownfield CLI
3840
run: |
3941
cd ${{ inputs.rn-project-path }}
@@ -54,6 +56,8 @@ runs:
5456
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-release.aar
5557
shell: bash
5658

59+
# == AndroidApp ==
60+
5761
- name: Build native Android Brownfield app
5862
run: yarn run build:example:android-consumer:${{ inputs.flavor }}
5963
shell: bash
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Apple road test (selected RN app & AppleApp)
2+
description: Package the given RN app as XCFramework, and build the corresponding AppleApp scheme
3+
4+
inputs:
5+
scheme:
6+
description: 'AppleApp scheme to build (Expo or Vanilla)'
7+
required: true
8+
9+
rn-project-path:
10+
description: 'Path to the RN project to build'
11+
required: true
12+
13+
runs:
14+
using: composite
15+
env:
16+
USE_CCACHE: 1
17+
CCACHE_DIR: ${{ github.workspace }}/.ios_ccache
18+
CCACHE_BASEDIR: ${{ github.workspace }}
19+
CCACHE_COMPRESS: '1'
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
23+
24+
- name: Setup
25+
uses: ./.github/actions/setup
26+
27+
- name: Prepare iOS environment
28+
uses: ./.github/actions/prepare-ios
29+
30+
- name: Install ccache
31+
run: brew install ccache
32+
33+
- name: Enable ccache
34+
run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
35+
36+
- name: Restore RNApp & AppleApp ccache
37+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
38+
with:
39+
path: |
40+
.ios_ccache
41+
key: ${{ runner.os }}-rnapp-appleapp-${{ inputs.scheme }}-ios-ccache-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path), 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }}
42+
restore-keys: |
43+
${{ runner.os }}-rnapp-appleapp-${{ inputs.scheme }}-ios-ccache-
44+
45+
# == RN app ==
46+
47+
- name: Restore Pods cache (RNApp)
48+
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
49+
with:
50+
path: |
51+
${{ inputs.rn-project-path }}/ios/Pods
52+
key: ${{ runner.os }}-rnapp-ios-pods-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path)) }}
53+
restore-keys: |
54+
${{ runner.os }}-rnapp-ios-pods-
55+
56+
- name: Install pods (RNApp)
57+
run: |
58+
cd ${{ inputs.rn-project-path }}/ios
59+
pod install
60+
61+
- name: Restore DerivedData cache (RNApp)
62+
uses: actions/cache@v5
63+
with:
64+
path: ${{ inputs.rn-project-path }}/ios/build
65+
key: ${{ runner.os }}-ios-rnapp-derived-data-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path)) }}
66+
restore-keys: |
67+
${{ runner.os }}-ios-rnapp-derived-data-
68+
69+
- name: Package iOS framework with the Brownfield CLI
70+
run: |
71+
cd ${{ inputs.rn-project-path }}
72+
yarn run brownfield:package:ios
73+
74+
# == AppleApp ==
75+
76+
- name: Build Brownfield iOS native app
77+
run: |
78+
yarn run build:example:ios-consumer
79+
80+
# ==============
81+
82+
- name: Log ccache stats
83+
uses: ./.github/actions/ccache-summary
84+
with:
85+
name: RNApp & AppleApp

.github/workflows/ci.yml

Lines changed: 19 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
runs-on: macos-26
121121
needs: build-lint
122122

123-
env: &ios_env
123+
env:
124124
USE_CCACHE: 1
125125
CCACHE_DIR: ${{ github.workspace }}/.ios_ccache
126126
CCACHE_BASEDIR: ${{ github.workspace }}
@@ -186,76 +186,32 @@ jobs:
186186
with:
187187
name: TesterIntegrated
188188

189-
ios-rnapp-appleapp:
190-
name: iOS road test (RNApp & AppleApp)
191-
runs-on: macos-26
189+
ios-appleapp-vanilla:
190+
name: iOS road test (RNApp & AppleApp - Vanilla)
191+
runs-on: ubuntu-latest
192192
needs: build-lint
193193

194-
env: *ios_env
195-
196194
steps:
197195
- name: Checkout
198196
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
199197

200-
- name: Setup
201-
uses: ./.github/actions/setup
202-
203-
- name: Prepare iOS environment
204-
uses: ./.github/actions/prepare-ios
205-
206-
- name: Install ccache
207-
run: brew install ccache
208-
209-
- name: Enable ccache
210-
run: echo "$(brew --prefix)/opt/ccache/libexec" >> $GITHUB_PATH
211-
212-
- name: Restore RNApp & AppleApp ccache
213-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
214-
with:
215-
path: |
216-
.ios_ccache
217-
key: ${{ runner.os }}-rnapp-appleapp-ios-ccache-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj', 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }}
218-
restore-keys: |
219-
${{ runner.os }}-rnapp-appleapp-ios-ccache-
220-
221-
# == RNApp ==
222-
223-
- name: Restore Pods cache (RNApp)
224-
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
225-
with:
226-
path: |
227-
apps/RNApp/ios/Pods
228-
key: ${{ runner.os }}-rnapp-ios-pods-${{ hashFiles('apps/RNApp/ios/Podfile.lock') }}
229-
restore-keys: |
230-
${{ runner.os }}-rnapp-ios-pods-
231-
232-
- name: Install pods (RNApp)
233-
run: |
234-
cd apps/RNApp/ios
235-
pod install
236-
237-
- name: Restore DerivedData cache (RNApp)
238-
uses: actions/cache@v5
198+
- name: Run RNApp -> AppleApp road test (Vanilla)
199+
uses: ./.github/actions/appleapp-road-test
239200
with:
240-
path: apps/RNApp/ios/build
241-
key: ${{ runner.os }}-ios-rnapp-derived-data-${{ hashFiles('apps/RNApp/ios/Podfile.lock', 'apps/RNApp/ios/RNApp.xcodeproj/project.pbxproj') }}
242-
restore-keys: |
243-
${{ runner.os }}-ios-rnapp-derived-data-
244-
245-
- name: Package iOS framework with the Brownfield CLI
246-
run: |
247-
cd apps/RNApp
248-
yarn run brownfield:package:ios
249-
250-
# == AppleApp ==
201+
scheme: vanilla
202+
rn-project-path: apps/RNApp
251203

252-
- name: Build Brownfield iOS native app
253-
run: |
254-
yarn run build:example:ios-consumer
204+
ios-appleapp-expo:
205+
name: iOS road test (RNApp & AppleApp - Expo)
206+
runs-on: ubuntu-latest
207+
needs: build-lint
255208

256-
# ==============
209+
steps:
210+
- name: Checkout
211+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
257212

258-
- name: Log ccache stats
259-
uses: ./.github/actions/ccache-summary
213+
- name: Run RNApp -> AppleApp road test (Expo)
214+
uses: ./.github/actions/appleapp-road-test
260215
with:
261-
name: RNApp & AppleApp
216+
scheme: expo
217+
rn-project-path: apps/RNApp

apps/RNApp/ios/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- boost (1.84.0)
3-
- Brownie (0.0.2):
3+
- Brownie (0.0.5):
44
- boost
55
- DoubleConversion
66
- fast_float
@@ -2350,7 +2350,7 @@ PODS:
23502350
- SocketRocket
23512351
- ReactAppDependencyProvider (0.82.1):
23522352
- ReactCodegen
2353-
- ReactBrownfield (2.0.2):
2353+
- ReactBrownfield (2.2.0):
23542354
- boost
23552355
- DoubleConversion
23562356
- fast_float
@@ -2772,7 +2772,7 @@ EXTERNAL SOURCES:
27722772

27732773
SPEC CHECKSUMS:
27742774
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
2775-
Brownie: 7d61f137d29184655ce5a523c68dd97dc1a7ef3f
2775+
Brownie: e4291b884a7157a2dbe6d60dd72e962078223791
27762776
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
27772777
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
27782778
FBLazyVector: 0aa6183b9afe3c31fc65b5d1eeef1f3c19b63bfa
@@ -2843,7 +2843,7 @@ SPEC CHECKSUMS:
28432843
React-utils: f06ff240e06e2bd4b34e48f1b34cac00866e8979
28442844
React-webperformancenativemodule: b3398f8175fa96d992c071b1fa59bd6f9646b840
28452845
ReactAppDependencyProvider: a45ef34bb22dc1c9b2ac1f74167d9a28af961176
2846-
ReactBrownfield: 448b985beafcc7db2a2794df9e950907cb49a373
2846+
ReactBrownfield: 65d6bf15ccb7501d3982ec05f8d37b697e9b3480
28472847
ReactCodegen: 0bce2d209e2e802589f4c5ff76d21618200e74cb
28482848
ReactCommon: 801eff8cb9c940c04d3a89ce399c343ee3eff654
28492849
RNScreens: d6413aeb1878cdafd3c721e2c5218faf5d5d3b13
@@ -2852,4 +2852,4 @@ SPEC CHECKSUMS:
28522852

28532853
PODFILE CHECKSUM: 7c116a16dd0744063c8c6293dbfc638c9d447c19
28542854

2855-
COCOAPODS: 1.16.2
2855+
COCOAPODS: 1.15.2

0 commit comments

Comments
 (0)