diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml index 687a9d24970ca3..817af60720caa3 100644 --- a/.github/actions/test-ios-helloworld/action.yml +++ b/.github/actions/test-ios-helloworld/action.yml @@ -43,7 +43,7 @@ runs: - name: Run yarn uses: ./.github/actions/yarn-install - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1.171.0 with: ruby-version: ${{ inputs.ruby-version }} - name: Install iOS dependencies - Configuration ${{ inputs.flavor }}; New Architecture ${{ inputs.architecture }}; JS Engine ${{ inputs.jsengine }} diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index 47cec865807bca..9661b6f0275641 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -48,7 +48,7 @@ runs: name: hermes-darwin-bin-${{ inputs.flavor }} path: ${{ inputs.hermes-tarball-artifacts-dir }} - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1.171.0 with: ruby-version: ${{ inputs.ruby-version }} - name: Prepare IOS Tests diff --git a/.github/actions/test-visionos-rntester/action.yml b/.github/actions/test-visionos-rntester/action.yml new file mode 100644 index 00000000000000..dd35ffcdb78bc0 --- /dev/null +++ b/.github/actions/test-visionos-rntester/action.yml @@ -0,0 +1,66 @@ +name: test-visionos-rntester +description: Build visionOS RNTester using JSC +inputs: + use-frameworks: + description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" + default: StaticLibraries + architecture: + description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup + default: NewArch + ruby-version: + description: The version of ruby that must be used + default: 2.6.10 + flavor: + description: The flavor of the build. Must be one of "Debug", "Release". + default: Debug + react-native-version: + description: The version of react-native + required: true + run-e2e-tests: + description: Whether we want to run E2E tests or not + required: false + default: false + +runs: + using: composite + steps: + - name: Setup xcode + uses: ./.github/actions/setup-xcode + with: + xcode-version: "15.4" + - name: Setup node.js + uses: ./.github/actions/setup-node + - name: Run yarn + uses: ./.github/actions/yarn-install-with-cache + - name: Setup ruby + uses: ruby/setup-ruby@v1.171.0 + with: + ruby-version: ${{ inputs.ruby-version }} + - name: Setup xcode build cache + uses: ./.github/actions/setup-xcode-build-cache + - name: Install CocoaPods dependencies + shell: bash + run: | + export USE_HERMES=0 + + if [[ ${{ inputs.use-frameworks }} == "DynamicFrameworks" ]]; then + export USE_FRAMEWORKS=dynamic + fi + + if [[ ${{ inputs.architecture }} == "NewArch" ]]; then + export RCT_NEW_ARCH_ENABLED=1 + fi + + cd packages/rn-tester + + bundle install + bundle exec pod install + - name: Build RNTester for visionOS + if: ${{ inputs.run-e2e-tests == 'false' }} + shell: bash + run: | + xcodebuild build \ + -workspace packages/rn-tester/RNTesterPods.xcworkspace \ + -scheme RNTester-visionOS \ + -sdk xrsimulator \ + -destination "platform=visionOS Simulator,name=Apple Vision Pro" diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 3273c8d135a5d3..0f992abcb6d80e 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -1,17 +1,16 @@ name: Test All -# on: -# workflow_dispatch: -# pull_request: -# push: -# tags: -# - 'v*' -# # nightly build @ 2:15 AM UTC -# schedule: -# - cron: '15 2 * * *' +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + - "*-stable" jobs: set_release_type: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest outputs: RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }} @@ -35,6 +34,7 @@ jobs: echo "Should I run E2E tests? ${{ inputs.run-e2e-tests }}" prepare_hermes_workspace: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest env: HERMES_WS_DIR: /tmp/hermes @@ -53,6 +53,7 @@ jobs: hermes-version-file: ${{ env.HERMES_VERSION_FILE }} build_hermesc_apple: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: prepare_hermes_workspace env: @@ -67,6 +68,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_apple_slices_hermes: + if: github.repository == 'facebook/react-native' runs-on: macos-14 needs: [build_hermesc_apple, prepare_hermes_workspace] env: @@ -93,6 +95,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_hermes_macos: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [build_apple_slices_hermes, prepare_hermes_workspace] env: @@ -114,6 +117,7 @@ jobs: flavor: ${{ matrix.flavor }} test_ios_rntester_ruby_3_2_0: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos] @@ -131,6 +135,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_rntester_dynamic_frameworks: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos] @@ -154,6 +159,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_rntester: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos] @@ -164,7 +170,6 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [Hermes, JSC] architecture: [NewArch, OldArch] flavor: [Debug, Release] exclude: # We don't want to test the Old Arch in Release for E2E @@ -188,6 +193,26 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} flavor: ${{ matrix.flavor }} + test_visionos_rntester: + runs-on: macos-14-xlarge + continue-on-error: true + strategy: + fail-fast: false + matrix: + architecture: [NewArch, OldArch] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run it + uses: ./.github/actions/test-visionos-rntester + with: + jsengine: ${{ matrix.jsengine }} + architecture: ${{ matrix.architecture }} + run-unit-tests: "false" + use-frameworks: StaticLibraries + hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} + react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + test_e2e_ios_rntester: if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, 'stable') || inputs.run-e2e-tests }} runs-on: macos-13-large @@ -246,7 +271,7 @@ jobs: - name: Run yarn uses: ./.github/actions/yarn-install - name: Setup ruby - uses: ruby/setup-ruby@v1.170.0 + uses: ruby/setup-ruby@v1.171.0 with: ruby-version: 2.6.10 - name: Download Hermes @@ -385,6 +410,7 @@ jobs: architecture: ${{ matrix.architecture }} build_hermesc_linux: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest needs: prepare_hermes_workspace env: @@ -400,6 +426,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_hermesc_windows: + if: github.repository == 'facebook/react-native' runs-on: windows-2019 needs: prepare_hermes_workspace env: @@ -419,6 +446,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} build_android: + if: github.repository == 'facebook/react-native' runs-on: 8-core-ubuntu needs: [set_release_type] container: @@ -562,6 +590,7 @@ jobs: compression-level: 0 test_ios_helloworld_with_ruby_3_2_0: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs env: @@ -580,6 +609,7 @@ jobs: react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} test_ios_helloworld: + if: github.repository == 'facebook/react-native' runs-on: macos-13 needs: [prepare_hermes_workspace, build_hermes_macos] # prepare_hermes_workspace must be there because we need its reference to retrieve a couple of outputs strategy: @@ -623,6 +653,7 @@ jobs: lint: runs-on: ubuntu-latest + if: github.repository == 'facebook/react-native' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 613922097be81c..1304f0745720ea 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -9554,7 +9554,7 @@ declare module.exports: WebSocketInterceptor; `; exports[`public API should not change unintentionally Libraries/WindowManager/NativeWindowManager.js 1`] = ` -"export * from \\"../../src/private/specs/visionos_modules/NativeWindowManager\\"; +"export * from \\"../../visionos_modules/NativeWindowManager\\"; declare export default typeof NativeWindowManager; " `; @@ -9576,7 +9576,7 @@ declare module.exports: WindowManager; `; exports[`public API should not change unintentionally Libraries/XR/NativeXRModule.js 1`] = ` -"export * from \\"../../src/private/specs/visionos_modules/NativeXRModule\\"; +"export * from \\"../../visionos_modules/NativeXRModule\\"; declare export default typeof NativeXRModule; " `; diff --git a/yarn.lock b/yarn.lock index a36e81bf47a712..838474d223c905 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2023,17 +2023,17 @@ resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.0.tgz#560bec29b2699c4d4cbfecfb4c2c5025397aac23" integrity sha512-I8Yy6bCKU5R4qZX4jfXsAPsHyuGHlulbnbG3NqO9JgZ3T2DJxJiZE39rHORP0trLnRh0rIeRcs4Mc14fAE6hrw== -"@react-native/babel-plugin-codegen@0.74.85": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.85.tgz#067224bf5099ee2679babd700c7115822a747004" - integrity sha512-48TSDclRB5OMXiImiJkLxyCfRyLsqkCgI8buugCZzvXcYslfV7gCvcyFyQldtcOmerV+CK4RAj7QS4hmB5Mr8Q== +"@react-native/babel-plugin-codegen@0.74.86": + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.86.tgz#4edbb8887c5cedefd52e8fda973b1da97c779db4" + integrity sha512-fO7exk0pdsOSsK3fvDz4YKe5nMeAMrsIGi525pft/L+dedjdeiWYmEoQVc9NElxwwNCldwRY6eNMw6IhKyjzLA== dependencies: - "@react-native/codegen" "0.74.85" + "@react-native/codegen" "0.74.86" -"@react-native/babel-preset@0.74.85": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.85.tgz#3ce6ca77a318dec226fd9e3fff9c2ef7b0aa66e3" - integrity sha512-yMHUlN8INbK5BBwiBuQMftdWkpm1IgCsoJTKcGD2OpSgZhwwm8RUSvGhdRMzB2w7bsqqBmaEMleGtW6aCR7B9w== +"@react-native/babel-preset@0.74.86": + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.86.tgz#8bb3fbd49ce11470eb8022dea2c1e51bfa8dedd4" + integrity sha512-6A+1NVAHugbBLFNU4iaYrq2lx8P7pINyqoyTtVAqd375PShRmLwu6GvuF3b/4avC97s6LmBljVTJ1xVHukA42g== dependencies: "@babel/core" "^7.20.0" "@babel/plugin-proposal-async-generator-functions" "^7.0.0" @@ -2075,7 +2075,7 @@ "@babel/plugin-transform-typescript" "^7.5.0" "@babel/plugin-transform-unicode-regex" "^7.0.0" "@babel/template" "^7.0.0" - "@react-native/babel-plugin-codegen" "0.74.85" + "@react-native/babel-plugin-codegen" "0.74.86" babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" @@ -2089,10 +2089,10 @@ jscodeshift "^0.14.0" nullthrows "^1.1.1" -"@react-native/codegen@0.74.85": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.85.tgz#568464071c0b9be741da1a1ab43b1df88180ca5d" - integrity sha512-N7QwoS4Hq/uQmoH83Ewedy6D0M7xbQsOU3OMcQf0eY3ltQ7S2hd9/R4UTalQWRn1OUJfXR6OG12QJ4FStKgV6Q== +"@react-native/codegen@0.74.86": + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.86.tgz#90933f5ee555ffb95ca27372ba1e836f698c3192" + integrity sha512-BOwABta9035GJ/zLMkxQfgPMr47u1/1HqNIMk10FqmTe0jmROOxKEAeP4FbeS5L1voO4ug3dqr+mcuHrG+HNhA== dependencies: "@babel/parser" "^7.20.0" glob "^7.1.1" @@ -2119,18 +2119,18 @@ node-fetch "^2.2.0" readline "^1.3.0" -"@react-native/debugger-frontend@0.74.85": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.85.tgz#a7af94a7b81cb59f241fd1771d1b083445329700" - integrity sha512-gUIhhpsYLUTYWlWw4vGztyHaX/kNlgVspSvKe2XaPA7o3jYKUoNLc3Ov7u70u/MBWfKdcEffWq44eSe3j3s5JQ== +"@react-native/debugger-frontend@0.74.86": + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.86.tgz#87a3c7dfb12ee6e981165e304bbbe20e9b1fa009" + integrity sha512-Spq1kFX4qvPmT4HuTwpi1ALFtojlJ6s4GpWU2OnpevC/z7ks36lhD3J0rd0D9U5bkxtTYLcg31fPv7nGFC7XZg== "@react-native/dev-middleware@^0.74.0": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.85.tgz#eca35aceb882b1111385f7c20f1aad7a33a2734e" - integrity sha512-BRmgCK5vnMmHaKRO+h8PKJmHHH3E6JFuerrcfE3wG2eZ1bcSr+QTu8DAlpxsDWvJvHpCi8tRJGauxd+Ssj/c7w== + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.86.tgz#b95f936c141dd44309a9ec558ed5ce034e270bc4" + integrity sha512-sc0tYxYt6dkUbNFI1IANzKO67M41BhjbJ6k/CHoFi/tGoNmHzg9IUZ89V4g3H8hn/VW9dETnPOFna1VO0sWrXg== dependencies: "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.74.85" + "@react-native/debugger-frontend" "0.74.86" "@rnx-kit/chromium-edge-launcher" "^1.0.0" chrome-launcher "^0.15.2" connect "^3.6.5" @@ -2154,12 +2154,12 @@ integrity sha512-DMpn5l1TVkIBFe9kE54pwOI2fQYbQNZ6cto0IuCUxQVUFJBcFMJ6Gbk8jhz8tvcWuDW3xVK9AWq9DJTkuchWsQ== "@react-native/metro-babel-transformer@^0.74.0": - version "0.74.85" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.85.tgz#d530d9a6bd319ece226a2d6aaa00b464a1928089" - integrity sha512-JIrXqEwhTvWPtGArgMptIPGstMdXQIkwSjKVYt+7VC4a9Pw1GurIWanIJheEW6ZuCVvTc0VZkwglFz9JVjzDjA== + version "0.74.86" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.86.tgz#d67d3bf1699fcf834a70155635b30ae9f667b6dd" + integrity sha512-/9qN5zcnTHGDkC4jWibnoGmRnzDXiurl5wmkvspgnsdrJINN6eGpK8sdIn6nrHFOuPlp3Metqw3HkxbuAfNUXw== dependencies: "@babel/core" "^7.20.0" - "@react-native/babel-preset" "0.74.85" + "@react-native/babel-preset" "0.74.86" hermes-parser "0.19.1" nullthrows "^1.1.1" @@ -2393,9 +2393,9 @@ integrity sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ== "@types/node@^18.0.0": - version "18.19.42" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.42.tgz#b54ed4752c85427906aab40917b0f7f3d724bf72" - integrity sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg== + version "18.19.43" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.43.tgz#fe01bb599b60bb3279c26d0fdb751d2f3e299ae0" + integrity sha512-Mw/YlgXnyJdEwLoFv2dpuJaDFriX+Pc+0qOBJ57jC1H6cDxIj2xc5yUrdtArDVG0m+KV6622a4p2tenEqB3C/g== dependencies: undici-types "~5.26.4"