Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Reanimated compatibility GitHub action #6399

Merged
merged 23 commits into from
Aug 12, 2024
Merged
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/reanimated-compatibility-check-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Reanimated compatibility check [Nightly]
env:
YARN_ENABLE_HARDENED_MODE: 0
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
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' },
tjzel marked this conversation as resolved.
Show resolved Hide resolved
{ 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 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
- 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
Loading