Skip to content

Commit

Permalink
Build example app on Paper and Fabric (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Apr 15, 2024
1 parent 7b19778 commit 9b26d45
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ jobs:
build:
if: github.repository == 'Expensify/react-native-live-markdown'
runs-on: ubuntu-latest
strategy:
matrix:
react-native-architecture: ['Paper', 'Fabric']
fail-fast: false
concurrency:
group: build-android-${{ github.ref }}
group: build-android-${{ matrix.react-native-architecture }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
Expand All @@ -42,6 +46,10 @@ jobs:
- name: Install node_modules
run: yarn install --immutable

- name: Apply patches
working-directory: example
run: yarn patch-package

- name: Build app
working-directory: example/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a -PnewArchEnabled=${{ matrix.react-native-architecture == 'Fabric' && 'true' || 'false' }}
20 changes: 13 additions & 7 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ jobs:
build:
if: github.repository == 'Expensify/react-native-live-markdown'
runs-on: macos-13
strategy:
matrix:
react-native-architecture: ['Paper', 'Fabric']
fail-fast: false
concurrency:
group: build-ios-${{ github.ref }}
group: build-ios-${{ matrix.react-native-architecture }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Check out Git repository
Expand All @@ -39,8 +43,8 @@ jobs:
path: |
node_modules
example/node_modules
key: build-ios-node-modules-${{ hashFiles('yarn.lock') }}
restore-keys: build-ios-node-modules-
key: build-ios-node-modules-${{ matrix.react-native-architecture }}-${{ hashFiles('yarn.lock') }}
restore-keys: build-ios-node-modules-${{ matrix.react-native-architecture }}-

- name: Install node_modules
run: yarn install --immutable
Expand All @@ -52,11 +56,13 @@ jobs:
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: build-ios-pods-${{ hashFiles('example/node_modules/react-native/package.json') }}
restore-keys: build-ios-pods-
key: build-ios-pods-${{ matrix.react-native-architecture }}-${{ hashFiles('example/node_modules/react-native/package.json') }}
restore-keys: build-ios-pods-${{ matrix.react-native-architecture }}-

- name: Install Pods
working-directory: example/ios
env:
RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native-architecture == 'Fabric' && '1' || '0' }}
run: |
bundler install
bundler exec pod install
Expand All @@ -69,8 +75,8 @@ jobs:
uses: actions/cache@v4
with:
path: ~/Library/Developer/Xcode/DerivedData
key: build-ios-derived-data-${{ hashFiles('example/node_modules/react-native/package.json') }}
restore-keys: build-ios-derived-data-
key: build-ios-derived-data-${{ matrix.react-native-architecture }}-${{ hashFiles('example/node_modules/react-native/package.json') }}
restore-keys: build-ios-derived-data-${{ matrix.react-native-architecture }}-

- name: Build app
working-directory: example
Expand Down

0 comments on commit 9b26d45

Please sign in to comment.