Skip to content

Commit 0d15cf4

Browse files
committed
fix: implement GH actions CI
1 parent 901e3ca commit 0d15cf4

File tree

7 files changed

+142
-44
lines changed

7 files changed

+142
-44
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ runs:
4343
- name: Run yarn
4444
uses: ./.github/actions/yarn-install-with-cache
4545
- name: Setup ruby
46-
uses: ruby/setup-ruby@v1.170.0
46+
uses: ruby/setup-ruby@v1.171.0
4747
with:
4848
ruby-version: ${{ inputs.ruby-version }}
4949
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ runs:
4848
name: hermes-darwin-bin-${{ inputs.flavor }}
4949
path: ${{ inputs.hermes-tarball-artifacts-dir }}
5050
- name: Setup ruby
51-
uses: ruby/setup-ruby@v1.170.0
51+
uses: ruby/setup-ruby@v1.171.0
5252
with:
5353
ruby-version: ${{ inputs.ruby-version }}
5454
- name: Prepare IOS Tests
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: test-visionos-rntester
2+
description: Build visionOS RNTester using JSC
3+
inputs:
4+
use-frameworks:
5+
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
6+
default: StaticLibraries
7+
architecture:
8+
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
9+
default: NewArch
10+
ruby-version:
11+
description: The version of ruby that must be used
12+
default: 2.6.10
13+
flavor:
14+
description: The flavor of the build. Must be one of "Debug", "Release".
15+
default: Debug
16+
react-native-version:
17+
description: The version of react-native
18+
required: true
19+
run-e2e-tests:
20+
description: Whether we want to run E2E tests or not
21+
required: false
22+
default: false
23+
24+
runs:
25+
using: composite
26+
steps:
27+
- name: Setup xcode
28+
uses: ./.github/actions/setup-xcode
29+
with:
30+
xcode-version: "15.4"
31+
- name: Setup node.js
32+
uses: ./.github/actions/setup-node
33+
- name: Run yarn
34+
uses: ./.github/actions/yarn-install-with-cache
35+
- name: Setup ruby
36+
uses: ruby/setup-ruby@v1.171.0
37+
with:
38+
ruby-version: ${{ inputs.ruby-version }}
39+
- name: Setup xcode build cache
40+
uses: ./.github/actions/setup-xcode-build-cache
41+
- name: Install CocoaPods dependencies
42+
shell: bash
43+
run: |
44+
export USE_HERMES=0
45+
46+
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
47+
export USE_FRAMEWORKS=dynamic
48+
fi
49+
50+
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then
51+
export RCT_NEW_ARCH_ENABLED=1
52+
fi
53+
54+
cd packages/rn-tester
55+
56+
bundle install
57+
bundle exec pod install
58+
- name: Build RNTester for visionOS
59+
if: ${{ inputs.run-e2e-tests == 'false' }}
60+
shell: bash
61+
run: |
62+
xcodebuild build \
63+
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
64+
-scheme RNTester-visionOS \
65+
-sdk xrsimulator \
66+
-destination "platform=visionOS Simulator,name=Apple Vision Pro"

.github/workflows/test-all.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: Test All
22

3-
# on:
4-
# workflow_dispatch:
5-
# pull_request:
6-
# push:
7-
# tags:
8-
# - 'v*'
9-
# # nightly build @ 2:15 AM UTC
10-
# schedule:
11-
# - cron: '15 2 * * *'
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
- "*-stable"
1210

1311
concurrency:
1412
group: ${{ github.workflow }}-${{ github.ref }}
1513
cancel-in-progress: true # cancel previous runs
1614

1715
jobs:
1816
set_release_type:
17+
if: github.repository == 'facebook/react-native'
1918
runs-on: ubuntu-latest
2019
outputs:
2120
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
@@ -37,6 +36,7 @@ jobs:
3736
fi
3837
3938
prepare_hermes_workspace:
39+
if: github.repository == 'facebook/react-native'
4040
runs-on: ubuntu-latest
4141
env:
4242
HERMES_WS_DIR: /tmp/hermes
@@ -55,6 +55,7 @@ jobs:
5555
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
5656

5757
build_hermesc_apple:
58+
if: github.repository == 'facebook/react-native'
5859
runs-on: macos-13
5960
needs: prepare_hermes_workspace
6061
env:
@@ -69,6 +70,7 @@ jobs:
6970
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
7071

7172
build_apple_slices_hermes:
73+
if: github.repository == 'facebook/react-native'
7274
runs-on: macos-14
7375
needs: [build_hermesc_apple, prepare_hermes_workspace]
7476
env:
@@ -95,6 +97,7 @@ jobs:
9597
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
9698

