From d8fcab81846b120a8ec440765eb881a68814a749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 13:07:25 +0200 Subject: [PATCH 01/23] feat: add compatibility action --- ...reanimated-compatibility-check-nightly.yml | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/reanimated-compatibility-check-nightly.yml diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml new file mode 100644 index 00000000000..f6547954c6c --- /dev/null +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -0,0 +1,63 @@ +name: React Native compatibility check [Nightly] +on: + pull_request: + paths: + - .github/workflows/check-react-native-nightly.yml + schedule: + - cron: '37 19 * * *' + workflow_dispatch: + +jobs: + build_ios: + if: github.repository == 'software-mansion/react-native-reanimated' + runs-on: ${{matrix.platform == 'iOS' && 'macos-14' || 'ubuntu-latest'}} + strategy: + matrix: + platform: ['iOS', 'Android'] + # Update it when dropping support for RN versions + react-native: + [ + { version: '0.72', architecture: 'Paper' }, + { version: '0.73', architecture: 'Paper' }, + { version: '0.74', architecture: 'Paper' }, + { version: '0.75', architecture: 'Paper' }, + { version: '0.75', architecture: 'Fabric' }, + ] + fail-fast: false + env: + APP_NAME: app + concurrency: + group: react-native-nightly-reanimated-build-check-${{ matrix.react-native.version}}-${{matrix.platform}}-${{matrix.react-native.architecture}}-${{ github.ref }} + cancel-in-progress: true + steps: + - name: Set up JDK 18 + if: ${{ matrix.platform == 'Android' }} + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '18' + - name: Create app + run: | + npx react-native@${{ matrix.react-native.version }} init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods false --skip-git-init + - name: Install Reanimated + working-directory: ${{ env.APP_NAME }} + run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} + - name: Install Paper Pods + if: ${{ matrix.platform == 'iOS' && matrix.react-native.architecture == 'Paper' }} + working-directory: ${{ env.APP_NAME }}/ios + run: bundle install && bundle exec pod install + - name: Install Fabric Pods + if: ${{ matrix.platform == 'iOS' && matrix.react-native.architecture == 'Fabric' }} + working-directory: ${{ env.APP_NAME }}/ios + run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install + - name: Setup Fabric (Android) + if: ${{ matrix.platform == 'Android' && matrix.react-native.architecture == 'Fabric' }} + working-directory: ${{ env.APP_NAME }}/android + run: sed -i 's/newArchEnabled=false/newArchEnabled=true/' gradle.properties + - name: Build app (iOS) + working-directory: ${{ env.APP_NAME }} + run: yarn react-native run-ios --simulator='iPhone 14' + - name: Build app (Android) + if: ${{ matrix.platform == 'Android' }} + working-directory: ${{ env.APP_NAME }}/android + run: ./gradlew assembleDebug --console=plain From 1c64eb6f809634db8f33f0d28cb7870c850fa8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 13:13:55 +0200 Subject: [PATCH 02/23] chore: update path --- .github/workflows/reanimated-compatibility-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index f6547954c6c..ef3c1cf98bb 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -2,7 +2,7 @@ name: React Native compatibility check [Nightly] on: pull_request: paths: - - .github/workflows/check-react-native-nightly.yml + - .github/workflows/reanimated-compatibility-check-nightly.yml schedule: - cron: '37 19 * * *' workflow_dispatch: From 7e04eeb177a496a815a9d72e54bbef7f545af3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 13:51:13 +0200 Subject: [PATCH 03/23] chore: fix ifs --- .../reanimated-compatibility-check-nightly.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index ef3c1cf98bb..1d54ae24eac 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,4 +1,6 @@ name: React Native compatibility check [Nightly] +env: + YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: @@ -14,7 +16,8 @@ jobs: strategy: matrix: platform: ['iOS', 'Android'] - # Update it when dropping support for RN versions + # TODO: Fetch compatibility in docs and here from common sources. + # Update it when dropping support for RN versions. react-native: [ { version: '0.72', architecture: 'Paper' }, @@ -26,6 +29,7 @@ jobs: fail-fast: false env: APP_NAME: app + RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native.architecture == 'Fabric' && '1' || '0' }} concurrency: group: react-native-nightly-reanimated-build-check-${{ matrix.react-native.version}}-${{matrix.platform}}-${{matrix.react-native.architecture}}-${{ github.ref }} cancel-in-progress: true @@ -38,23 +42,20 @@ jobs: java-version: '18' - name: Create app run: | - npx react-native@${{ matrix.react-native.version }} init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods false --skip-git-init + npx react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods false --skip-git-init - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} - - name: Install Paper Pods - if: ${{ matrix.platform == 'iOS' && matrix.react-native.architecture == 'Paper' }} + - name: Install Pods + if: ${{ matrix.platform == 'iOS' }} working-directory: ${{ env.APP_NAME }}/ios run: bundle install && bundle exec pod install - - name: Install Fabric Pods - if: ${{ matrix.platform == 'iOS' && matrix.react-native.architecture == 'Fabric' }} - working-directory: ${{ env.APP_NAME }}/ios - run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install - name: Setup Fabric (Android) if: ${{ matrix.platform == 'Android' && matrix.react-native.architecture == 'Fabric' }} working-directory: ${{ env.APP_NAME }}/android run: sed -i 's/newArchEnabled=false/newArchEnabled=true/' gradle.properties - name: Build app (iOS) + if: ${{ matrix.platform == 'iOS' }} working-directory: ${{ env.APP_NAME }} run: yarn react-native run-ios --simulator='iPhone 14' - name: Build app (Android) From 3fd6a1c3f531c9899635f1264ae4c3703a3761a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:01:58 +0200 Subject: [PATCH 04/23] chore: remove hardened mode disable --- .github/workflows/reanimated-compatibility-check-nightly.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 1d54ae24eac..c15f9862f48 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,6 +1,4 @@ name: React Native compatibility check [Nightly] -env: - YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: From f8a698c3f54748be22fc00fd4c2d4f8091bc8df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:36:01 +0200 Subject: [PATCH 05/23] chore: build fixes --- .../workflows/reanimated-compatibility-check-nightly.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index c15f9862f48..caef2f0934a 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -41,6 +41,11 @@ jobs: - name: Create app run: | npx react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods false --skip-git-init + - name: Set Yarn version + # On 0.75 Yarn 1 is used by default ath the moment, most likely due to some bug. + if: ${{ matrix.react-native.version == '0.75' }} + working-directory: ${{ env.APP_NAME }} + run: yarn set version berry - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} @@ -55,7 +60,7 @@ jobs: - name: Build app (iOS) if: ${{ matrix.platform == 'iOS' }} working-directory: ${{ env.APP_NAME }} - run: yarn react-native run-ios --simulator='iPhone 14' + run: yarn react-native run-ios --simulator='iPhone 14' --terminal='Terminal' - name: Build app (Android) if: ${{ matrix.platform == 'Android' }} working-directory: ${{ env.APP_NAME }}/android From 695cd7bb6efbf433f9801a613486861eafa25630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:44:46 +0200 Subject: [PATCH 06/23] chore: rename --- .github/workflows/reanimated-compatibility-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index caef2f0934a..fe0ba7b2353 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,4 +1,4 @@ -name: React Native compatibility check [Nightly] +name: Reanimated compatibility check [Nightly] on: pull_request: paths: From 9392c60a26ea2658dc18fffc2e83f3b09fdeeb88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 14:59:38 +0200 Subject: [PATCH 07/23] feat: add release building --- .../workflows/reanimated-compatibility-check-nightly.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index fe0ba7b2353..ff94d148806 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -14,6 +14,7 @@ jobs: strategy: matrix: platform: ['iOS', 'Android'] + mode: ['Debug', 'Release'] # TODO: Fetch compatibility in docs and here from common sources. # Update it when dropping support for RN versions. react-native: @@ -29,7 +30,7 @@ jobs: APP_NAME: app RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native.architecture == 'Fabric' && '1' || '0' }} concurrency: - group: react-native-nightly-reanimated-build-check-${{ matrix.react-native.version}}-${{matrix.platform}}-${{matrix.react-native.architecture}}-${{ github.ref }} + group: react-native-nightly-reanimated-build-check-${{ matrix.react-native.version}}-${{matrix.platform}}-${{matrix.react-native.architecture}}-${{ matrix.mode }}-${{ github.ref }} cancel-in-progress: true steps: - name: Set up JDK 18 @@ -60,8 +61,8 @@ jobs: - name: Build app (iOS) if: ${{ matrix.platform == 'iOS' }} working-directory: ${{ env.APP_NAME }} - run: yarn react-native run-ios --simulator='iPhone 14' --terminal='Terminal' + run: yarn react-native run-ios --simulator='iPhone 14' --terminal='Terminal'--mode=${{ matrix.mode }} - name: Build app (Android) if: ${{ matrix.platform == 'Android' }} working-directory: ${{ env.APP_NAME }}/android - run: ./gradlew assembleDebug --console=plain + run: ./gradlew assemble${{ matrix.mode }} --console=plain From 29ad6dbd128e74e8e618ded5a32251ca187dfce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 15:58:18 +0200 Subject: [PATCH 08/23] chore: test --- .github/workflows/reanimated-compatibility-check-nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index ff94d148806..3fc602e30be 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -41,12 +41,12 @@ jobs: java-version: '18' - name: Create app run: | - npx react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods false --skip-git-init + npx react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods=0 --skip-git-init - name: Set Yarn version # On 0.75 Yarn 1 is used by default ath the moment, most likely due to some bug. if: ${{ matrix.react-native.version == '0.75' }} working-directory: ${{ env.APP_NAME }} - run: yarn set version berry + run: corepack enable && yarn set version berry - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From ff3ec1968546321f4f91d4aa98fca55dbcf63525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 16:10:09 +0200 Subject: [PATCH 09/23] chore: use yarn4 --- .../reanimated-compatibility-check-nightly.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 3fc602e30be..a89c4a2a991 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -39,14 +39,17 @@ jobs: with: distribution: 'zulu' java-version: '18' + - name: Setup Yarn and React Native + # Sometimes `npx react-native init` fails due to dependency mismatches or other + # rather vague errors. This is a workaround for that. + run: | + corepack enable && yarn init + yarn add react-native@latest + - name: Install React Native + run: yarn add react-native@latest - name: Create app run: | - npx react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods=0 --skip-git-init - - name: Set Yarn version - # On 0.75 Yarn 1 is used by default ath the moment, most likely due to some bug. - if: ${{ matrix.react-native.version == '0.75' }} - working-directory: ${{ env.APP_NAME }} - run: corepack enable && yarn set version berry + yarn react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From 8e0bf20ac74d8498de9cda9319e4fce70bdfb259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 16:27:17 +0200 Subject: [PATCH 10/23] chore: add yarn.lock --- .github/workflows/reanimated-compatibility-check-nightly.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index a89c4a2a991..94924d9b71c 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -50,6 +50,9 @@ jobs: - name: Create app run: | yarn react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init + - name: Create yarn.lock in app + working-directory: ${{ env.APP_NAME }} + run: touch yarn.lock - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From fdf27359408fb90de7baa234f62cb64642607b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 16:33:41 +0200 Subject: [PATCH 11/23] chore: im tired --- .../workflows/reanimated-compatibility-check-nightly.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 94924d9b71c..42301df57d6 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,4 +1,6 @@ name: Reanimated compatibility check [Nightly] +env: + YARN_ENABLE_HARDENED_MODE: 0 on: pull_request: paths: @@ -45,14 +47,10 @@ jobs: run: | corepack enable && yarn init yarn add react-native@latest - - name: Install React Native - run: yarn add react-native@latest + mkdir app && touch app/yarn.lock - name: Create app run: | yarn react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init - - name: Create yarn.lock in app - working-directory: ${{ env.APP_NAME }} - run: touch yarn.lock - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From f29359b68afa04460b1bbbd177fd88e5f313aa39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Fri, 9 Aug 2024 16:45:47 +0200 Subject: [PATCH 12/23] chore: immutable installs --- .github/workflows/reanimated-compatibility-check-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 42301df57d6..b91f925caf2 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,6 +1,7 @@ name: Reanimated compatibility check [Nightly] env: YARN_ENABLE_HARDENED_MODE: 0 + YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: pull_request: paths: From 26acf24d0fd1b42e9146513bfe183becd1be7a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 09:10:27 +0200 Subject: [PATCH 13/23] chore: test node setup --- .../workflows/reanimated-compatibility-check-nightly.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index b91f925caf2..f0f7259a362 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -26,6 +26,7 @@ jobs: { version: '0.73', architecture: 'Paper' }, { version: '0.74', architecture: 'Paper' }, { version: '0.75', architecture: 'Paper' }, + { version: '0.74', architecture: 'Fabric' }, { version: '0.75', architecture: 'Fabric' }, ] fail-fast: false @@ -42,6 +43,11 @@ jobs: with: distribution: 'zulu' java-version: '18' + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn - name: Setup Yarn and React Native # Sometimes `npx react-native init` fails due to dependency mismatches or other # rather vague errors. This is a workaround for that. From 69f062677858a23aa639076c644065691081d8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 09:23:13 +0200 Subject: [PATCH 14/23] chore: test node setup --- .github/workflows/reanimated-compatibility-check-nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index f0f7259a362..05a508cf5a0 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -47,7 +47,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - cache: yarn + - name: Setup Yarn and React Native # Sometimes `npx react-native init` fails due to dependency mismatches or other # rather vague errors. This is a workaround for that. From 0b03914ad44262e77b530cd87d78f38b580e3496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 10:09:58 +0200 Subject: [PATCH 15/23] chore: test yarn vs npx --- .../reanimated-compatibility-check-nightly.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 05a508cf5a0..75133e258b4 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -48,16 +48,16 @@ jobs: with: node-version: 18 - - name: Setup Yarn and React Native - # Sometimes `npx react-native init` fails due to dependency mismatches or other - # rather vague errors. This is a workaround for that. - run: | - corepack enable && yarn init - yarn add react-native@latest - mkdir app && touch app/yarn.lock + # - name: Setup Yarn and React Native + # # Sometimes `npx react-native init` fails due to dependency mismatches or other + # # rather vague errors. This is a workaround for that. + # run: | + # corepack enable && yarn init + # yarn add react-native@latest + # mkdir app && touch app/yarn.lock - name: Create app run: | - yarn react-native init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init + npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From 1accd5e788002c740f9929e419c2bb8810f104e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 10:22:23 +0200 Subject: [PATCH 16/23] chore: test yarn vs npx --- .github/workflows/reanimated-compatibility-check-nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 75133e258b4..ac9f99743a2 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,7 +1,7 @@ name: Reanimated compatibility check [Nightly] env: - YARN_ENABLE_HARDENED_MODE: 0 - YARN_ENABLE_IMMUTABLE_INSTALLS: 0 + # YARN_ENABLE_HARDENED_MODE: 0 + # YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: pull_request: paths: From 1e86a099a825ae5065d5e5f7df5e823bbb62734f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 10:44:05 +0200 Subject: [PATCH 17/23] chore: test --- .github/workflows/reanimated-compatibility-check-nightly.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index ac9f99743a2..a4c55c6ed4c 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -55,6 +55,7 @@ jobs: # corepack enable && yarn init # yarn add react-native@latest # mkdir app && touch app/yarn.lock + # - name: Create app run: | npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init From 4c8c1927b0e354a7e367bd8c65c3c71292a2fc17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 10:46:37 +0200 Subject: [PATCH 18/23] chore: why no call --- .../workflows/reanimated-compatibility-check-nightly.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index a4c55c6ed4c..78acd1b213e 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,7 +1,7 @@ name: Reanimated compatibility check [Nightly] -env: - # YARN_ENABLE_HARDENED_MODE: 0 - # YARN_ENABLE_IMMUTABLE_INSTALLS: 0 +# env: +# YARN_ENABLE_HARDENED_MODE: 0 +# YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: pull_request: paths: @@ -29,7 +29,7 @@ jobs: { version: '0.74', architecture: 'Fabric' }, { version: '0.75', architecture: 'Fabric' }, ] - fail-fast: false + fail-fast: true env: APP_NAME: app RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native.architecture == 'Fabric' && '1' || '0' }} From 8cda7afbb362ea198ebfbe19f9106b507010fa77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:04:45 +0200 Subject: [PATCH 19/23] chore: add new yarn post-app --- .github/workflows/reanimated-compatibility-check-nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 78acd1b213e..affc931cf43 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -59,6 +59,8 @@ jobs: - name: Create app run: | npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init + - name: Setup Yarn Modern + run: yarn set version berry - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From 05ca9238eeb03bd3c4b2211dd2dfc4336f4512d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:08:46 +0200 Subject: [PATCH 20/23] chore: add new yarn post-app with corepack --- .github/workflows/reanimated-compatibility-check-nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index affc931cf43..a998abd1b97 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -60,7 +60,8 @@ jobs: run: | npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init - name: Setup Yarn Modern - run: yarn set version berry + working-directory: ${{ env.APP_NAME }} + run: corepack enable && yarn set version berry - name: Install Reanimated working-directory: ${{ env.APP_NAME }} run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }} From f615993ea1615e4601a2c670c5db13c001f4b8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:15:14 +0200 Subject: [PATCH 21/23] chore: print state of app --- .github/workflows/reanimated-compatibility-check-nightly.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index a998abd1b97..8c14eeb40d8 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -29,7 +29,7 @@ jobs: { version: '0.74', architecture: 'Fabric' }, { version: '0.75', architecture: 'Fabric' }, ] - fail-fast: true + fail-fast: false env: APP_NAME: app RCT_NEW_ARCH_ENABLED: ${{ matrix.react-native.architecture == 'Fabric' && '1' || '0' }} @@ -59,6 +59,9 @@ jobs: - name: Create app run: | npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init + - name: Check app + working-directory: ${{ env.APP_NAME }} + run: ls -la - name: Setup Yarn Modern working-directory: ${{ env.APP_NAME }} run: corepack enable && yarn set version berry From 16570b41d5894f63bc4fab7a358475098eee157d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:26:44 +0200 Subject: [PATCH 22/23] chore: update banner --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9d9688f1eb8..1912a436c8b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ comes to gesture based interactions. ### Nightly CI state [![Build nightly npm package](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-nightly-npm-package.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-nightly-npm-package.yml) +[![Reanimated compatibility check [Nightly]](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/reanimated-compatibility-check-nightly.yml) [![Run nightly monorepo test](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-monorepo-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/build-monorepo-nightly.yml) [![Check static framework nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-static-framework-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-static-framework-nightly.yml) [![Check React Native nightly build](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-react-native-nightly.yml/badge.svg)](https://github.com/software-mansion/react-native-reanimated/actions/workflows/check-react-native-nightly.yml) From 71d86951dacb6a1e469023e53034435d955e868b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=BBelawski?= Date: Mon, 12 Aug 2024 11:29:40 +0200 Subject: [PATCH 23/23] chore: final touches --- ...reanimated-compatibility-check-nightly.yml | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml index 8c14eeb40d8..71bc62c3b8a 100644 --- a/.github/workflows/reanimated-compatibility-check-nightly.yml +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -1,7 +1,4 @@ name: Reanimated compatibility check [Nightly] -# env: -# YARN_ENABLE_HARDENED_MODE: 0 -# YARN_ENABLE_IMMUTABLE_INSTALLS: 0 on: pull_request: paths: @@ -20,14 +17,14 @@ jobs: mode: ['Debug', 'Release'] # TODO: Fetch compatibility in docs and here from common sources. # Update it when dropping support for RN versions. - react-native: - [ + react-native: [ { version: '0.72', architecture: 'Paper' }, { version: '0.73', architecture: 'Paper' }, { version: '0.74', architecture: 'Paper' }, - { version: '0.75', architecture: 'Paper' }, { version: '0.74', architecture: 'Fabric' }, - { version: '0.75', architecture: 'Fabric' }, + # TODO: RN CLI currently struggles with setting 0.75 templates. + # { version: '0.75', architecture: 'Paper' }, + # { version: '0.75', architecture: 'Fabric' }, ] fail-fast: false env: @@ -47,22 +44,11 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 - - # - name: Setup Yarn and React Native - # # Sometimes `npx react-native init` fails due to dependency mismatches or other - # # rather vague errors. This is a workaround for that. - # run: | - # corepack enable && yarn init - # yarn add react-native@latest - # mkdir app && touch app/yarn.lock - # - name: Create app run: | npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init - - name: Check app - working-directory: ${{ env.APP_NAME }} - run: ls -la - name: Setup Yarn Modern + # For convenience, sometimes there are vague issues with RN CLI and Yarn Legacy on the runner. working-directory: ${{ env.APP_NAME }} run: corepack enable && yarn set version berry - name: Install Reanimated