diff --git a/.github/workflows/reanimated-compatibility-check-nightly.yml b/.github/workflows/reanimated-compatibility-check-nightly.yml new file mode 100644 index 00000000000..71bc62c3b8a --- /dev/null +++ b/.github/workflows/reanimated-compatibility-check-nightly.yml @@ -0,0 +1,72 @@ +name: Reanimated compatibility check [Nightly] +on: + pull_request: + paths: + - .github/workflows/reanimated-compatibility-check-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'] + mode: ['Debug', 'Release'] + # 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' }, + { version: '0.73', architecture: 'Paper' }, + { version: '0.74', architecture: 'Paper' }, + { version: '0.74', 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: + 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}}-${{ matrix.mode }}-${{ 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: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + - 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 + # 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 + 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 Pods + if: ${{ matrix.platform == 'iOS' }} + working-directory: ${{ env.APP_NAME }}/ios + run: 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' --terminal='Terminal'--mode=${{ matrix.mode }} + - name: Build app (Android) + if: ${{ matrix.platform == 'Android' }} + working-directory: ${{ env.APP_NAME }}/android + run: ./gradlew assemble${{ matrix.mode }} --console=plain 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)