Skip to content

Commit acdc6ac

Browse files
committed
Add ios Ci step
1 parent 1cb5a12 commit acdc6ac

File tree

1 file changed

+37
-21
lines changed

1 file changed

+37
-21
lines changed

.github/workflows/test.yml

+37-21
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,59 @@ jobs:
2828
yarn
2929
yarn lint
3030
31-
test-ios-newarch:
32-
runs-on: macOS-latest
31+
build-ios:
32+
runs-on: macos-latest
33+
3334
steps:
34-
- uses: actions/checkout@v4
35-
- uses: actions/[email protected]
35+
# Checkout the code
36+
- name: Checkout the code
37+
uses: actions/checkout@v4
38+
39+
# Set up Node.js environment
40+
- name: Set up Node.js
41+
uses: actions/[email protected]
3642
with:
3743
node-version: 18.x
44+
45+
# Cache Yarn dependencies to speed up the build
3846
- name: Get yarn cache directory path
3947
id: yarn-cache-dir-path
4048
run: echo "::set-output name=dir::$(yarn cache dir)"
49+
4150
- uses: actions/cache@v4
4251
id: yarn-cache
4352
with:
4453
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
4554
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
4655
restore-keys: |
4756
${{ runner.os }}-yarn-
48-
- name: Cache pods
49-
uses: actions/cache@v4
50-
with:
51-
path: |
52-
packages/RNExternalDisplayExample/ios/Pods
53-
packages/RNExternalDisplayExample/ios/build
54-
key: ${{ runner.os }}-pods-newarch-${{ hashFiles('**/packages/RNExternalDisplayExample/Podfile.lock') }}
55-
restore-keys: |
56-
${{ runner.os }}-pods-newarch-
57-
- name: Install deps
57+
58+
# Install dependencies
59+
- name: Install dependencies
5860
run: yarn
59-
- name: Build RNExternalDisplayExample
60-
env:
61-
RCT_NEW_ARCH_ENABLED: 1
61+
62+
# Prebuild the iOS folder for Expo
63+
- name: Prebuild iOS with Expo
64+
working-directory: apps/external-display-example
65+
run: |
66+
yarn expo prebuild --platform ios
67+
68+
# Install CocoaPods dependencies for iOS
69+
- name: Install CocoaPods dependencies
70+
working-directory: apps/external-display-example/ios
6271
run: |
63-
cd packages/RNExternalDisplayExample/ios
64-
pod repo update
6572
pod install
66-
cd ..
67-
xcodebuild -workspace ios/RNExternalDisplayExample.xcworkspace -scheme RNExternalDisplayExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
73+
74+
# Build the iOS app using Xcode (Debug)
75+
- name: Build iOS App (Debug)
76+
working-directory: apps/external-display-example/ios
77+
run: |
78+
xcodebuild \
79+
-workspace externaldisplayexample.xcworkspace \
80+
-scheme externaldisplayexample \
81+
-configuration Debug \
82+
-sdk iphonesimulator \
83+
-derivedDataPath build
6884
6985
build-android:
7086
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)