Skip to content

Commit 832e1e5

Browse files
okwasniewskidoranteseduardo
authored andcommitted
feat: add visionos support
fix: address issues with scale, ScrollView prop feat: move min_visionos_version_supported to Helpers feat: implement `visionos_hoverStyle` prop chore: update README.MD fix: refactor visionos_hoverStyle to take a string and new arch support docs: add link to rn-tester's README.md (callstack#5) chore: change VisionOS to visionOS (callstack#13) chore: use `min_supported_versions` for third-party-podspecs (callstack#18) chore: remove not necessary ifs TARGET_OS_VISION, minimise code diff (callstack#22) feat: add visionos support add warning when using InputAccessoryView update platform naming fix: remove keyboard listerners and mark as unsupported (callstack#25) * fix: remove keyboard listerners and mark as unsupported * chore: replace warn with warnOnce feat: support building visionOS with dynamic frameworks enabled (callstack#28) chore: sync Podfile.lock with upstream, remove unnecessary #endif feat: add visionOS as separate target to fix iOS tests (callstack#31) * feat: add visionOS as separate target to fix iOS tests * fix: disable multiple windows support * feat: add visionOS App Icon * fix: creating Release build Update README.md (callstack#36) * Update README.md * fix: update README link * feat: add caution section * fix: bring back info about Hermes Add platform guidelines to README (callstack#37) * Add platform guidelines to README * fix: link to docs Rename react-native package to @callstack/react-native-visionos (callstack#35) * rename react-native package to @callstack/react-native-visionos * fix typo * Make JS and TS tests independent of react-native package name * change name in template * replace more refs in e2e tests * revert tests changes * disable js e2e tests for visionos * bring back react-native for other platforms compat * ci: run js, no e2e js Fix codegen issues for RNTester after renaming package (callstack#40) feat: make hermes build for visionOS (callstack#26) * [WIP] feat: make hermes build for visionOS * feat: point to callstack/hermes-visionos fork, update README * fix: remove USE_HERMES from project.pbxproj feat: align unnecessary compiler conditionals (callstack#51) chore: sync Podfile.lock feat: implement OOT release script (callstack#43) * feat: implement OOT release script * docs: add readme on Release process * fix: remove header file Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * add reference --------- Co-authored-by: Michał Pierzchała <thymikee@gmail.com> feat: add visionOS template (callstack#34) * Update CLI to v12.1.1 * feat: implement visionos react-native template * feat: modify template look * feat: add `@callstack/out-of-tree-platforms` to metro config * fix: metro config * feat: update supported platforms --------- Co-authored-by: szymonrybczak <szymon.rybczak@gmail.com> task(StatusBar component): show warn when using StatusBar (callstack#49) * task(StatusBar component): show warn when using StatusBar * pr suggestions docs: update CMake instructions (callstack#55) Fix iOS native tests (callstack#58) * fix: remove unnecessary libevent.podspec * fix: make OCMock build for visionOS fix: remove unnecessary YogaKit pod (callstack#61) feat: add warning while building Hermes that at least CMake 3.28.0 is required (callstack#63) fix: RCTAlertController transparent background override added cornerRadius for hover style (callstack#66) * added corner radius for hover style * fix: implement proper handling for old arch, reformat code --------- Co-authored-by: Oskar Kwaśniewski <oskarkwasniewski@icloud.com> chore: sync Podfile.lock fix: don't warn users about the Keyboard API (callstack#71) feat: implement visionos cli commands (callstack#64) fix: use isVision instead of isVisionOS (callstack#76) fix: release build bundle (callstack#74) fix: remove duplicated isVision key (callstack#78) fix: change resolver option name (callstack#79) fix: RCTDeviceInfo UIApplicationDidChangeStatusBarOrientationNotification method fix: update README.md with corrected capitalization (callstack#84) fix: upstream sync ifdefs fix: providing unsupported value to hoverStyle crashed the app (callstack#88) fix: pointer events (callstack#114) fix: hoverEffect for bridgeless mode (callstack#92) refactor: remove unused RCTForegroundWindow (callstack#94) fix: properly retrieve window when clicking DevMenu action (callstack#95) sync with upstream chore: sync Podfile.lock docs: add how is it different from iOS version section (callstack#91) docs: move to documentation website (callstack#119) Update README.md (callstack#121) * Update README.md * Update README.md Co-authored-by: Kacper Rożniata <56474758+krozniata@users.noreply.github.com> --------- Co-authored-by: Kacper Rożniata <56474758+krozniata@users.noreply.github.com> Update getting started link in Readme. (callstack#123) Co-authored-by: christinamartinez <christina.martinez@faithlife.com> chore: remove hover effect & add cursor: pointer (callstack#122) * chore: remove hover effect * fix: set cursor pointer by default, update tests * feat(iOS): Implement cursor style prop --------- Co-authored-by: Saad Najmi <sanajmi@microsoft.com> chore: resync with upstream fix: change versio of @callstack/out-of-tree-platforms feat: make SwiftUI React Native entry point (callstack#68) * feat: add Swift entrypoint [wip] add module maps to some RN modules to allow for swift c++ imports feat: implement RCTReactController and RCTSwiftUIAppDelegate feat: introduce new method to RCTAppDelegate * feat: modify template to use SwiftUI * fix: dimensions, use RCTMainWindow() * fix: fallback to DarkMode on visionOS * fix: use KeyWindow() in RCTPerfMonitor feat: update docs (callstack#80) * feat: update docs * Update README.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * Update README.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * Update README.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * Update README.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com> * Update README.md Co-authored-by: Michał Pierzchała <thymikee@gmail.com> --------- Co-authored-by: Michał Pierzchała <thymikee@gmail.com> feat: add UIApplicationSceneManifest to template Create custom resolver and utils package for out-of-tree platforms (callstack#32) * rename react-native package to @callstack/react-native-visionos * wip: metro setup for other platform * fix(flow): add .ios.visionos as support platform * fix some flow errors * fix flow * revert Platform.select change * revert KeyboardAvoidingView change * fix type * change kBundlePath to ios.visionos * fix: remove redundant isVisionOS * use custom resolver options to read platform for OOT * fix types * remove formatting * add/remove platform checks * document variant behavior * use visionOS Keyboard mock * use visionOS KeyboardAvoidingView mock * use visionOS InputAccessoryView mock * test: add test for metroPlatformResolver * move implementation to user space * create out-of-tree-platforms package and bring back resolver options * revert flow changes * revert sourceExts changes * update links * add comments * fix visionos typo * adjust lockfile * revert loadMetroConfig change * remove podfile lock * revert scripts changes Fix build step for `@callstack/out-of-tree-platforms` (callstack#46) * feat: setup @callstack/out-of-tree-platforms to build properly * feat: add build packages step to `oot-release.js` script * chore: format package.json fix(callstack#48) local build of @callstack/out-of-tree-platforms (callstack#50) feat: Automate releases to GitHub (callstack#83) fix: adjust oot-release script for stable releases (callstack#85) fix: hermes xcode build scripts (callstack#133) feat: release scripts chore: sync with upstream chore: sync with upstream chore: sync with upstream prevent keyboard api in ScrollView (callstack#143) chore: sync with upstream feat: include privacy info manifest (callstack#144) chore: sync with upstream fix: local commands parameters (callstack#134) fix: add missing index.flow.js file to out-of-tree-platforms package feat: implement `XR` API (callstack#81) * feat: implement Spatial API * feat: make RCTSpatial decoupled from RCTMainWindow() * feat: implement XR module docs: add image to README, annotate nightly APIs fix: export XR library from typescript feat: add multi-window support (callstack#117) * feat: add multi-window support * feat: introduce WindowManager fix: RCTReactViewController properly check props to update fix: use clearColor instead of systemBackgroundColor for visionOS (callstack#125) feat: allow to use WindowHandlingModifier outside of RCTMainWindow fix: deep and universal links when app is running (callstack#140) Co-authored-by: Thiago Brezinski <thiagobrez@gmail.com> fix: remove window init feat: add support for ornaments & dev menu trigger (callstack#149) * feat: add support for ornaments * feat: add ornaments support to second window fix: allow to manually move dev menu to avoid conflicts (callstack#150) fix: remove unnecessary diff after upstreaming changes (callstack#151) Make CMake 3.29.0 as minimum required version (callstack#155) fix: move visionOS codegen specs, sync with upstream chore: sync with upstream fix: remove template Move template to a separate repo fix: update oot-release scripts chore: remove unnecessary diff (callstack#159) fix: react-native-config chore: sync with upstream chore: sync with upstrteam Move to GH Actions (callstack#158) * Revert "feat: implement visionOS CI (callstack#54)" This reverts commit ae6f903. * fix: implement GH actions CI chore: sync with upstream chore: remove automatic cursor pointer (callstack#161) Download VisionOS SDK (callstack#163) chore: sync with upstream chore: remove oot-platforms package (callstack#165) chore: sync with upstream feat: new readme docs: update link
1 parent e2f8b5a commit 832e1e5

108 files changed

Lines changed: 6331 additions & 5196 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.

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

Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,89 @@
11
name: test-ios-helloworld
22
description: Test iOS Hello World
33
inputs:
4+
jsengine:
5+
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
6+
default: Hermes
47
use-frameworks:
58
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
69
default: StaticLibraries
10+
architecture:
11+
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup. Must be one of "OldArch" or "NewArch"
12+
default: OldArch
713
ruby-version:
814
description: The version of ruby that must be used
915
default: 2.6.10
1016
flavor:
1117
description: The flavor of the build. Must be one of "Debug", "Release".
1218
default: Debug
13-
use-hermes-nightly:
14-
description: Whether to override pinned Hermes versions with the latest nightly
15-
required: false
16-
default: 'true'
19+
hermes-version:
20+
description: The version of hermes
21+
required: true
22+
react-native-version:
23+
description: The version of react-native
24+
required: true
1725
runs:
1826
using: composite
1927
steps:
2028
- name: Setup xcode
2129
uses: ./.github/actions/setup-xcode
22-
with:
23-
platform: ios
2430
- name: Setup node.js
2531
uses: ./.github/actions/setup-node
26-
- name: Run yarn install
27-
uses: ./.github/actions/yarn-install
28-
- name: Setup ruby
29-
uses: ruby/setup-ruby@v1
30-
with:
31-
ruby-version: ${{ inputs.ruby-version }}
32-
- name: Set nightly Hermes versions
33-
if: ${{ inputs.use-hermes-nightly == 'true' }}
32+
- name: Create Hermes folder
3433
shell: bash
35-
run: |
36-
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
37-
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
38-
node ./scripts/releases/use-hermes-nightly.js
39-
fi
40-
- name: Run yarn install again, with the correct hermes version
41-
if: ${{ inputs.use-hermes-nightly == 'true' }}
42-
uses: ./.github/actions/yarn-install
43-
- name: Download ReactNativeDependencies
44-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
34+
run: mkdir -p "$HERMES_WS_DIR"
35+
- name: Download Hermes
4536
uses: actions/download-artifact@v4
4637
with:
47-
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
48-
path: /tmp/third-party
49-
- name: Print third-party folder
50-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
38+
name: hermes-darwin-bin-${{ inputs.flavor }}
39+
path: /tmp/hermes/hermes-runtime-darwin/
40+
- name: Print Downloaded hermes
5141
shell: bash
52-
run: ls -lR /tmp/third-party
53-
- name: Download React Native Prebuilds
54-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
55-
uses: actions/download-artifact@v4
42+
run: ls -lR "$HERMES_WS_DIR"
43+
- name: Run yarn
44+
uses: ./.github/actions/yarn-install
45+
- name: Setup ruby
46+
uses: ruby/setup-ruby@v1.171.0
5647
with:
57-
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
58-
path: /tmp/ReactCore
59-
- name: Print ReactCore folder
60-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
61-
shell: bash
62-
run: ls -lR /tmp/ReactCore
63-
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }};
48+
ruby-version: ${{ inputs.ruby-version }}
49+
- name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }}
6450
shell: bash
6551
run: |
66-
cd private/helloworld
52+
cd packages/helloworld
6753
args=()
6854
55+
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then
56+
args+=(--arch old)
57+
fi
58+
6959
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
7060
args+=(--frameworks dynamic)
71-
else
72-
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
73-
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
7461
fi
7562
76-
yarn bootstrap ios "${args[@]}" | cat
63+
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
64+
args+=(--jsvm jsc)
65+
yarn bootstrap ios "${args[@]}" | cat
66+
else
67+
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased.
68+
# Let's ensure that the tarballs have the right names
7769
78-
- name: Run Helloworld tests
79-
shell: bash
80-
run: |
81-
cd private/helloworld
82-
yarn test
70+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then
71+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz"
72+
fi
8373
84-
- name: Build HelloWorld project
74+
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then
75+
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz"
76+
fi
77+
78+
BUILD_TYPE="${{ inputs.flavor }}"
79+
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
82+
fi
83+
- name: Build HelloWorld project
8584
shell: bash
8685
run: |
87-
cd private/helloworld
86+
cd packages/helloworld
8887
8988
args=()
9089
if [[ ${{ inputs.flavor }} == "Release" ]]; then

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

