Skip to content

Commit d425c50

Browse files
committed
Merge up to 0.78-stable branch cut
2 parents f2a6793 + d4407d6 commit d425c50

File tree

1,118 files changed

+120134
-88827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,118 files changed

+120134
-88827
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
docs/generatedComponentApiDocs.js
44
packages/react-native/flow/
55
packages/react-native/sdks/
6+
packages/react-native/ReactAndroid/build
67
packages/react-native/ReactAndroid/hermes-engine/build/
78
packages/react-native/Libraries/Renderer/*
89
packages/react-native/Libraries/vendor/**/*

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ untyped-import
9595
untyped-type-import
9696

9797
[version]
98-
^0.254.2
98+
^0.258.1

.github/actions/build-android/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ runs:
1616
- name: Setup node.js
1717
uses: ./.github/actions/setup-node
1818
- name: Install node dependencies
19-
uses: ./.github/actions/yarn-install-with-cache
19+
uses: ./.github/actions/yarn-install
2020
- name: Set React Native Version
2121
shell: bash
2222
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
23+
# We don't want to re-set the artifacts version if we're on the release branch.
24+
if: ${{ !contains(github.ref, '-stable') }}
2325
- name: Setup gradle
2426
uses: ./.github/actions/setup-gradle
2527
with:

.github/actions/build-hermes-macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
fi
4848
- name: Yarn- Install Dependencies
4949
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
50-
uses: ./.github/actions/yarn-install-with-cache
50+
uses: ./.github/actions/yarn-install
5151
- name: Slice cache macosx
5252
if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }}
5353
uses: actions/download-artifact@v4

.github/actions/build-hermesc-windows/action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ runs:
4343
shell: powershell
4444
run: |
4545
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
46-
choco install --no-progress cmake --version 3.14.7 --allow-downgrade
47-
if (-not $?) { throw "Failed to install CMake" }
48-
4946
cd $Env:HERMES_WS_DIR\icu
5047
# If Invoke-WebRequest shows a progress bar, it will fail with
5148
# Win32 internal error "Access is denied" 0x5 occurred [...]

.github/actions/build-npm-package/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ runs:
103103
- name: Setup gradle
104104
uses: ./.github/actions/setup-gradle
105105
- name: Install dependencies
106-
uses: ./.github/actions/yarn-install-with-cache
106+
uses: ./.github/actions/yarn-install
107107
- name: Build packages
108108
shell: bash
109109
run: yarn build

.github/actions/create-release/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ runs:
1515
using: composite
1616
steps:
1717
- name: Yarn install
18-
uses: ./.github/actions/yarn-install-with-cache
18+
uses: ./.github/actions/yarn-install
1919
- name: Configure Git
2020
shell: bash
2121
run: |

.github/actions/lint/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ runs:
3030
- name: Lint java
3131
shell: bash
3232
run: ./scripts/circleci/exec_swallow_error.sh yarn lint-java --check
33+
- name: Verify not committing repo after running build
34+
shell: bash
35+
run: yarn run build --check
3336
- name: Run flowcheck
3437
shell: bash
3538
run: yarn flow-check

.github/actions/maestro-android/action.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ inputs:
2525
required: false
2626
default: "."
2727
description: The directory from which metro should be started
28+
architecture:
29+
required: false
30+
default: "NewArch"
31+
description: The react native architecture to test
2832

