Skip to content

Commit

Permalink
Merge branch 'main' into fix-onlayout-dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
piaskowyk committed Feb 4, 2025
2 parents 6adb380 + d77510f commit ee4a40f
Show file tree
Hide file tree
Showing 1,275 changed files with 61,348 additions and 10,847 deletions.
8 changes: 5 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.yarn/** linguist-vendored=true
/.yarn/releases/* binary=true
/.yarn/plugins/**/* binary=true
/packages/eslint-plugin-reanimated/index.js linguist-generated=true
/packages/eslint-plugin-reanimated/types linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/babel-plugin-static-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ jobs:
working-directory: packages/react-native-reanimated
run: yarn jest plugin
- name: Check Example App bundling
working-directory: apps/paper-example
working-directory: apps/fabric-example
run: yarn && yarn react-native bundle --reset-cache --entry-file='App.tsx' --bundle-output='/dev/null' --dev=true --platform='ios'
36 changes: 26 additions & 10 deletions .github/workflows/example-android-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:
- .github/workflows/example-android-build-check.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- apps/paper-example/package.json
- apps/paper-example/android/**
- packages/react-native-worklets/**
- apps/fabric-example/package.json
- apps/fabric-example/android/**
merge_group:
Expand All @@ -21,23 +20,32 @@ on:
- .github/workflows/example-android-build-check.yml
- packages/react-native-reanimated/android/**
- packages/react-native-reanimated/Common/**
- apps/paper-example/package.json
- apps/paper-example/android/**
- packages/react-native-worklets/**
- apps/fabric-example/package.json
- apps/fabric-example/android/**
workflow_call:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
use-external-worklets:
required: false
type: boolean
default: false

jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory: [apps/paper-example, apps/fabric-example]
fail-fast: false
env:
WORKING_DIRECTORY: apps/fabric-example
COMMON_APP_DIR: apps/common-app
REANIMATED_DIR: packages/react-native-reanimated
concurrency:
group: android-${{ matrix.working-directory }}-${{ github.ref }}
group: android-${{ github.ref }}-${{ inputs.use-external-worklets }}
cancel-in-progress: true
steps:
- name: Check out Git repository
Expand All @@ -52,7 +60,15 @@ jobs:
# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Build Reanimated package
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn build

- name: Use external worklets
if: ${{ inputs.use-external-worklets == 'true' }}
working-directory: ${{ env.COMMON_APP_DIR }}
run: yarn add react-native-worklets@workspace:"*"

- name: Build app
working-directory: ${{ matrix.working-directory }}/android
working-directory: ${{ env.WORKING_DIRECTORY }}/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a
43 changes: 32 additions & 11 deletions .github/workflows/example-ios-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- apps/paper-example/package.json
- apps/paper-example/ios/**
- packages/react-native-worklets/**
- apps/fabric-example/package.json
- apps/fabric-example/ios/**
merge_group:
Expand All @@ -25,37 +24,59 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- apps/paper-example/package.json
- apps/paper-example/ios/**
- packages/react-native-worklets/**
- apps/fabric-example/package.json
- apps/fabric-example/ios/**
workflow_call:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
use-external-worklets:
required: false
type: boolean
default: false

jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: macos-14
strategy:
matrix:
working-directory: [apps/paper-example, apps/fabric-example]
fail-fast: false
env:
WORKING_DIRECTORY: apps/fabric-example
COMMON_APP_DIR: apps/common-app
REANIMATED_DIR: packages/react-native-reanimated
concurrency:
group: ios-${{ matrix.working-directory }}-${{ github.ref }}
group: ios-${{ github.ref }}-${{ inputs.use-external-worklets }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a `.ruby-version` or `.tool-versions`
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Build Reanimated package
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn build

- name: Use external worklets
if: ${{ inputs.use-external-worklets == 'true' }}
working-directory: ${{ env.COMMON_APP_DIR }}
run: yarn add react-native-worklets@workspace:"*"

# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install Pods
working-directory: ${{ matrix.working-directory }}/ios
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
run: |
bundle install
bundle exec pod install
- name: Build app
working-directory: ${{ matrix.working-directory }}
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn react-native run-ios --no-packager
33 changes: 31 additions & 2 deletions .github/workflows/example-macos-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- packages/react-native-worklets/**
- apps/macos-example/package.json
- apps/macos-example/ios/**
- apps/macos-example/macos/**
Expand All @@ -24,31 +25,59 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- packages/react-native-worklets/**
- apps/macos-example/package.json
- apps/macos-example/ios/**
- apps/macos-example/macos/**
workflow_call:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
use-external-worklets:
required: false
type: boolean
default: false

jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: macos-14
env:
WORKING_DIRECTORY: apps/macos-example
COMMON_APP_DIR: apps/common-app
REANIMATED_DIR: packages/react-native-reanimated
concurrency:
group: macos-${{ github.ref }}
group: macos-${{ github.ref }}-${{ inputs.use-external-worklets }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a `.ruby-version` or `.tool-versions`
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Build Reanimated package
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn build

- name: Use external worklets
if: ${{ inputs.use-external-worklets == 'true' }}
working-directory: ${{ env.COMMON_APP_DIR }}
run: yarn add react-native-worklets@workspace:"*"

- name: Install Pods
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
run: bundle install && bundle exec pod update # There's some bug on the macOS runners for pod installation and this is the workaround.
run: |
bundle install
bundle exec pod install
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
Expand Down
38 changes: 26 additions & 12 deletions .github/workflows/example-tvos-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- packages/react-native-reanimated/TVOSExample/package.json
- packages/react-native-reanimated/TVOSExample/ios/**
- packages/react-native-worklets/**
merge_group:
branches:
- main
Expand All @@ -23,34 +22,49 @@ on:
- packages/react-native-reanimated/scripts/reanimated_utils.rb
- packages/react-native-reanimated/apple/**
- packages/react-native-reanimated/Common/**
- packages/react-native-reanimated/TVOSExample/package.json
- packages/react-native-reanimated/TVOSExample/ios/**
- packages/react-native-worklets/**
workflow_call:
inputs:
use-external-worklets:
required: false
type: boolean
default: false
workflow_dispatch:
inputs:
use-external-worklets:
required: false
type: boolean
default: false

jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: macos-14
env:
WORKING_DIRECTORY: apps/tvos-example
COMMON_APP_DIR: apps/common-app
REANIMATED_DIR: packages/react-native-reanimated
concurrency:
group: tvos-${{ github.ref }}
group: tvos-${{ github.ref }}-${{ inputs.use-external-worklets }}
cancel-in-progress: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a `.ruby-version` or `.tool-versions`
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Install monorepo node dependencies
run: yarn install --immutable
# TODO: Add caching for node_modules and artifacts that will work with monorepo setup.
- name: Install Reanimated node_modules
working-directory: packages/react-native-reanimated
run: yarn install --immutable
- name: Build Reanimated package
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn build

- name: Install app node_modules
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn install --immutable
- name: Use external worklets
if: ${{ inputs.use-external-worklets == 'true' }}
working-directory: ${{ env.COMMON_APP_DIR }}
run: yarn add react-native-worklets@workspace:"*"

- name: Install Pods
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/example-typescript-check-and-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Example Typescript check and lint
env:
YARN_ENABLE_HARDENED_MODE: 0
TYPE_CHECK_DIRECTORIES: >-
apps/common-app
apps/tvos-example
on:
pull_request:
merge_group:
Expand All @@ -23,7 +26,6 @@ jobs:
apps/fabric-example,
apps/macos-example,
# apps/next-example, # next-example doesn't use TypeScript.
apps/paper-example,
apps/tvos-example,
apps/web-example,
]
Expand All @@ -48,14 +50,11 @@ jobs:

- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory != 'apps/web-example' }}
if: ${{ contains(env.TYPE_CHECK_DIRECTORIES, matrix.working-directory) }}
run: yarn tsc --noEmit
- name: Check types
working-directory: ${{ matrix.working-directory }}
if: ${{ matrix.working-directory == 'apps/web-example' }}
run: yarn tsc --noEmit --baseUrl ../..
- name: Lint
working-directory: ${{ matrix.working-directory }}
if: ${{ contains(env.TYPE_CHECK_DIRECTORIES, matrix.working-directory) }}
run: yarn lint
- name: Build WebExample
working-directory: ${{ matrix.working-directory }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/expo-devclient-build-check-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
with:
distribution: 'zulu'
java-version: 17
- uses: ruby/setup-ruby@v1
if: ${{ matrix.platform == 'iOS' }}
with:
ruby-version: '3.3' # Not needed with a `.ruby-version` or `.tool-versions`
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Create Expo app (Paper)
if: ${{ matrix.react-native-architecture == 'Paper' }}
run: npx create-expo-app@latest ${{ env.APP_NAME }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/npm-reanimated-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
build:
if: github.repository == 'software-mansion/react-native-reanimated'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
PACKAGE_NAME: PLACEHOLDER # Will be reassigned later on.
steps:
Expand Down Expand Up @@ -87,7 +90,7 @@ jobs:
run: mv $PACKAGE_NAME ../../

- name: Publish npm package
run: npm publish $PACKAGE_NAME --tag nightly
run: npm publish $PACKAGE_NAME --tag nightly --provenance
if: ${{ inputs.publish_on_npm }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/reanimated-android-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
concurrency:
group: validate-java-${{ github.ref }}
cancel-in-progress: true
env:
REANIMATED_DIR: packages/react-native-reanimated
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -62,7 +64,10 @@ jobs:

- name: Install monorepo node dependencies
run: yarn install --immutable
- name: Build Reanimated package
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn build

- name: Lint Android
working-directory: packages/react-native-reanimated
working-directory: ${{ env.REANIMATED_DIR }}
run: yarn lint:android
Loading

0 comments on commit ee4a40f

Please sign in to comment.