diff --git a/.github/actions/test-visionos-rntester/action.yml b/.github/actions/test-visionos-rntester/action.yml new file mode 100644 index 00000000000000..9c3cb3d4b4e108 --- /dev/null +++ b/.github/actions/test-visionos-rntester/action.yml @@ -0,0 +1,64 @@ +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 + - 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 \ + -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 777916a6b7e2cb..2d3863276b3f95 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -1,14 +1,12 @@ 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" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -16,6 +14,7 @@ concurrency: jobs: set_release_type: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest outputs: RELEASE_TYPE: ${{ steps.set_release_type.outputs.RELEASE_TYPE }} @@ -37,6 +36,7 @@ jobs: fi prepare_hermes_workspace: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest env: HERMES_WS_DIR: /tmp/hermes @@ -55,6 +55,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: @@ -69,6 +70,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: @@ -95,6 +97,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: @@ -116,6 +119,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] @@ -133,6 +137,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] @@ -156,6 +161,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] @@ -166,7 +172,26 @@ jobs: strategy: fail-fast: false matrix: - jsengine: [Hermes, JSC] + architecture: [NewArch, OldArch] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run it + uses: ./.github/actions/test-ios-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_visionos_rntester: + runs-on: macos-14 + continue-on-error: true + strategy: + fail-fast: false + matrix: architecture: [NewArch, OldArch] steps: - name: Checkout @@ -344,6 +369,7 @@ jobs: install-java: 'false' build_hermesc_linux: + if: github.repository == 'facebook/react-native' runs-on: ubuntu-latest needs: prepare_hermes_workspace env: @@ -359,6 +385,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: @@ -378,6 +405,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: @@ -516,6 +544,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: @@ -534,6 +563,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: diff --git a/yarn.lock b/yarn.lock index fd82ae2a79ba56..5055375a3c2e5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2528,17 +2528,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" @@ -2580,7 +2580,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" @@ -2594,10 +2594,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" @@ -2624,18 +2624,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" @@ -2659,12 +2659,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" @@ -2911,9 +2911,9 @@ integrity sha512-CK2fnrQlIgKlCV3N2kM+Gznb5USlwA1KFX3rJVHmgVk6NJxFPuQ86pAcvKnu37IA4BGlSRz7sEE1lHL1aLZ/eQ== "@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"