Skip to content

Commit a916898

Browse files
committed
Move to GH Actions (#158)
* Revert "feat: implement visionOS CI (#54)" This reverts commit ae6f903. * fix: implement GH actions CI
1 parent d56523c commit a916898

File tree

7 files changed

+142
-44
lines changed

7 files changed

+142
-44
lines changed

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

+1-1
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

+1-1
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
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/[email protected]
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

+42-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
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
jobs:
1412
set_release_type:
13+
if: github.repository == 'facebook/react-native'
1514
runs-on: ubuntu-latest
1615
outputs:
1716
RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }}
@@ -33,6 +32,7 @@ jobs:
3332
fi
3433
3534
prepare_hermes_workspace:
35+
if: github.repository == 'facebook/react-native'
3636
runs-on: ubuntu-latest
3737
env:
3838
HERMES_WS_DIR: /tmp/hermes
@@ -51,6 +51,7 @@ jobs:
5151
hermes-version-file: ${{ env.HERMES_VERSION_FILE }}
5252

5353
build_hermesc_apple:
54+
if: github.repository == 'facebook/react-native'
5455
runs-on: macos-13
5556
needs: prepare_hermes_workspace
5657
env:
@@ -65,6 +66,7 @@ jobs:
6566
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
6667

6768
build_apple_slices_hermes:
69+
if: github.repository == 'facebook/react-native'
6870
runs-on: macos-14
6971
needs: [build_hermesc_apple, prepare_hermes_workspace]
7072
env:
@@ -91,6 +93,7 @@ jobs:
9193
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
9294

9395
build_hermes_macos:
96+
if: github.repository == 'facebook/react-native'
9497
runs-on: macos-13
9598
needs: [build_apple_slices_hermes, prepare_hermes_workspace]
9699
env:
@@ -112,6 +115,7 @@ jobs:
112115
flavor: ${{ matrix.flavor }}
113116

114117
test_ios_rntester_ruby_3_2_0:
118+
if: github.repository == 'facebook/react-native'
115119
runs-on: macos-13
116120
needs:
117121
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -129,6 +133,7 @@ jobs:
129133
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
130134

131135
test_ios_rntester_dynamic_frameworks:
136+
if: github.repository == 'facebook/react-native'
132137
runs-on: macos-13
133138
needs:
134139
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -152,6 +157,7 @@ jobs:
152157
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
153158

154159
test_ios_rntester:
160+
if: github.repository == 'facebook/react-native'
155161
runs-on: macos-13
156162
needs:
157163
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
@@ -162,7 +168,6 @@ jobs:
162168
strategy:
163169
fail-fast: false
164170
matrix:
165-
jsengine: [Hermes, JSC]
166171
architecture: [NewArch, OldArch]
167172
steps:
168173
- name: Checkout
@@ -177,6 +182,26 @@ jobs:
177182
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
178183
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
179184

185+
test_visionos_rntester:
186+
runs-on: macos-14-xlarge
187+
continue-on-error: true
188+
strategy:
189+
fail-fast: false
190+
matrix:
191+
architecture: [NewArch, OldArch]
192+
steps:
193+
- name: Checkout
194+
uses: actions/checkout@v4
195+
- name: Run it
196+
uses: ./.github/actions/test-visionos-rntester
197+
with:
198+
jsengine: ${{ matrix.jsengine }}
199+
architecture: ${{ matrix.architecture }}
200+
run-unit-tests: "false"
201+
use-frameworks: StaticLibraries
202+
hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
203+
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
204+
180205
test_e2e_ios_rntester:
181206
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') }}
182207
runs-on: macos-13
@@ -234,7 +259,7 @@ jobs:
234259
- name: Run yarn
235260
uses: ./.github/actions/yarn-install-with-cache
236261
- name: Setup ruby
237-
uses: ruby/setup-ruby@v1.170.0
262+
uses: ruby/setup-ruby@v1.171.0
238263
with:
239264
ruby-version: 2.6.10
240265
- name: Download Hermes
@@ -338,6 +363,7 @@ jobs:
338363
install-java: 'false'
339364

340365
build_hermesc_linux:
366+
if: github.repository == 'facebook/react-native'
341367
runs-on: ubuntu-latest
342368
needs: prepare_hermes_workspace
343369
env:
@@ -353,6 +379,7 @@ jobs:
353379
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
354380

355381
build_hermesc_windows:
382+
if: github.repository == 'facebook/react-native'
356383
runs-on: windows-2019
357384
needs: prepare_hermes_workspace
358385
env:
@@ -372,6 +399,7 @@ jobs:
372399
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
373400

374401
build_android:
402+
if: github.repository == 'facebook/react-native'
375403
runs-on: 8-core-ubuntu
376404
needs: [set_release_type]
377405
container:
@@ -512,6 +540,7 @@ jobs:
512540
compression-level: 0
513541

514542
test_ios_helloworld_with_ruby_3_2_0:
543+
if: github.repository == 'facebook/react-native'
515544
runs-on: macos-13
516545
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
517546
env:
@@ -530,6 +559,7 @@ jobs:
530559
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
531560