9799
build_hermes_macos:
100+
if: github.repository == 'facebook/react-native'
98101
runs-on: macos-13
99102
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
100103
env:
@@ -116,6 +119,7 @@ jobs:
116119
flavor: ${{ matrix.flavor }}
117120

118121
test_ios_rntester_ruby_3_2_0:
122+
if: github.repository == 'facebook/react-native'
119123
runs-on: macos-13
120124
needs:
121125
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -133,6 +137,7 @@ jobs:
133137
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
134138

135139
test_ios_rntester_dynamic_frameworks:
140+
if: github.repository == 'facebook/react-native'
136141
runs-on: macos-13
137142
needs:
138143
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -156,6 +161,7 @@ jobs:
156161
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
157162

158163
test_ios_rntester:
164+
if: github.repository == 'facebook/react-native'
159165
runs-on: macos-13
160166
needs:
161167
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -166,7 +172,6 @@ jobs:
166172
strategy:
167173
fail-fast: false
168174
matrix:
169-
jsengine: [Hermes, JSC]
170175
architecture: [NewArch, OldArch]
171176
steps:
172177
- name: Checkout
@@ -181,6 +186,26 @@ jobs:
181186
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
182187
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
183188

189+
test_visionos_rntester:
190+
runs-on: macos-14-xlarge
191+
continue-on-error: true
192+
strategy:
193+
fail-fast: false
194+
matrix:
195+
architecture: [NewArch, OldArch]
196+
steps:
197+
- name: Checkout
198+
uses: actions/checkout@v4
199+
- name: Run it
200+
uses: ./.github/actions/test-visionos-rntester
201+
with:
202+
jsengine: ${{ matrix.jsengine }}
203+
architecture: ${{ matrix.architecture }}
204+
run-unit-tests: "false"
205+
use-frameworks: StaticLibraries
206+
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
207+
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
208+
184209
test_e2e_ios_rntester:
185210
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
186211
runs-on: macos-13
@@ -238,7 +263,7 @@ jobs:
238263
- name: Run yarn
239264
uses: ./.github/actions/yarn-install-with-cache
240265
- name: Setup ruby
241-
uses: ruby/setup-ruby@v1.170.0
266+
uses: ruby/setup-ruby@v1.171.0
242267
with:
243268
ruby-version: 2.6.10
244269
- name: Download Hermes
@@ -344,6 +369,7 @@ jobs:
344369
install-java: 'false'
345370

346371
build_hermesc_linux:
372+
if: github.repository == 'facebook/react-native'
347373
runs-on: ubuntu-latest
348374
needs: prepare_hermes_workspace
349375
env:
@@ -359,6 +385,7 @@ jobs:
359385
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
360386

361387
build_hermesc_windows:
388+
if: github.repository == 'facebook/react-native'
362389
runs-on: windows-2019
363390
needs: prepare_hermes_workspace
364391
env:
@@ -378,6 +405,7 @@ jobs:
378405
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
379406

380407
build_android:
408+
if: github.repository == 'facebook/react-native'
381409
runs-on: 8-core-ubuntu
382410
needs: [set_release_type]
383411
container:
@@ -516,6 +544,7 @@ jobs:
516544
compression-level: 0
517545

518546
test_ios_helloworld_with_ruby_3_2_0:
547+
if: github.repository == 'facebook/react-native'
519548
runs-on: macos-13
520549
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
521550
env:
@@ -534,6 +563,7 @@ jobs:
534563
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
535564

536565
test_ios_helloworld:
566+
if: github.repository == 'facebook/react-native'
537567
runs-on: macos-13
538568
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
539569
strategy:
@@ -577,6 +607,7 @@ jobs:
577607

578608
lint:
579609
runs-on: ubuntu-latest
610+
if: github.repository == 'facebook/react-native'
580611
env:
581612
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
582613
steps:

