From 04ec8ba3d505dbb7d1158177d16f1216787e82e8 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 12:37:06 +0200 Subject: [PATCH 1/7] Update build-android.yml --- .github/workflows/build-android.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 839353b7..464cd8f0 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -26,6 +26,10 @@ 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 }} cancel-in-progress: true @@ -44,4 +48,4 @@ jobs: - 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' }} From b0f5251059ccdfd7384df3dc69d813399a6cf026 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 12:39:18 +0200 Subject: [PATCH 2/7] Update build-android.yml --- .github/workflows/build-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 464cd8f0..bb1b0fae 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -31,7 +31,7 @@ jobs: react-native-architecture: ['Paper', 'Fabric'] fail-fast: false concurrency: - group: build-android-${{ github.ref }} + group: build-android-${{ github.ref }}-${{ matrix.react-native-architecture }} cancel-in-progress: true steps: - name: Check out Git repository From 04a60c587975f6cea3091498b77854d67716c84d Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 13:20:26 +0200 Subject: [PATCH 3/7] Apply patches --- .github/workflows/build-android.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index bb1b0fae..a24cbf2b 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -46,6 +46,9 @@ jobs: - name: Install node_modules run: yarn install --immutable + - name: Apply patches + run: yarn patch-package + - name: Build app working-directory: example/android run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a -PnewArchEnabled=${{ matrix.react-native-architecture == 'Fabric' && 'true' || 'false' }} From 8680ae97f928d83b476bee4f71b3aeb4064af945 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 13:23:02 +0200 Subject: [PATCH 4/7] Fix working directory --- .github/workflows/build-android.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index a24cbf2b..90e821bc 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -47,6 +47,7 @@ jobs: run: yarn install --immutable - name: Apply patches + working-directory: example run: yarn patch-package - name: Build app From 9b5b356aab87f75f5cace668ea7d3a7cac9279db Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 21:30:26 +0200 Subject: [PATCH 5/7] Update build-ios.yml --- .github/workflows/build-ios.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 22f4a278..f157b521 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -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-${{ github.ref }}-${{ matrix.react-native-architecture }} cancel-in-progress: true steps: - name: Check out Git repository @@ -57,6 +61,8 @@ jobs: - 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 From 8fde0172b58a3f431a986ed4d1e597655a865321 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Fri, 12 Apr 2024 22:04:56 +0200 Subject: [PATCH 6/7] Update cache keys --- .github/workflows/build-android.yml | 2 +- .github/workflows/build-ios.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 90e821bc..4b630912 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -31,7 +31,7 @@ jobs: react-native-architecture: ['Paper', 'Fabric'] fail-fast: false concurrency: - group: build-android-${{ github.ref }}-${{ matrix.react-native-architecture }} + group: build-android-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true steps: - name: Check out Git repository diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index f157b521..49ae0df5 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -31,7 +31,7 @@ jobs: react-native-architecture: ['Paper', 'Fabric'] fail-fast: false concurrency: - group: build-ios-${{ github.ref }}-${{ matrix.react-native-architecture }} + group: build-ios-${{ matrix.react-native-architecture }}-${{ github.ref }} cancel-in-progress: true steps: - name: Check out Git repository @@ -56,8 +56,8 @@ 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 @@ -75,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 From 915305eaab07c1daf952337437cd2b9295b04052 Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Mon, 15 Apr 2024 09:42:22 +0200 Subject: [PATCH 7/7] Add missing cache key fragment --- .github/workflows/build-ios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 49ae0df5..41158c7b 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -43,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