532561
test_ios_helloworld:
562+
if: github.repository == 'facebook/react-native'
533563
runs-on: macos-13
534564
needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs
535565
strategy:
@@ -573,6 +603,7 @@ jobs:
573603

574604
lint:
575605
runs-on: ubuntu-latest
606+
if: github.repository == 'facebook/react-native'
576607
env:
577608
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
578609
steps:

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

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ async function runServer(
117117
let reportEvent: (event: TerminalReportableEvent) => void;
118118
const terminal = new Terminal(process.stdout);
119119
const ReporterImpl = getReporterImpl(args.customLogReporterPath);
120+
// $FlowIgnore fix this
120121
const terminalReporter = new ReporterImpl(terminal);
121122
const reporter: Reporter = {
122123
update(event: TerminalReportableEvent) {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -9773,7 +9773,7 @@ exports[`public API should not change unintentionally Libraries/WebSocket/WebSoc
97739773
exports[`public API should not change unintentionally Libraries/WebSocket/WebSocketInterceptor.js 1`] = `"UNTYPED MODULE"`;
97749774

97759775
exports[`public API should not change unintentionally Libraries/WindowManager/NativeWindowManager.js 1`] = `
9776-
"export * from \\"../../src/private/specs/visionos_modules/NativeWindowManager\\";
9776+
"export * from \\"../../visionos_modules/NativeWindowManager\\";
97779777
declare export default typeof NativeWindowManager;
97789778
"
97799779
`;
@@ -9795,7 +9795,7 @@ declare module.exports: WindowManager;
97959795
`;
97969796

97979797
exports[`public API should not change unintentionally Libraries/XR/NativeXRModule.js 1`] = `
9798-
"export * from \\"../../src/private/specs/visionos_modules/NativeXRModule\\";
9798+
"export * from \\"../../visionos_modules/NativeXRModule\\";
97999799
declare export default typeof NativeXRModule;
98009800
"
98019801
`;

yarn.lock

+29-29
Original file line numberDiff line numberDiff line change
@@ -2049,17 +2049,17 @@
20492049
resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.0.tgz#560bec29b2699c4d4cbfecfb4c2c5025397aac23"
20502050
integrity sha512-I8Yy6bCKU5R4qZX4jfXsAPsHyuGHlulbnbG3NqO9JgZ3T2DJxJiZE39rHORP0trLnRh0rIeRcs4Mc14fAE6hrw==
20512051

2052-
"@react-native/[email protected].85":
2053-
version "0.74.85"
2054-
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.85.tgz#067224bf5099ee2679babd700c7115822a747004"
2055-
integrity sha512-48TSDclRB5OMXiImiJkLxyCfRyLsqkCgI8buugCZzvXcYslfV7gCvcyFyQldtcOmerV+CK4RAj7QS4hmB5Mr8Q==
2052+
"@react-native/[email protected].86":
2053+
version "0.74.86"
2054+
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.86.tgz#4edbb8887c5cedefd52e8fda973b1da97c779db4"
2055+
integrity sha512-fO7exk0pdsOSsK3fvDz4YKe5nMeAMrsIGi525pft/L+dedjdeiWYmEoQVc9NElxwwNCldwRY6eNMw6IhKyjzLA==
20562056
dependencies:
2057-
"@react-native/codegen" "0.74.85"
2057+
"@react-native/codegen" "0.74.86"
20582058

2059-
"@react-native/[email protected].85":
2060-
version "0.74.85"
2061-
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.85.tgz#3ce6ca77a318dec226fd9e3fff9c2ef7b0aa66e3"
2062-
integrity sha512-yMHUlN8INbK5BBwiBuQMftdWkpm1IgCsoJTKcGD2OpSgZhwwm8RUSvGhdRMzB2w7bsqqBmaEMleGtW6aCR7B9w==
2059+
"@react-native/[email protected].86":
2060+
version "0.74.86"
2061+
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.86.tgz#8bb3fbd49ce11470eb8022dea2c1e51bfa8dedd4"
2062+
integrity sha512-6A+1NVAHugbBLFNU4iaYrq2lx8P7pINyqoyTtVAqd375PShRmLwu6GvuF3b/4avC97s6LmBljVTJ1xVHukA42g==
20632063
dependencies:
20642064
"@babel/core" "^7.20.0"
20652065
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
@@ -2101,7 +2101,7 @@
21012101
"@babel/plugin-transform-typescript" "^7.5.0"
21022102
"@babel/plugin-transform-unicode-regex" "^7.0.0"
21032103
"@babel/template" "^7.0.0"
2104-
"@react-native/babel-plugin-codegen" "0.74.85"
2104+
"@react-native/babel-plugin-codegen" "0.74.86"
21052105
babel-plugin-transform-flow-enums "^0.0.2"
21062106
react-refresh "^0.14.0"
21072107

@@ -2115,10 +2115,10 @@
21152115
jscodeshift "^0.14.0"
21162116
nullthrows "^1.1.1"
21172117

2118-
"@react-native/[email protected].85":
2119-
version "0.74.85"
2120-
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.85.tgz#568464071c0b9be741da1a1ab43b1df88180ca5d"
2121-
integrity sha512-N7QwoS4Hq/uQmoH83Ewedy6D0M7xbQsOU3OMcQf0eY3ltQ7S2hd9/R4UTalQWRn1OUJfXR6OG12QJ4FStKgV6Q==
2118+
"@react-native/[email protected].86":
2119+
version "0.74.86"
2120+
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.86.tgz#90933f5ee555ffb95ca27372ba1e836f698c3192"
2121+
integrity sha512-BOwABta9035GJ/zLMkxQfgPMr47u1/1HqNIMk10FqmTe0jmROOxKEAeP4FbeS5L1voO4ug3dqr+mcuHrG+HNhA==
21222122
dependencies:
21232123
"@babel/parser" "^7.20.0"
21242124
glob "^7.1.1"
@@ -2145,18 +2145,18 @@
21452145
node-fetch "^2.2.0"
21462146
readline "^1.3.0"
21472147

2148-
"@react-native/[email protected].85":
2149-
version "0.74.85"
2150-
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.85.tgz#a7af94a7b81cb59f241fd1771d1b083445329700"
2151-
integrity sha512-gUIhhpsYLUTYWlWw4vGztyHaX/kNlgVspSvKe2XaPA7o3jYKUoNLc3Ov7u70u/MBWfKdcEffWq44eSe3j3s5JQ==
2148+
"@react-native/[email protected].86":
2149+
version "0.74.86"
2150+
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.86.tgz#87a3c7dfb12ee6e981165e304bbbe20e9b1fa009"
2151+
integrity sha512-Spq1kFX4qvPmT4HuTwpi1ALFtojlJ6s4GpWU2OnpevC/z7ks36lhD3J0rd0D9U5bkxtTYLcg31fPv7nGFC7XZg==
21522152

21532153
"@react-native/dev-middleware@^0.74.0":
2154-
version "0.74.85"
2155-
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.85.tgz#eca35aceb882b1111385f7c20f1aad7a33a2734e"
2156-
integrity sha512-BRmgCK5vnMmHaKRO+h8PKJmHHH3E6JFuerrcfE3wG2eZ1bcSr+QTu8DAlpxsDWvJvHpCi8tRJGauxd+Ssj/c7w==
2154+
version "0.74.86"
2155+
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.86.tgz#b95f936c141dd44309a9ec558ed5ce034e270bc4"
2156+
integrity sha512-sc0tYxYt6dkUbNFI1IANzKO67M41BhjbJ6k/CHoFi/tGoNmHzg9IUZ89V4g3H8hn/VW9dETnPOFna1VO0sWrXg==
21572157
dependencies:
21582158
"@isaacs/ttlcache" "^1.4.1"
2159-
"@react-native/debugger-frontend" "0.74.85"
2159+
"@react-native/debugger-frontend" "0.74.86"
21602160
"@rnx-kit/chromium-edge-launcher" "^1.0.0"
21612161
chrome-launcher "^0.15.2"
21622162
connect "^3.6.5"
@@ -2180,12 +2180,12 @@
21802180
integrity sha512-DMpn5l1TVkIBFe9kE54pwOI2fQYbQNZ6cto0IuCUxQVUFJBcFMJ6Gbk8jhz8tvcWuDW3xVK9AWq9DJTkuchWsQ==
21812181

21822182
"@react-native/metro-babel-transformer@^0.74.0":
2183-
version "0.74.85"
2184-
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.85.tgz#d530d9a6bd319ece226a2d6aaa00b464a1928089"
2185-
integrity sha512-JIrXqEwhTvWPtGArgMptIPGstMdXQIkwSjKVYt+7VC4a9Pw1GurIWanIJheEW6ZuCVvTc0VZkwglFz9JVjzDjA==
2183+
version "0.74.86"
2184+
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.86.tgz#d67d3bf1699fcf834a70155635b30ae9f667b6dd"
2185+
integrity sha512-/9qN5zcnTHGDkC4jWibnoGmRnzDXiurl5wmkvspgnsdrJINN6eGpK8sdIn6nrHFOuPlp3Metqw3HkxbuAfNUXw==
21862186
dependencies:
21872187
"@babel/core" "^7.20.0"
2188-
"@react-native/babel-preset" "0.74.85"
2188+
"@react-native/babel-preset" "0.74.86"
21892189
hermes-parser "0.19.1"
21902190
nullthrows "^1.1.1"
21912191

@@ -2419,9 +2419,9 @@
24192419
integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==
24202420

24212421
"@types/node@^18.0.0":
2422-
version "18.19.42"
2423-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.42.tgz#b54ed4752c85427906aab40917b0f7f3d724bf72"
2424-
integrity sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==
2422+
version "18.19.43"
2423+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.43.tgz#fe01bb599b60bb3279c26d0fdb751d2f3e299ae0"
2424+
integrity sha512-Mw/YlgXnyJdEwLoFv2dpuJaDFriX+Pc+0qOBJ57jC1H6cDxIj2xc5yUrdtArDVG0m+KV6622a4p2tenEqB3C/g==
24252425
dependencies:
24262426
undici-types "~5.26.4"
24272427

0 commit comments

Comments
 (0)