React Native nightly Reanimated build check [Nightly] #360
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: React Native nightly Reanimated build check [Nightly] | |
| env: | |
| YARN_ENABLE_IMMUTABLE_INSTALLS: 0 | |
| on: | |
| pull_request: | |
| paths: | |
| - .github/workflows/react-native-nightly-reanimated-build-check-nightly.yml | |
| schedule: | |
| - cron: '37 19 * * *' | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| react-native-nightly-reanimated-build-check: | |
| if: github.repository == 'software-mansion/react-native-reanimated' | |
| runs-on: ${{ matrix.platform == 'iOS' && 'macos-26' || 'ubuntu-latest'}} | |
| strategy: | |
| matrix: | |
| platform: ['iOS', 'Android'] | |
| fail-fast: false | |
| env: | |
| REACT_NATIVE_TAG: nightly | |
| APP_NAME: app | |
| concurrency: | |
| group: ${{ matrix.platform }}-react-native-nightly-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout version files | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 | |
| with: | |
| sparse-checkout: | | |
| .nvmrc | |
| .ruby-version | |
| sparse-checkout-cone-mode: false | |
| - name: Setup Node | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Setup Yarn | |
| # Sometimes `npx @react-native-community/cli init` fails at random. | |
| # Pre-installing it with Yarn seems to improve stability. | |
| run: corepack enable && yarn init | |
| - name: Set up JDK 18 | |
| if: ${{ matrix.platform == 'Android' }} | |
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '18' | |
| - name: Load "next" tag if available | |
| run: | | |
| if npm view react-native dist-tags | grep -q 'next:' ; then | |
| echo "REACT_NATIVE_TAG=next" >> $GITHUB_ENV | |
| fi | |
| - name: Install React Native CLI | |
| # temporary version lock due to bug in version 20.1.2 | |
| run: yarn add @react-native-community/cli@20.1.1 | |
| - name: Create app | |
| run: yarn rnc-cli init ${{ env.APP_NAME }} --version ${{ env.REACT_NATIVE_TAG }} --pm yarn --skip-install --install-pods false --skip-git-init | |
| - name: Setup Yarn Modern in app | |
| working-directory: ${{ env.APP_NAME }} | |
| run: | | |
| touch yarn.lock | |
| yarn set version berry | |
| yarn config set nodeLinker node-modules | |
| yarn config set approvedGitRepositories --json '["https://github.com/software-mansion/react-native-reanimated.git"]' | |
| yarn config set npmMinimalAgeGate 0 | |
| - name: Install Reanimated | |
| working-directory: ${{ env.APP_NAME }} | |
| run: yarn add "react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#workspace=react-native-reanimated&commit=${{ github.sha }}" | |
| - name: Install Worklets | |
| working-directory: ${{ env.APP_NAME }} | |
| run: yarn add "react-native-worklets@https://github.com/software-mansion/react-native-reanimated.git#workspace=react-native-worklets&commit=${{ github.sha }}" | |
| - uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde | |
| if: ${{ matrix.platform == 'iOS' }} | |
| with: | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Install Fabric Pods (iOS) | |
| if: ${{ matrix.platform == 'iOS' }} | |
| working-directory: ${{ env.APP_NAME }}/ios | |
| run: bundle install && bundle exec pod install | |
| - name: Build app (iOS) | |
| if: ${{ matrix.platform == 'iOS' }} | |
| working-directory: ${{ env.APP_NAME }} | |
| run: yarn react-native run-ios --terminal='Terminal' | |
| - name: Build app (Android) | |
| if: ${{ matrix.platform == 'Android' }} | |
| working-directory: ${{ env.APP_NAME }}/android | |
| run: ./gradlew assembleDebug --console=plain |