Skip to content

Commit a822789

Browse files
committed
Merge branch 'main' into improve-lineheight-calc-ios
2 parents b911e26 + 3bb86b0 commit a822789

646 files changed

Lines changed: 57760 additions & 8792 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module.exports = {
7474
'lint/no-haste-imports': 2,
7575
'lint/no-react-native-imports': 2,
7676
'lint/require-extends-error': 2,
77+
'lint/no-react-node-imports': 2,
7778
},
7879
},
7980
{

.flowconfig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/packages/react-nat
6767
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/packages/dev-middleware'
6868
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/packages/react-native/Libraries/Image/RelativeImageStub'
6969

70+
react.runtime=automatic
71+
7072
suppress_type=$FlowIssue
7173
suppress_type=$FlowFixMe
7274
suppress_type=$FlowFixMeProps
@@ -96,4 +98,4 @@ untyped-import
9698
untyped-type-import
9799

98100
[version]
99-
^0.263.0
101+
^0.265.3

.github/actions/setup-xcode-build-cache/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ runs:
3030
uses: actions/cache@v4
3131
with:
3232
path: packages/rn-tester/Podfile.lock
33-
key: v11-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
33+
key: v13-podfilelock-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version }}
3434
- name: Cache cocoapods
3535
uses: actions/cache@v4
3636
with:
3737
path: packages/rn-tester/Pods
38-
key: v13-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}
38+
key: v15-cocoapods-${{ github.job }}-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}-${{ inputs.use-frameworks }}-${{ inputs.ruby-version }}-${{ hashfiles('packages/rn-tester/Podfile.lock') }}-${{ hashfiles('packages/rn-tester/Podfile') }}-${{ inputs.hermes-version}}

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ runs:
4646
uses: ruby/setup-ruby@v1.170.0
4747
with:
4848
ruby-version: ${{ inputs.ruby-version }}
49+
- name: Download ReactNativeDependencies
50+
uses: actions/download-artifact@v4
51+
with:
52+
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
53+
path: /tmp/third-party
54+
- name: Print third-party folder
55+
shell: bash
56+
run: ls -lR /tmp/third-party
4957
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
5058
shell: bash
5159
run: |
@@ -77,8 +85,10 @@ runs:
7785
7886
BUILD_TYPE="${{ inputs.flavor }}"
7987
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE")
80-
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
81-
HERMES_ENGINE_TARBALL_PATH="$HERMES_PATH" yarn bootstrap ios "${args[@]}" | cat
88+
export HERMES_ENGINE_TARBALL_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME"
89+
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
90+
91+
yarn bootstrap ios "${args[@]}" | cat
8292
fi
8393
- name: Build HelloWorld project
8494
shell: bash

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ runs:
9292
else
9393
echo 'No Hermes tarball found.'
9494
fi
95+
- name: Download ReactNativeDependencies
96+
uses: actions/download-artifact@v4
97+
with:
98+
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
99+
path: /tmp/third-party/
100+
- name: Print third-party folder
101+
shell: bash
102+
run: ls -lR /tmp/third-party
95103
- name: Setup xcode build cache
96104
uses: ./.github/actions/setup-xcode-build-cache
97105
with:
@@ -118,6 +126,7 @@ runs:
118126
export RCT_NEW_ARCH_ENABLED=0
119127
fi
120128
129+
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
121130
cd packages/rn-tester
122131
123132
bundle install

.github/workflows/prebuild-ios.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/cache/restore@v4
1919
with:
2020
path: packages/react-native/third-party/
21-
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
21+
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
2222
enableCrossOsArchive: true
2323
- name: Yarn Install
2424
if: steps.restore-ios-prebuilds.outputs.cache-hit != 'true'
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/cache/save@v4
4141
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
4242
with:
43-
key: v1-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
43+
key: v2-ios-dependencies-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
4444
enableCrossOsArchive: true
4545
path: packages/react-native/third-party/
4646