2933
runs:
3034
using: composite
3135
steps:
3236
- name: Installing Maestro
3337
shell: bash
34-
run: export MAESTRO_VERSION=1.36.0; curl -Ls "https://get.maestro.mobile.dev" | bash
38+
run: export MAESTRO_VERSION=1.39.5; curl -Ls "https://get.maestro.mobile.dev" | bash
3539
- name: Set up JDK 17
3640
if: ${{ inputs.install-java == 'true' }}
3741
uses: actions/setup-java@v4
@@ -52,12 +56,15 @@ runs:
5256
if: ${{ inputs.flavor == 'debug' }}
5357
run: ./packages/react-native-codegen/scripts/oss/build.sh
5458
- name: Run e2e tests
59+
id: run-tests
5560
uses: reactivecircus/android-emulator-runner@v2
5661
with:
5762
api-level: 24
5863
arch: x86
59-
ram-size: '4096M'
64+
ram-size: '8192M'
65+
heap-size: '4096M'
6066
disk-size: '10G'
67+
cores: '4'
6168
disable-animations: false
6269
avd-name: e2e_emulator
6370
script: node .github/workflow-scripts/maestro-android.js ${{ inputs.app-path }} ${{ inputs.app-id }} ${{ inputs.maestro-flow }} ${{ inputs.flavor }} ${{ inputs.working-directory }}
@@ -69,16 +76,16 @@ runs:
6976
NORM_APP_ID=$(echo "${{ inputs.app-id }}" | tr '.' '-')
7077
echo "app-id=$NORM_APP_ID" >> $GITHUB_OUTPUT
7178
- name: Store tests result
72-
uses: actions/upload-artifact@v3
79+
uses: actions/upload-artifact@v4.3.4
7380
if: always()
7481
with:
75-
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}
82+
name: e2e_android_${{ steps.normalize-app-id.outputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
7683
path: |
7784
report.xml
7885
screen.mp4
7986
- name: Store Logs
80-
if: failure() && steps.run-tests.outcome == 'failure'
87+
if: steps.run-tests.outcome == 'failure'
8188
uses: actions/[email protected]
8289
with:
83-
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
90+
name: maestro-logs-android-${{ steps.normalize-app-id.outputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
8491
path: /tmp/MaestroLogs

.github/actions/maestro-ios/action.yml

Lines changed: 25 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,22 @@ inputs:
2121
required: false
2222
default: "."
2323
description: The directory from which metro should be started
24+
architecture:
25+
required: false
26+
default: "NewArch"
27+
description: The react native architecture to test
2428

2529
runs:
2630
using: composite
2731
steps:
2832
- name: Installing Maestro
2933
shell: bash
30-
run: export MAESTRO_VERSION=1.36.0; curl -Ls "https://get.maestro.mobile.dev" | bash
34+
run: export MAESTRO_VERSION=1.39.5; curl -Ls "https://get.maestro.mobile.dev" | bash
3135
- name: Installing Maestro dependencies
3236
shell: bash
3337
run: |
3438
brew tap facebook/fb
35-
brew install facebook/fb/idb-companion jq
39+
brew install facebook/fb/idb-companion
3640
- name: Set up JDK 11
3741
uses: actions/setup-java@v2
3842
with:
@@ -42,6 +46,11 @@ runs:
4246
shell: bash
4347
if: ${{ inputs.flavor == 'Debug' }}
4448
run: |
49+
yarn install
50+
51+
# build codegen or we will see a redbox
52+
./packages/react-native-codegen/scripts/oss/build.sh
53+
4554
cd ${{ inputs.working-directory }}
4655
yarn start &
4756
sleep 5 # to give metro time to load
@@ -53,69 +62,28 @@ runs:
5362
# Maestro can fail in case of flakyness, we have some retry logic.
5463
set +e
5564
56-
echo "Launching iOS Simulator: iPhone 15 Pro"
57-
xcrun simctl boot "iPhone 15 Pro"
58-
59-
echo "Installing app on Simulator"
60-
xcrun simctl install booted "${{ inputs.app-path }}"
61-
62-
echo "Retrieving device UDID"
63-
UDID=$(xcrun simctl list devices booted -j | jq -r '[.devices[]] | add | first | .udid')
64-
echo "UDID is $UDID"
65-
66-
echo "Bring simulator in foreground"
67-
open -a simulator
68-
69-
echo "Launch the app"
70-
xcrun simctl launch $UDID ${{ inputs.app-id }}
71-
72-
if [[ ${{ inputs.flavor }} == 'Debug' ]]; then
73-
# To give the app time to warm the metro's cache
74-
sleep 20
75-
fi
76-
77-
echo "Running tests with Maestro"
78-
export MAESTRO_DRIVER_STARTUP_TIMEOUT=1500000 # 25 min. CI is extremely slow
79-
80-
# Add retries for flakyness
81-
MAX_ATTEMPTS=5
82-
CURR_ATTEMPT=0
83-
RESULT=1
84-
85-
while [[ $CURR_ATTEMPT -lt $MAX_ATTEMPTS ]] && [[ $RESULT -ne 0 ]]; do
86-
CURR_ATTEMPT=$((CURR_ATTEMPT+1))
87-
echo "Attempt number $CURR_ATTEMPT"
88-
89-
90-
91-
echo "Start video record using pid: video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid"
92-
xcrun simctl io booted recordVideo video_record_$CURR_ATTEMPT.mov & echo $! > video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid
93-
94-
echo '$HOME/.maestro/bin/maestro --udid=$UDID test ${{ inputs.maestro-flow }} --format junit -e APP_ID=${{ inputs.app-id }}'
95-
$HOME/.maestro/bin/maestro --udid=$UDID test ${{ inputs.maestro-flow }} --format junit -e APP_ID=${{ inputs.app-id }} --debug-output /tmp/MaestroLogs
96-
97-
RESULT=$?
98-
99-
# Stop video
100-
kill -SIGINT $(cat video_record_${{ inputs.jsengine }}_$CURR_ATTEMPT.pid)
101-
done
102-
103-
exit $RESULT
65+
node .github/workflow-scripts/maestro-ios.js \
66+
"${{ inputs.app-path }}" \
67+
"${{ inputs.app-id }}" \
68+
"${{ inputs.maestro-flow }}" \
69+
"${{ inputs.jsengine }}" \
70+
"${{ inputs.flavor }}" \
71+
"${{ inputs.working-directory }}"
10472
- name: Store video record
10573
if: always()
10674
uses: actions/[email protected]
10775
with:
108-
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}
76+
name: e2e_ios_${{ inputs.app-id }}_report_${{ inputs.jsengine }}_${{ inputs.flavor }}_${{ inputs.architecture }}
10977
path: |
110-
video_record_1.mov
111-
video_record_2.mov
112-
video_record_3.mov
113-
video_record_4.mov
114-
video_record_5.mov
78+
video_record_${{ inputs.jsengine }}_1.mov
79+
video_record_${{ inputs.jsengine }}_2.mov
80+
video_record_${{ inputs.jsengine }}_3.mov
81+
video_record_${{ inputs.jsengine }}_4.mov
82+
video_record_${{ inputs.jsengine }}_5.mov
11583
report.xml
11684
- name: Store Logs
11785
if: failure() && steps.run-tests.outcome == 'failure'
11886
uses: actions/[email protected]
11987
with:
120-
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
88+
name: maestro-logs-${{ inputs.app-id }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.architecture }}
12189
path: /tmp/MaestroLogs

.github/actions/prepare-hermes-workspace/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ runs:
6969
7070
- name: Yarn- Install Dependencies
7171
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}
72-
uses: ./.github/actions/yarn-install-with-cache
72+
uses: ./.github/actions/yarn-install
7373

7474
- name: Download Hermes tarball
7575
if: ${{ steps.meaningful-cache.outputs.HERMES_CACHED != 'true' }}

.github/actions/setup-node/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ runs:
1212
uses: actions/setup-node@v4
1313
with:
1414
node-version: ${{ inputs.node-version }}
15+
cache: yarn

.github/actions/test-ios-helloworld/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141
shell: bash
4242
run: ls -lR "$HERMES_WS_DIR"
4343
- name: Run yarn
44-
uses: ./.github/actions/yarn-install-with-cache
44+
uses: ./.github/actions/yarn-install
4545
- name: Setup ruby
4646
uses: ruby/[email protected]
4747
with:

.github/actions/test-ios-rntester/action.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ runs:
4141
- name: Setup node.js
4242
uses: ./.github/actions/setup-node
4343
- name: Run yarn
44-
uses: ./.github/actions/yarn-install-with-cache
44+
uses: ./.github/actions/yarn-install
4545
- name: Download Hermes
4646
uses: actions/download-artifact@v4
4747
with:
@@ -109,25 +109,16 @@ runs:
109109
export USE_FRAMEWORKS=dynamic
110110
fi
111111
112-
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then
113-
export RCT_NEW_ARCH_ENABLED=1
112+
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then
113+
export RCT_NEW_ARCH_ENABLED=0
114114
fi
115115
116116
cd packages/rn-tester
117117
118118
bundle install
119119
bundle exec pod install
120120
- name: Build RNTester
121-
if: ${{ inputs.run-unit-tests != 'true' && inputs.run-e2e-tests == 'false' }}
122121
shell: bash
123-
run: |
124-
xcodebuild build \
125-
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
126-
-scheme RNTester \
127-
-sdk iphonesimulator
128-
- name: Build RNTester (E2E Tests)
129-
shell: bash
130-
if: ${{ inputs.run-e2e-tests == 'true' }}
131122
run: |
132123
xcodebuild \
133124
-scheme "RNTester" \
@@ -138,7 +129,10 @@ runs:
138129
-derivedDataPath "/tmp/RNTesterBuild"
139130
140131
echo "Print path to *.app file"
141-
find "/tmp/RNTesterBuild" -type d -name "*.app"
132+
APP_PATH=$(find "/tmp/RNTesterBuild" -type d -name "*.app")
133+
134+
echo "App found at $APP_PATH"
135+
echo "app-path=$APP_PATH" >> $GITHUB_ENV
142136
- name: "Run Tests: iOS Unit and Integration Tests"
143137
if: ${{ inputs.run-unit-tests == 'true' }}
144138
shell: bash
@@ -158,6 +152,12 @@ runs:
158152
with:
159153
name: xcresults
160154
path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz
155+
- name: Upload RNTester App
156+
if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
157+
uses: actions/[email protected]
158+
with:
159+
name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
160+
path: ${{ env.app-path }}
161161
- name: Store test results
162162
if: ${{ inputs.run-unit-tests == 'true' }}
163163
uses: actions/[email protected]

.github/actions/test-js/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
with:
1414
node-version: ${{ inputs.node-version }}
1515
- name: Yarn install
16-
uses: ./.github/actions/yarn-install-with-cache
16+
uses: ./.github/actions/yarn-install
1717
- name: Run Tests - JavaScript Tests
1818
shell: bash
1919
run: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2

.github/actions/yarn-install-with-cache/action.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: yarn-install
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Install dependencies
6+
shell: bash
7+
run: yarn install --non-interactive --frozen-lockfile

0 commit comments

Comments
 (0)