Skip to content

Reanimated compatibility check [Nightly] #483

Reanimated compatibility check [Nightly]

Reanimated compatibility check [Nightly] #483

name: Reanimated compatibility check [Nightly]
env:
YARN_ENABLE_HARDENED_MODE: 0
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
on:
pull_request:
types: [opened, synchronize, labeled, unlabeled]
schedule:
- cron: '37 19 * * *'
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
read-compatibility-json:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
outputs:
react-native-versions: ${{ steps.set-outputs.outputs.react-native-versions }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
sparse-checkout: |
/.nvmrc
/.github/workflows/helper
/packages/react-native-reanimated/compatibility.json
sparse-checkout-cone-mode: false
- name: Setup Node
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610
with:
node-version-file: '.nvmrc'
- name: Read compatibility.json
run: node --experimental-strip-types .github/workflows/helper/read-compatibility.ts
- name: Set outputs
id: set-outputs
run: |
cat /tmp/react-native-versions.json >> $GITHUB_OUTPUT
reanimated-compatibility-check-nightly:
if: ${{github.repository == 'software-mansion/react-native-reanimated' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Check compatibility'))}}
runs-on: ${{matrix.platform == 'iOS' && 'macos-26' || 'ubuntu-latest'}}
needs: read-compatibility-json
strategy:
matrix:
platform: ['iOS', 'Android']
mode: ['Debug', 'Release']
react-native-version: ${{ fromJson(needs.read-compatibility-json.outputs.react-native-versions) }}
fail-fast: false
env:
APP_NAME: app
concurrency:
group: react-native-nightly-reanimated-build-check-${{ matrix.react-native-version}}-${{matrix.platform}}-${{matrix.mode}}-${{github.ref}}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Set up JDK 18
if: ${{ matrix.platform == 'Android' }}
uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62
with:
distribution: 'zulu'
java-version: '18'
- name: Setup Node
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610
with:
node-version-file: '.nvmrc'
- uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde
if: ${{ matrix.platform == 'iOS' }}
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Check if react-native version exists
id: check-react-native-version
run: |
if ! npm view react-native@${{ matrix.react-native-version }} dist-tags ; then
echo "React Native version ${{ matrix.react-native-version }} does not exist - Skipping..."
echo "SKIP_BUILD=true" >> $GITHUB_OUTPUT
fi
- name: Run Reanimated Compatibility Check
if: ${{ steps.check-react-native-version.outputs.SKIP_BUILD != 'true' }}
uses: ./.github/actions/reanimated-compatibility-check-build
with:
react-native-versions: ${{ matrix.react-native-version }}
platform: ${{ matrix.platform }}
mode: ${{ matrix.mode }}
github-sha: ${{ github.sha }}
app-name: ${{ env.APP_NAME }}