Lines changed: 73 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,122 @@
11
name: test-ios-rntester
22
description: Test iOS RNTester
33
inputs:
4+
jsengine:
5+
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
6+
default: Hermes
47
use-frameworks:
58
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks"
69
default: StaticLibraries
10+
architecture:
11+
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup
12+
default: NewArch
713
ruby-version:
814
description: The version of ruby that must be used
915
default: 2.6.10
1016
run-unit-tests:
1117
description: whether unit tests should run or not.
1218
default: "false"
19+
hermes-tarball-artifacts-dir:
20+
description: The directory where the hermes tarball artifacts are stored
21+
default: /tmp/hermes/hermes-runtime-darwin
1322
flavor:
1423
description: The flavor of the build. Must be one of "Debug", "Release".
1524
default: Debug
25+
hermes-version:
26+
description: The version of hermes
27+
required: true
28+
react-native-version:
29+
description: The version of react-native
30+
required: true
1631
run-e2e-tests:
1732
description: Whether we want to run E2E tests or not
1833
required: false
1934
default: false
20-
use-hermes-nightly:
21-
description: Whether to override pinned Hermes versions with the latest nightly
22-
required: false
23-
default: 'true'
2435

2536
runs:
2637
using: composite
2738
steps:
2839
- name: Setup xcode
2940
uses: ./.github/actions/setup-xcode
30-
with:
31-
platform: ios
3241
- name: Setup node.js
3342
uses: ./.github/actions/setup-node
3443
- name: Run yarn
3544
uses: ./.github/actions/yarn-install
45+
- name: Download Hermes
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: hermes-darwin-bin-${{ inputs.flavor }}
49+
path: ${{ inputs.hermes-tarball-artifacts-dir }}
3650
- name: Setup ruby
37-
uses: ruby/setup-ruby@v1
51+
uses: ruby/setup-ruby@v1.171.0
3852
with:
3953
ruby-version: ${{ inputs.ruby-version }}
40-
- name: Set nightly Hermes versions
41-
if: ${{ inputs.use-hermes-nightly == 'true' }}
42-
shell: bash
43-
run: |
44-
HERMES_VERSION=$(sed -n 's/^HERMES_VERSION_NAME=//p' packages/react-native/sdks/hermes-engine/version.properties)
45-
if [ "$HERMES_VERSION" == "1000.0.0" ]; then
46-
node ./scripts/releases/use-hermes-nightly.js
47-
fi
48-
- name: Run yarn install again, with the correct hermes version
49-
if: ${{ inputs.use-hermes-nightly == 'true' }}
50-
uses: ./.github/actions/yarn-install
5154
- name: Prepare IOS Tests
5255
if: ${{ inputs.run-unit-tests == 'true' }}
5356
uses: ./.github/actions/prepare-ios-tests
54-
- name: Download ReactNativeDependencies
55-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
56-
uses: actions/download-artifact@v4
57-
with:
58-
name: ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz
59-
path: /tmp/third-party/
60-
- name: Print third-party folder
61-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
57+
- name: Set HERMES_ENGINE_TARBALL_PATH envvar if Hermes tarball is present
6258
shell: bash
63-
run: ls -lR /tmp/third-party
64-
- name: Download React Native Prebuilds
65-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
66-
uses: actions/download-artifact@v4
67-
with:
68-
name: ReactCore${{ inputs.flavor }}.xcframework.tar.gz
69-
path: /tmp/ReactCore
70-
- name: Print ReactCore folder
71-
if: ${{ inputs.use-frameworks != 'DynamicFrameworks' }}
59+
run: |
60+
HERMES_TARBALL_ARTIFACTS_DIR=${{ inputs.hermes-tarball-artifacts-dir }}
61+
if [ ! -d $HERMES_TARBALL_ARTIFACTS_DIR ]; then
62+
echo "Hermes tarball artifacts dir not present ($HERMES_TARBALL_ARTIFACTS_DIR). Build Hermes from source."
63+
exit 0
64+
fi
65+
66+
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ inputs.flavor }}")
67+
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
68+
69+
echo "Looking for $TARBALL_FILENAME in $HERMES_TARBALL_ARTIFACTS_DIR"
70+
echo "$TARBALL_PATH"
71+
72+
if [ ! -f $TARBALL_PATH ]; then
73+
echo "Hermes tarball not present ($TARBALL_PATH). Build Hermes from source."
74+
exit 0
75+
fi
76+
77+
echo "Found Hermes tarball at $TARBALL_PATH"
78+
echo "HERMES_ENGINE_TARBALL_PATH=$TARBALL_PATH" >> $GITHUB_ENV
79+
- name: Print Hermes version
7280
shell: bash
73-
run: ls -lR /tmp/ReactCore
81+
run: |
82+
HERMES_TARBALL_ARTIFACTS_DIR=${{ inputs.hermes-tarball-artifacts-dir }}
83+
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "${{ inputs.flavor }}")
84+
TARBALL_PATH=$HERMES_TARBALL_ARTIFACTS_DIR/$TARBALL_FILENAME
85+
if [[ -e $TARBALL_PATH ]]; then
86+
tar -xf $TARBALL_PATH
87+
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js
88+
chmod +x ./destroot/bin/hermes
89+
./destroot/bin/hermes test.js
90+
rm test.js
91+
rm -rf destroot
92+
else
93+
echo 'No Hermes tarball found.'
94+
fi
95+
- name: Setup xcode build cache
96+
uses: ./.github/actions/setup-xcode-build-cache
97+
with:
98+
hermes-version: ${{ inputs.hermes-version }}
7499
- name: Install CocoaPods dependencies
75100
shell: bash
76101
run: |
102+
if [[ ${{ inputs.jsengine }} == "JSC" ]]; then
103+
export USE_HERMES=0
104+
else
105+
export HERMES_ENGINE_TARBALL_PATH=$HERMES_ENGINE_TARBALL_PATH
106+
fi
107+
77108
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
78109
export USE_FRAMEWORKS=dynamic
79-
else
80-
export RCT_USE_LOCAL_RN_DEP="/tmp/third-party/ReactNativeDependencies${{ inputs.flavor }}.xcframework.tar.gz"
81-
export RCT_TESTONLY_RNCORE_TARBALL_PATH="/tmp/ReactCore/ReactCore${{ inputs.flavor }}.xcframework.tar.gz"
110+
fi
111+
112+
if [[ ${{ inputs.architecture }} == "OldArch" ]]; then
113+
export RCT_NEW_ARCH_ENABLED=0
82114
fi
83115
84116
cd packages/rn-tester
85117
86118
bundle install
87-
bundle exec pod update hermes-engine --no-repo-update
119+
bundle exec pod install
88120
- name: Build RNTester
89121
shell: bash
90122
run: |
@@ -124,7 +156,7 @@ runs:
124156
if: ${{ inputs.use-frameworks == 'StaticLibraries' && inputs.ruby-version == '2.6.10' }} # This is needed to avoid conflicts with the artifacts
125157
uses: actions/upload-artifact@v4.3.4
126158
with:
127-
name: RNTesterApp-NewArch-${{ inputs.flavor }}
159+
name: RNTesterApp-${{ inputs.architecture }}-${{ inputs.jsengine }}-${{ inputs.flavor }}
128160
path: ${{ env.app-path }}
129161
- name: Store test results
130162
if: ${{ inputs.run-unit-tests == 'true' }}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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: Download visionOS SDK
42+
run: |
43+
# https://github.com/actions/runner-images/issues/10559
44+
sudo xcodebuild -runFirstLaunch
45+
sudo xcrun simctl list
46+
sudo xcodebuild -downloadPlatform visionOS
47+
sudo xcodebuild -runFirstLaunch
48+
shell: bash
49+
- name: Install CocoaPods dependencies
50+
shell: bash
51+
run: |
52+
export USE_HERMES=0
53+
54+
if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then
55+
export USE_FRAMEWORKS=dynamic
56+
fi
57+
58+
if [[ ${{ inputs.architecture }} == "NewArch" ]]; then
59+
export RCT_NEW_ARCH_ENABLED=1
60+
fi
61+
62+
cd packages/rn-tester
63+
64+
bundle install
65+
bundle exec pod install
66+
- name: Build RNTester for visionOS
67+
if: ${{ inputs.run-e2e-tests == 'false' }}
68+
shell: bash
69+
run: |
70+
xcodebuild build \
71+
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
72+
-scheme RNTester-visionOS \
73+
-sdk xrsimulator \
74+
-destination "platform=visionOS Simulator,name=Apple Vision Pro"

0 commit comments

Comments
 (0)