@@ -74,7 +74,7 @@ jobs:
7474
uses: actions/cache/restore@v4
7575
with:
7676
path: packages/react-native/third-party/.build/Build/Products
77-
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
77+
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
7878
- name: Yarn Install
7979
if: steps.restore-slice-folder.outputs.cache-hit != 'true'
8080
uses: ./.github/actions/yarn-install
@@ -107,7 +107,7 @@ jobs:
107107
uses: actions/cache/save@v4
108108
if: ${{ github.ref == 'refs/heads/main' }} # To avoid that the cache explode
109109
with:
110-
key: v1-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
110+
key: v2-ios-dependencies-slice-folder-${{ matrix.slice }}-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
111111
enableCrossOsArchive: true
112112
path: |
113113
packages/react-native/third-party/.build/Build/Products
@@ -138,11 +138,17 @@ jobs:
138138
with:
139139
path: |
140140
packages/react-native/third-party/
141-
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
141+
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
142142
# If cache hit, we already have our binary. We don't need to do anything.
143143
- name: Yarn Install
144144
if: steps.restore-xcframework.outputs.cache-hit != 'true'
145145
uses: ./.github/actions/yarn-install
146+
- name: Restore workspace
147+
if: steps.restore-xcframework.outputs.cache-hit != 'true'
148+
uses: actions/download-artifact@v4
149+
with:
150+
name: ios-prebuilds-workspace
151+
path: packages/react-native/third-party/
146152
- name: Download slices
147153
if: steps.restore-xcframework.outputs.cache-hit != 'true'
148154
uses: actions/download-artifact@v4
@@ -193,4 +199,4 @@ jobs:
193199
path: |
194200
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
195201
packages/react-native/third-party/ReactNativeDependencies${{ matrix.flavor }}.framework.dSYM.tar.gz
196-
key: v1-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}
202+
key: v2-ios-dependencies-xcframework-${{ matrix.flavor }}-${{ hashfiles('scripts/releases/ios-prebuild/configuration.js') }}

.github/workflows/test-all.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
test_ios_rntester_ruby_3_2_0:
124124
runs-on: macos-13
125125
needs:
126-
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
126+
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
127127
env:
128128
HERMES_WS_DIR: /tmp/hermes
129129
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -140,7 +140,7 @@ jobs:
140140
test_ios_rntester_dynamic_frameworks:
141141
runs-on: macos-13
142142
needs:
143-
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
143+
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
144144
env:
145145
HERMES_WS_DIR: /tmp/hermes
146146
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -163,7 +163,7 @@ jobs:
163163
test_ios_rntester:
164164
runs-on: macos-13-large
165165
needs:
166-
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
166+
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies]
167167
env:
168168
HERMES_WS_DIR: /tmp/hermes
169169
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -232,7 +232,7 @@ jobs:
232232
test_e2e_ios_templateapp:
233233
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }}
234234
runs-on: macos-13-large
235-
needs: build_npm_package
235+
needs: [build_npm_package, prebuild_apple_dependencies]
236236
env:
237237
HERMES_WS_DIR: /tmp/hermes
238238
HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin
@@ -268,6 +268,14 @@ jobs:
268268
path: /tmp/react-native-tmp
269269
- name: Print /tmp folder
270270
run: ls -lR /tmp/react-native-tmp
271+
- name: Download ReactNativeDependencies
272+
uses: actions/download-artifact@v4
273+
with:
274+
name: ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
275+
path: /tmp/third-party
276+
- name: Print third-party folder
277+
shell: bash
278+
run: ls -lR /tmp/third-party
271279
- name: Prepare artifacts
272280
run: |
273281
REACT_NATIVE_PKG=$(find /tmp/react-native-tmp -type f -name "*.tgz")
@@ -292,6 +300,8 @@ jobs:
292300
echo "Disable the New Architecture"
293301
NEW_ARCH_ENABLED=0
294302
fi
303+
304+
export RCT_USE_LOCAL_RN_DEP=/tmp/third-party/ReactNativeDependencies${{ matrix.flavor }}.xcframework.tar.gz
295305
HERMES_ENGINE_TARBALL_PATH=$HERMES_PATH RCT_NEW_ARCH_ENABLED=$NEW_ARCH_ENABLED bundle exec pod install
296306
297307
xcodebuild \
@@ -580,7 +590,7 @@ jobs:
580590

581591
test_ios_helloworld_with_ruby_3_2_0:
582592
runs-on: macos-13
583-
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
593+
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
584594
env:
585595
PROJECT_NAME: iOSTemplateProject
586596
HERMES_WS_DIR: /tmp/hermes
@@ -598,7 +608,7 @@ jobs:
598608

599609
test_ios_helloworld:
600610
runs-on: macos-13
601-
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
611+
needs: [prepare_hermes_workspace, build_hermes_macos, prebuild_apple_dependencies] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
602612
strategy:
603613
matrix:
604614
flavor: [Debug, Release]

0 commit comments

Comments
 (0)