Skip to content

Commit

Permalink
Sync workflows with main
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Jan 13, 2025
1 parent d4861e3 commit 324b9b0
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 213 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/V8-reanimated-build-check-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
concurrency:
group: build-v8-${{ github.ref }}
cancel-in-progress: true
env:
APP_NAME: app
LATEST_SUPPORTED_RN_VERSION_IN_V8: 0.75
steps:
- name: Check out
uses: actions/checkout@v4
Expand All @@ -28,19 +31,32 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- name: Create React Native app
run: npx react-native init app
- 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: Install React Native CLI
run: yarn add @react-native-community/cli
- name: Create app
run: yarn rnc-cli init ${{ env.APP_NAME }} --version ${{env.LATEST_SUPPORTED_RN_VERSION_IN_V8}} --skip-install --pm yarn --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
- name: Install dependencies
working-directory: app
working-directory: ${{ env.APP_NAME }}
run: yarn install
- name: Install Reanimated
working-directory: app
run: yarn add react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#commit=${{ github.sha }}
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 test dependencies
working-directory: app
working-directory: ${{ env.APP_NAME }}
run: yarn add react-native-v8 v8-android-jit
- name: Configure V8
run: node reanimated_repo/.github/workflows/helper/configureV8.js
- name: Build Android app
working-directory: app/android
- name: Build Android
working-directory: ${{ env.APP_NAME }}/android
run: ./gradlew assembleDebug --console=plain
2 changes: 1 addition & 1 deletion .github/workflows/example-ios-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ jobs:
- name: Build app
working-directory: ${{ matrix.working-directory }}
run: npx react-native run-ios --no-packager
run: yarn react-native run-ios --no-packager
2 changes: 1 addition & 1 deletion .github/workflows/example-macos-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: Install Pods
working-directory: ${{ env.WORKING_DIRECTORY }}/macos
run: bundle install && bundle exec pod install
run: bundle install && bundle exec pod update # There's some bug on the macOS runners for pod installation and this is the workaround.

- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/example-tvos-build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
bundle exec pod install
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}
run: yarn react-native-tvos run-ios --no-packager --scheme TVOSExample-tvOS --simulator "Apple TV"
working-directory: ${{ env.WORKING_DIRECTORY }}/ios
run: xcodebuild -workspace TVOSExample.xcworkspace -configuration Debug -scheme TVOSExample -destination "generic/platform=tvOS Simulator" -quiet
2 changes: 1 addition & 1 deletion .github/workflows/expo-devclient-build-check-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Build app (iOS)
working-directory: ${{ env.APP_NAME }}
if: ${{ matrix.platform == 'iOS' }}
run: npx react-native run-ios --simulator='iPhone 14' --terminal='Terminal'
run: yarn react-native run-ios --terminal='Terminal'
- name: Build app (Android)
working-directory: ${{ env.APP_NAME }}/android
if: ${{ matrix.platform == 'Android' }}
Expand Down
90 changes: 0 additions & 90 deletions .github/workflows/monorepo-app-reanimated-build-check-action.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/monorepo-app-reanimated-build-check-nightly.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: React Native nightly Reanimated build check [Nightly]
env:
YARN_ENABLE_HARDENED_MODE: 0
YARN_ENABLE_IMMUTABLE_INSTALLS: 0
on:
pull_request:
paths:
Expand All @@ -27,8 +27,8 @@ jobs:
cancel-in-progress: true
steps:
- name: Setup Yarn
# Sometimes `npx react-native init` fails due to dependency mismatches or other
# rather vague errors. This is a workaround for that.
# 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' }}
Expand All @@ -41,24 +41,26 @@ jobs:
if npm view react-native dist-tags | grep -q 'next:' ; then
echo "REACT_NATIVE_TAG=next" >> $GITHUB_ENV
fi
- name: Install React Native
run: yarn add react-native@${{ env.REACT_NATIVE_TAG }}
- name: Install React Native CLI
run: yarn add @react-native-community/cli
- name: Create app
run: |
yarn react-native init ${{ env.APP_NAME }} --version ${{ env.REACT_NATIVE_TAG }} --pm yarn --skip-install --install-pods false --skip-git-init
- name: Add yarn.lock in 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
run: |
touch yarn.lock
yarn set version berry
yarn config set nodeLinker node-modules
- 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 }}
run: yarn add "react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#workspace=react-native-reanimated&commit=${{ github.sha }}"
- name: Install Paper Pods (iOS)
if: ${{ matrix.react-native-architecture == 'Paper' && matrix.platform == 'iOS' }}
working-directory: app/ios
working-directory: ${{ env.APP_NAME }}/ios
run: bundle install && bundle exec pod install
- name: Install Fabric Pods (iOS)
if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'iOS' }}
working-directory: app/ios
working-directory: ${{ env.APP_NAME }}/ios
run: RCT_NEW_ARCH_ENABLED=1 bundle install && bundle exec pod install
- name: Setup Fabric (Android)
if: ${{ matrix.react-native-architecture == 'Fabric' && matrix.platform == 'Android' }}
Expand All @@ -67,7 +69,7 @@ jobs:
- name: Build app (iOS)
if: ${{ matrix.platform == 'iOS' }}
working-directory: ${{ env.APP_NAME }}
run: yarn react-native run-ios --simulator='iPhone 14'
run: yarn react-native run-ios --terminal='Terminal'
- name: Build app (Android)
if: ${{ matrix.platform == 'Android' }}
working-directory: ${{ env.APP_NAME }}/android
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/reanimated-android-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install cpplint==1.6.1
pip install cmakelang==0.6.13
- name: Clear annotations
run: .github/workflows/helper/clear-annotations.sh

Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/reanimated-compatibility-check-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,37 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18
- 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: Install React Native CLI
run: yarn add @react-native-community/cli
- name: Create app
run: |
npx react-native@latest init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --skip-install --install-pods 0 --skip-git-init
- name: Setup Yarn Modern
run: yarn rnc-cli init ${{env.APP_NAME}} --version ${{ matrix.react-native.version }} --skip-install --pm yarn --install-pods 0 --skip-git-init
- name: Setup Yarn Modern in app
# For convenience, sometimes there are vague issues with RN CLI and Yarn Legacy on the runner.
working-directory: ${{ env.APP_NAME }}
run: corepack enable && yarn set version berry
run: |
touch yarn.lock
yarn set version berry
yarn config set nodeLinker node-modules
- 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 }}
run: yarn add "react-native-reanimated@https://github.com/software-mansion/react-native-reanimated.git#workspace=react-native-reanimated&commit=${{ github.sha }}"
- name: Install Pods
if: ${{ matrix.platform == 'iOS' }}
working-directory: ${{ env.APP_NAME }}/ios
run: bundle install && bundle exec pod install
run: bundle install && bundle exec pod update
- 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 }}
working-directory: ${{ env.APP_NAME }}/ios
run: xcodebuild -workspace ${{env.APP_NAME}}.xcworkspace -configuration ${{matrix.mode}} -scheme ${{env.APP_NAME}} -destination "generic/platform=iOS Simulator" -quiet
- name: Build app (Android)
if: ${{ matrix.platform == 'Android' }}
working-directory: ${{ env.APP_NAME }}/android
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/reanimated-release-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Reanimated release checks
on:
pull_request:
branches:
- "[0-9]+.[0-9]+-stable"
- '[0-9]+.[0-9]+-stable'
push:
branches:
- "[0-9]+.[0-9]+-stable"
- '[0-9]+.[0-9]+-stable'
workflow_call:
workflow_dispatch:

Expand Down Expand Up @@ -50,11 +50,6 @@ jobs:
name: Example Typescript check and lint
uses: ./.github/workflows/example-typescript-check-and-lint.yml

monorepo_app_reanimated_build_check_nightly:
if: github.repository == 'software-mansion/react-native-reanimated'
name: Monorepo app Reanimated build check [Nightly]
uses: ./.github/workflows/monorepo-app-reanimated-build-check-nightly.yml

reanimated_android_validation:
if: github.repository == 'software-mansion/react-native-reanimated'
name: Reanimated Android validation
Expand Down Expand Up @@ -104,4 +99,3 @@ jobs:
if: github.repository == 'software-mansion/react-native-reanimated'
name: Yarn validation
uses: ./.github/workflows/yarn-validation.yml

Loading

0 comments on commit 324b9b0

Please sign in to comment.