Skip to content

Check React Native nightly build #147

Check React Native nightly build

Check React Native nightly build #147

name: Check React Native nightly build
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: macos-14
strategy:
matrix:
react-native-architecture: ['Paper', 'Fabric']
fail-fast: false
concurrency:
group: ios-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }}
cancel-in-progress: true
steps:
# Sometimes `npx react-native init` fails due to dependency mismatches or other
# rather vague errors. This is a workaround for that.
- name: Setup Yarn
run: corepack enable && yarn init
- name: Create app
run: |
if npm view react-native dist-tags | grep -q 'next:' ; then
yarn add react-native@next && yarn react-native init app --skip-install --version next
else
yarn add react-native@nightly && yarn react-native init app --skip-install --version nightly
fi
- name: Enable Yarn in app
working-directory: app
run: touch yarn.lock
- name: Install Reanimated
working-directory: app
run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }}
- name: Install Paper Pods
if: ${{ matrix.react-native-architecture == 'Paper' }}
working-directory: app/ios
run: bundle install && bundle exec pod install
- name: Install Fabric Pods
if: ${{ matrix.react-native-architecture == 'Fabric' }}
working-directory: app/ios
run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install
- name: Build app
working-directory: app
run: yarn react-native run-ios --simulator='iPhone 14'
build_android:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
react-native-architecture: ['Paper', 'Fabric']
fail-fast: false
concurrency:
group: android-react-native-nightly-${{ matrix.react-native-architecture }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '18'
# Sometimes `npx react-native init` fails due to dependency mismatches or other
# rather vague errors. This is a workaround for that.
- name: Setup Yarn
run: corepack enable && yarn init
- name: Create app
run: |
if npm view react-native dist-tags | grep -q 'next:' ; then
yarn add react-native@next && yarn react-native init app --skip-install --version next
else
yarn add react-native@nightly && yarn react-native init app --skip-install --version nightly
fi
- name: Enable Yarn in app
working-directory: app
run: touch yarn.lock
- name: Install Reanimated
working-directory: app
run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }}
- name: Setup Fabric
if: ${{ matrix.react-native-architecture == 'Fabric' }}
working-directory: app/android
run: sed -i 's/newArchEnabled=false/newArchEnabled=true/' gradle.properties
- name: Build app
working-directory: app/android
run: ./gradlew assembleDebug --console=plain