Skip to content

Commit

Permalink
Add ios Ci step
Browse files Browse the repository at this point in the history
  • Loading branch information
hellostu committed Oct 15, 2024
1 parent 1cb5a12 commit acdc6ac
Showing 1 changed file with 37 additions and 21 deletions.
58 changes: 37 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,59 @@ jobs:
yarn
yarn lint
test-ios-newarch:
runs-on: macOS-latest
build-ios:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
# Checkout the code
- name: Checkout the code
uses: actions/checkout@v4

# Set up Node.js environment
- name: Set up Node.js
uses: actions/[email protected]
with:
node-version: 18.x

# Cache Yarn dependencies to speed up the build
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache pods
uses: actions/cache@v4
with:
path: |
packages/RNExternalDisplayExample/ios/Pods
packages/RNExternalDisplayExample/ios/build
key: ${{ runner.os }}-pods-newarch-${{ hashFiles('**/packages/RNExternalDisplayExample/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-newarch-
- name: Install deps
# Install dependencies
- name: Install dependencies
run: yarn
- name: Build RNExternalDisplayExample
env:
RCT_NEW_ARCH_ENABLED: 1

# Prebuild the iOS folder for Expo
- name: Prebuild iOS with Expo
working-directory: apps/external-display-example
run: |
yarn expo prebuild --platform ios
# Install CocoaPods dependencies for iOS
- name: Install CocoaPods dependencies
working-directory: apps/external-display-example/ios
run: |
cd packages/RNExternalDisplayExample/ios
pod repo update
pod install
cd ..
xcodebuild -workspace ios/RNExternalDisplayExample.xcworkspace -scheme RNExternalDisplayExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build
# Build the iOS app using Xcode (Debug)
- name: Build iOS App (Debug)
working-directory: apps/external-display-example/ios
run: |
xcodebuild \
-workspace externaldisplayexample.xcworkspace \
-scheme externaldisplayexample \
-configuration Debug \
-sdk iphonesimulator \
-derivedDataPath build
build-android:
runs-on: ubuntu-latest
Expand Down

0 comments on commit acdc6ac

Please sign in to comment.