@@ -121,230 +121,16 @@ jobs:
121121 run : yarn format-check
122122
123123 build-test-rntester :
124- name : " Build RNTester - ${{ matrix.platform }}, ${{ matrix.arch }}, ${{ matrix.engine }} "
124+ name : " Build RNTester"
125125 permissions : {}
126- runs-on : macos-15
127- timeout-minutes : 90
128- strategy :
129- fail-fast : false
130- matrix :
131- platform : [macos, ios, xros]
132- arch : [oldarch, newarch]
133- engine : [jsc, hermes]
134- include :
135- # Platform-specific properties
136- - platform : macos
137- sdk : macosx
138- scheme : RNTester-macOS
139- packager_platform : macos
140- - platform : ios
141- sdk : iphonesimulator
142- scheme : RNTester
143- packager_platform : ios
144- - platform : xros
145- sdk : xrsimulator
146- scheme : RNTester-visionOS
147- packager_platform : ios
148- # Architecture-specific properties
149- - arch : oldarch
150- new_arch_enabled : ' 0'
151- - arch : newarch
152- new_arch_enabled : ' 1'
153- - engine : jsc
154- use_hermes : ' 0'
155- - engine : hermes
156- use_hermes : ' 1'
157-
158- steps :
159- - uses : actions/checkout@v4
160- with :
161- filter : blob:none
162- fetch-depth : 0
163-
164- - name : Setup toolchain
165- uses : ./.github/actions/microsoft-setup-toolchain
166- with :
167- node-version : ' 23'
168- platform : ${{ matrix.platform }}
169-
170- - name : Install npm dependencies
171- run : yarn install
172-
173- - name : Install Pods
174- working-directory : packages/rn-tester
175- env :
176- RCT_NEW_ARCH_ENABLED : ${{ matrix.new_arch_enabled }}
177- USE_HERMES : ${{ matrix.use_hermes }}
178- run : |
179- set -eox pipefail
180- bundle install
181- bundle exec pod install --verbose
182-
183- - name : Build ${{ matrix.scheme }}
184- env :
185- CCACHE_DISABLE : 1
186- run : |
187- set -eox pipefail
188- .ado/scripts/xcodebuild.sh packages/rn-tester/RNTesterPods.xcworkspace ${{ matrix.sdk }} Debug ${{ matrix.scheme }} build
126+ uses : ./.github/workflows/microsoft-build-rntester.yml
189127
190128 test-react-native-macos-init :
191129 name : " Test react-native-macos init"
192130 permissions : {}
193- runs-on : macos-15
194- timeout-minutes : 60
195- steps :
196- - uses : actions/checkout@v4
197- with :
198- filter : blob:none
199- fetch-depth : 0
200- lfs : false
201- clean : true
202-
203- - name : Setup toolchain
204- uses : ./.github/actions/microsoft-setup-toolchain
205- with :
206- node-version : ' 23'
207- platform : ' macos'
208-
209- - name : Install npm dependencies
210- run : yarn install
211-
212- - name : Build community CLI plugin
213- run : yarn build
214-
215- - name : Build react-native-macos-init
216- working-directory : packages/react-native-macos-init
217- run : yarn build
218-
219- - name : Start Verdaccio server
220- run : |
221- set -euo pipefail
222- nohup npx verdaccio --config .ado/verdaccio/config.yaml >/dev/null 2>&1 &
223- echo $! > $RUNNER_TEMP/verdaccio.pid
224- - name : Wait for Verdaccio to be ready
225- run : node .ado/scripts/waitForVerdaccio.mjs http://localhost:4873
226-
227- - name : Configure npm for Verdaccio
228- run : .ado/scripts/verdaccio.sh init
229-
230- - name : Publish to Verdaccio
231- run : .ado/scripts/verdaccio.sh publish --branch origin/${{ github.base_ref }}
232- - name : Stop Verdaccio
233- if : always()
234- run : |
235- if [ -f "$RUNNER_TEMP/verdaccio.pid" ]; then
236- kill "$(cat $RUNNER_TEMP/verdaccio.pid)" || true
237- fi
238-
239- - name : Export versions
240- run : node .ado/scripts/export-versions.mjs
241-
242- - name : Initialize new project
243- run : |
244- set -eox pipefail
245- npx --yes @react-native-community/cli init testcli --version $(cat .react_native_version) --skip-install
246- working-directory : ${{ runner.temp }}
247-
248- - name : Install dependencies in new project
249- working-directory : ${{ runner.temp }}/testcli
250- run : |
251- set -eox pipefail
252- yarn install --mode=update-lockfile
253- yarn install
254-
255- - name : Apply macOS template
256- working-directory : ${{ runner.temp }}/testcli
257- run : |
258- set -eox pipefail
259- ${{ github.workspace }}/.ado/scripts/verdaccio.sh configure
260- node ${{ github.workspace }}/packages/react-native-macos-init/bin.js --verbose --version latest --overwrite --prerelease
261- pod install --project-directory=macos
262-
263- - name : Build macOS app
264- working-directory : ${{ runner.temp }}/testcli
265- run : |
266- set -eox pipefail
267- npx react-native build-macos
131+ uses : ./.github/workflows/microsoft-test-react-native-macos-init.yml
268132
269133 react-native-test-app-integration :
270134 name : " Test react-native-test-app integration"
271135 permissions : {}
272- runs-on : macos-15
273- timeout-minutes : 60
274- steps :
275- - uses : actions/checkout@v4
276- with :
277- filter : blob:none
278- fetch-depth : 0
279- clean : true
280-
281- - name : Setup toolchain
282- uses : ./.github/actions/microsoft-setup-toolchain
283- with :
284- node-version : ' 23'
285- platform : ' macos'
286-
287- - name : Install npm dependencies
288- run : yarn install
289-
290- - name : Build community CLI plugin
291- run : yarn build
292-
293- - name : Build react-native-macos-init
294- working-directory : packages/react-native-macos-init
295- run : yarn build
296-
297- - name : Start Verdaccio server
298- run : |
299- set -euo pipefail
300- nohup npx verdaccio --config .ado/verdaccio/config.yaml >/dev/null 2>&1 &
301- echo $! > $RUNNER_TEMP/verdaccio.pid
302- - name : Wait for Verdaccio to be ready
303- run : node .ado/scripts/waitForVerdaccio.mjs http://localhost:4873
304-
305- - name : Configure npm for Verdaccio
306- run : .ado/scripts/verdaccio.sh init
307-
308- - name : Publish to Verdaccio
309- run : .ado/scripts/verdaccio.sh publish --branch origin/${{ github.base_ref }}
310- - name : Stop Verdaccio
311- if : always()
312- run : |
313- if [ -f "$RUNNER_TEMP/verdaccio.pid" ]; then
314- kill "$(cat $RUNNER_TEMP/verdaccio.pid)" || true
315- fi
316-
317- - name : Clone react-native-test-app
318- run : |
319- git clone --filter=blob:none --progress https://github.com/microsoft/react-native-test-app.git
320-
321- - name : Export versions
322- run : node .ado/scripts/export-versions.mjs
323-
324- - name : Configure react-native-test-app dependencies
325- working-directory : react-native-test-app
326- run : |
327- npm run set-react-version $(cat ${{ github.workspace }}/.react_native_version) -- --overrides '{ "react-native-macos": "1000.0.0" }'
328-
329- - name : Install dependencies in test app
330- working-directory : react-native-test-app
331- run : |
332- set -eo pipefail
333- ${{ github.workspace }}/.ado/scripts/verdaccio.sh configure
334- yarn --no-immutable
335-
336- - name : Bundle JavaScript
337- working-directory : react-native-test-app/example
338- run : |
339- yarn build:macos || yarn build:macos
340-
341- - name : Install Pods
342- working-directory : react-native-test-app/example
343- run : |
344- rm -f macos/Podfile.lock
345- pod install --project-directory=macos
346-
347- - name : Build test app
348- working-directory : react-native-test-app/example
349- run : |
350- ../scripts/build/xcodebuild.sh macos/Example.xcworkspace build
136+ uses : ./.github/workflows/microsoft-react-native-test-app-integration.yml
0 commit comments