packages/community-cli-plugin/src/commands/start/runServer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ async function runServer(
122122
let reportEvent: (event: TerminalReportableEvent) => void;
123123
const terminal = new Terminal(process.stdout);
124124
const ReporterImpl = getReporterImpl(args.customLogReporterPath);
125+
// $FlowIgnore fix this
125126
const terminalReporter = new ReporterImpl(terminal);
126127
const reporter: Reporter = {
127128
update(event: TerminalReportableEvent) {

packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9879,7 +9879,7 @@ exports[`public API should not change unintentionally Libraries/WebSocket/WebSoc
98799879
exports[`public API should not change unintentionally Libraries/WebSocket/WebSocketInterceptor.js 1`] = `"UNTYPED MODULE"`;
98809880

98819881
exports[`public API should not change unintentionally Libraries/WindowManager/NativeWindowManager.js 1`] = `
9882-
"export * from \\"../../src/private/specs/visionos_modules/NativeWindowManager\\";
9882+
"export * from \\"../../visionos_modules/NativeWindowManager\\";
98839883
declare export default typeof NativeWindowManager;
98849884
"
98859885
`;
@@ -9901,7 +9901,7 @@ declare module.exports: WindowManager;
99019901
`;
99029902

99039903
exports[`public API should not change unintentionally Libraries/XR/NativeXRModule.js 1`] = `
9904-
"export * from \\"../../src/private/specs/visionos_modules/NativeXRModule\\";
9904+
"export * from \\"../../visionos_modules/NativeXRModule\\";
99059905
declare export default typeof NativeXRModule;
99069906
"
99079907
`;

yarn.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,17 +2528,17 @@
25282528
resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.0.tgz#560bec29b2699c4d4cbfecfb4c2c5025397aac23"
25292529
integrity sha512-I8Yy6bCKU5R4qZX4jfXsAPsHyuGHlulbnbG3NqO9JgZ3T2DJxJiZE39rHORP0trLnRh0rIeRcs4Mc14fAE6hrw==
25302530

2531-
"@react-native/babel-plugin-codegen@0.74.85":
2532-
version "0.74.85"
2533-
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.85.tgz#067224bf5099ee2679babd700c7115822a747004"
2534-
integrity sha512-48TSDclRB5OMXiImiJkLxyCfRyLsqkCgI8buugCZzvXcYslfV7gCvcyFyQldtcOmerV+CK4RAj7QS4hmB5Mr8Q==
2531+
"@react-native/babel-plugin-codegen@0.74.86":
2532+
version "0.74.86"
2533+
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.86.tgz#4edbb8887c5cedefd52e8fda973b1da97c779db4"
2534+
integrity sha512-fO7exk0pdsOSsK3fvDz4YKe5nMeAMrsIGi525pft/L+dedjdeiWYmEoQVc9NElxwwNCldwRY6eNMw6IhKyjzLA==
25352535
dependencies:
2536-
"@react-native/codegen" "0.74.85"
2536+
"@react-native/codegen" "0.74.86"
25372537

2538-
"@react-native/babel-preset@0.74.85":
2539-
version "0.74.85"
2540-
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.85.tgz#3ce6ca77a318dec226fd9e3fff9c2ef7b0aa66e3"
2541-
integrity sha512-yMHUlN8INbK5BBwiBuQMftdWkpm1IgCsoJTKcGD2OpSgZhwwm8RUSvGhdRMzB2w7bsqqBmaEMleGtW6aCR7B9w==
2538+
"@react-native/babel-preset@0.74.86":
2539+
version "0.74.86"
2540+
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.86.tgz#8bb3fbd49ce11470eb8022dea2c1e51bfa8dedd4"
2541+
integrity sha512-6A+1NVAHugbBLFNU4iaYrq2lx8P7pINyqoyTtVAqd375PShRmLwu6GvuF3b/4avC97s6LmBljVTJ1xVHukA42g==
25422542
dependencies:
25432543
"@babel/core" "^7.20.0"
25442544
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
@@ -2580,7 +2580,7 @@
25802580
"@babel/plugin-transform-typescript" "^7.5.0"
25812581
"@babel/plugin-transform-unicode-regex" "^7.0.0"
25822582
"@babel/template" "^7.0.0"
2583-
"@react-native/babel-plugin-codegen" "0.74.85"
2583+
"@react-native/babel-plugin-codegen" "0.74.86"
25842584
babel-plugin-transform-flow-enums "^0.0.2"
25852585
react-refresh "^0.14.0"
25862586

@@ -2594,10 +2594,10 @@
25942594
jscodeshift "^0.14.0"
25952595
nullthrows "^1.1.1"
25962596

2597-
"@react-native/codegen@0.74.85":
2598-
version "0.74.85"
2599-
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.85.tgz#568464071c0b9be741da1a1ab43b1df88180ca5d"
2600-
integrity sha512-N7QwoS4Hq/uQmoH83Ewedy6D0M7xbQsOU3OMcQf0eY3ltQ7S2hd9/R4UTalQWRn1OUJfXR6OG12QJ4FStKgV6Q==
2597+
"@react-native/codegen@0.74.86":
2598+
version "0.74.86"
2599+
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.86.tgz#90933f5ee555ffb95ca27372ba1e836f698c3192"
2600+
integrity sha512-BOwABta9035GJ/zLMkxQfgPMr47u1/1HqNIMk10FqmTe0jmROOxKEAeP4FbeS5L1voO4ug3dqr+mcuHrG+HNhA==
26012601
dependencies:
26022602
"@babel/parser" "^7.20.0"
26032603
glob "^7.1.1"
@@ -2624,18 +2624,18 @@
26242624
node-fetch "^2.2.0"
26252625
readline "^1.3.0"
26262626

2627-
"@react-native/debugger-frontend@0.74.85":
2628-
version "0.74.85"
2629-
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.85.tgz#a7af94a7b81cb59f241fd1771d1b083445329700"
2630-
integrity sha512-gUIhhpsYLUTYWlWw4vGztyHaX/kNlgVspSvKe2XaPA7o3jYKUoNLc3Ov7u70u/MBWfKdcEffWq44eSe3j3s5JQ==
2627+
"@react-native/debugger-frontend@0.74.86":
2628+
version "0.74.86"
2629+
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.86.tgz#87a3c7dfb12ee6e981165e304bbbe20e9b1fa009"
2630+
integrity sha512-Spq1kFX4qvPmT4HuTwpi1ALFtojlJ6s4GpWU2OnpevC/z7ks36lhD3J0rd0D9U5bkxtTYLcg31fPv7nGFC7XZg==
26312631

26322632
"@react-native/dev-middleware@^0.74.0":
2633-
version "0.74.85"
2634-
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.85.tgz#eca35aceb882b1111385f7c20f1aad7a33a2734e"
2635-
integrity sha512-BRmgCK5vnMmHaKRO+h8PKJmHHH3E6JFuerrcfE3wG2eZ1bcSr+QTu8DAlpxsDWvJvHpCi8tRJGauxd+Ssj/c7w==
2633+
version "0.74.86"
2634+
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.86.tgz#b95f936c141dd44309a9ec558ed5ce034e270bc4"
2635+
integrity sha512-sc0tYxYt6dkUbNFI1IANzKO67M41BhjbJ6k/CHoFi/tGoNmHzg9IUZ89V4g3H8hn/VW9dETnPOFna1VO0sWrXg==
26362636
dependencies:
26372637
"@isaacs/ttlcache" "^1.4.1"
2638-
"@react-native/debugger-frontend" "0.74.85"
2638+
"@react-native/debugger-frontend" "0.74.86"
26392639
"@rnx-kit/chromium-edge-launcher" "^1.0.0"
26402640
chrome-launcher "^0.15.2"
26412641
connect "^3.6.5"
@@ -2659,12 +2659,12 @@
26592659
integrity sha512-DMpn5l1TVkIBFe9kE54pwOI2fQYbQNZ6cto0IuCUxQVUFJBcFMJ6Gbk8jhz8tvcWuDW3xVK9AWq9DJTkuchWsQ==
26602660

26612661
"@react-native/metro-babel-transformer@^0.74.0":
2662-
version "0.74.85"
2663-
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.85.tgz#d530d9a6bd319ece226a2d6aaa00b464a1928089"
2664-
integrity sha512-JIrXqEwhTvWPtGArgMptIPGstMdXQIkwSjKVYt+7VC4a9Pw1GurIWanIJheEW6ZuCVvTc0VZkwglFz9JVjzDjA==
2662+
version "0.74.86"
2663+
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.86.tgz#d67d3bf1699fcf834a70155635b30ae9f667b6dd"
2664+
integrity sha512-/9qN5zcnTHGDkC4jWibnoGmRnzDXiurl5wmkvspgnsdrJINN6eGpK8sdIn6nrHFOuPlp3Metqw3HkxbuAfNUXw==
26652665
dependencies:
26662666
"@babel/core" "^7.20.0"
2667-
"@react-native/babel-preset" "0.74.85"
2667+
"@react-native/babel-preset" "0.74.86"
26682668
hermes-parser "0.19.1"
26692669
nullthrows "^1.1.1"
26702670

@@ -2911,9 +2911,9 @@
29112911
integrity sha512-CK2fnrQlIgKlCV3N2kM+Gznb5USlwA1KFX3rJVHmgVk6NJxFPuQ86pAcvKnu37IA4BGlSRz7sEE1lHL1aLZ/eQ==
29122912

29132913
"@types/node@^18.0.0":
2914-
version "18.19.42"
2915-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.42.tgz#b54ed4752c85427906aab40917b0f7f3d724bf72"
2916-
integrity sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==
2914+
version "18.19.43"
2915+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.43.tgz#fe01bb599b60bb3279c26d0fdb751d2f3e299ae0"
2916+
integrity sha512-Mw/YlgXnyJdEwLoFv2dpuJaDFriX+Pc+0qOBJ57jC1H6cDxIj2xc5yUrdtArDVG0m+KV6622a4p2tenEqB3C/g==
29172917
dependencies:
29182918
undici-types "~5.26.4"
29192919

0 commit comments

Comments
 (0)