From 5d0d27184f7a39c11fa464081131da0abe737017 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 27 Jun 2024 00:21:04 -0700 Subject: [PATCH 1/3] Port CI improvements from Release branch to main (#45175) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45175 This change ports the CI improvements we made on stable branch to main. ## Changelog: [Internal] - Port back to main improvements we made in GHA Differential Revision: D59053873 Reviewed By: cortinico --- .../actions/test_ios_helloworld/action.yml | 29 ++- .github/actions/test_ios_rntester/action.yml | 10 +- .github/workflows/nightly.yml | 181 ++++++++++------- .github/workflows/publish-release.yml | 181 ++++++++++------- .github/workflows/test-all.yml | 183 +++++++++++------- scripts/objc-test.sh | 3 + 6 files changed, 358 insertions(+), 229 deletions(-) diff --git a/.github/actions/test_ios_helloworld/action.yml b/.github/actions/test_ios_helloworld/action.yml index c4d4efb46d3f..5df716c6a74f 100644 --- a/.github/actions/test_ios_helloworld/action.yml +++ b/.github/actions/test_ios_helloworld/action.yml @@ -45,17 +45,20 @@ runs: uses: ./.github/actions/setup-xcode - name: Setup node.js uses: ./.github/actions/setup-node - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup + - name: Create Hermes folder + shell: bash + run: mkdir -p "$HERMES_WS_DIR" + - name: Download Hermes + uses: actions/download-artifact@v4 with: - hermes-version: ${{ inputs.hermes-version }} - react-native-version: ${{ inputs.react-native-version }} + name: hermes-darwin-bin-${{ inputs.flavor }} + path: /tmp/hermes/hermes-runtime-darwin/ + - name: Print Downloaded hermes + shell: bash + run: ls -lR "$HERMES_WS_DIR" - name: Run yarn shell: bash run: yarn install --non-interactive - - name: Restore Hermes workspace - uses: ./.github/actions/restore-hermes-workspace - name: Setup ruby uses: ruby/setup-ruby@v1.170.0 with: @@ -78,6 +81,17 @@ runs: args+=(--jsvm jsc) yarn bootstrap ios "${args[@]}" | cat else + # Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased. + # Let's ensure that the tarballs have the right names + + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" + fi + + if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then + mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" + fi + BUILD_TYPE="${{ inputs.flavor }}" TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" @@ -87,6 +101,7 @@ runs: shell: bash run: | cd packages/helloworld + args=() if [[ ${{ inputs.flavor }} == "Release" ]]; then args+=(--prod) diff --git a/.github/actions/test_ios_rntester/action.yml b/.github/actions/test_ios_rntester/action.yml index 3f339734c9db..0fd3592ca72f 100644 --- a/.github/actions/test_ios_rntester/action.yml +++ b/.github/actions/test_ios_rntester/action.yml @@ -38,12 +38,11 @@ runs: - name: Run yarn shell: bash run: yarn install --non-interactive - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup + - name: Download Hermes + uses: actions/download-artifact@v4 with: - hermes-version: ${{ inputs.hermes-version }} - react-native-version: ${{ inputs.react-native-version }} + name: hermes-darwin-bin-${{ inputs.flavor }} + path: ${{ inputs.hermes-tarball-artifacts-dir }} - name: Setup ruby uses: ruby/setup-ruby@v1.170.0 with: @@ -82,6 +81,7 @@ runs: if [[ -e $TARBALL_PATH ]]; then tar -xf $TARBALL_PATH echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js + chmod +x ./destroot/bin/hermes ./destroot/bin/hermes test.js rm test.js rm -rf destroot diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a0a97b9170aa..60c5f232b01e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -28,7 +28,6 @@ jobs: HERMES_WS_DIR: /tmp/hermes HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion BUILD_FROM_SOURCE: true - GRADLE_OPTS: '-Dorg.gradle.daemon=false' outputs: react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }} hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }} @@ -38,6 +37,10 @@ jobs: - name: Prepare Hermes Workspace id: prepare-hermes-workspace uses: ./.github/actions/prepare-hermes-workspace + with: + HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }} + HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }} + BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }} build_hermesc_apple: runs-on: macos-13 @@ -51,7 +54,7 @@ jobs: - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - name: Hermes apple cache - uses: actions/cache@v4.0.0 + uses: actions/cache/restore@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_host_hermesc key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} @@ -60,6 +63,18 @@ jobs: cd ./packages/react-native/sdks/hermes || exit 1 . ./utils/build-apple-framework.sh build_host_hermesc_if_needed + - name: Upload HermesC Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Cache hermesc apple + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + path: ./packages/react-native/sdks/hermes/build_host_hermesc + key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + enableCrossOsArchive: true build_apple_slices_hermes: runs-on: macos-14 @@ -68,6 +83,9 @@ jobs: HERMES_WS_DIR: /tmp/hermes HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin + IOS_DEPLOYMENT_TARGET: "13.4" + XROS_DEPLOYMENT_TARGET: "1.0" + MAC_DEPLOYMENT_TARGET: "10.15" continue-on-error: true strategy: fail-fast: false @@ -79,33 +97,20 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup xcode uses: ./.github/actions/setup-xcode - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - - name: Check if the required artifacts already exist - id: check_if_apple_artifacts_are_there - run: | - FLAVOR="${{ matrix.flavor }}" - echo "Flavor is $FLAVOR" - OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR" - DSYM="/tmp/hermes/dSYM/$FLAVOR" - HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz" - - if [[ -d "$OSX_BIN" ]] && \ - [[ -d "$DSYM" ]] && \ - [[ -f "$HERMES" ]]; then - - echo "Artifacts are there!" - echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV - echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT - fi + - name: Restore HermesC Artifact + uses: actions/download-artifact@v4.1.3 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Restore Slice From Cache + id: restore-slice-cache + uses: actions/cache/restore@v4.0.0 + with: + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} + key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} - name: Build the Hermes ${{ matrix.slice }} frameworks - if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | cd ./packages/react-native/sdks/hermes || exit 1 SLICE=${{ matrix.slice }} @@ -123,11 +128,20 @@ jobs: exit 0 fi + export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + + # HermesC is used to build hermes, so it has to be executable + chmod +x ./build_host_hermesc/bin/hermesc + if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" + + chmod +x ./utils/build-mac-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh else echo "[HERMES] Building Hermes for iOS: $SLICE" + + chmod +x ./utils/build-ios-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE" fi @@ -149,9 +163,14 @@ jobs: echo "Please try again" exit 1 fi + - name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}} + uses: actions/upload-artifact@v4.3.1 + with: + name: slice-${{ matrix.slice }}-${{ matrix.flavor }} + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} - name: Save slice cache - if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + uses: actions/cache/save@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} @@ -174,14 +193,16 @@ jobs: uses: ./.github/actions/setup-xcode - name: Setup node.js uses: ./.github/actions/setup-node - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace + - name: Restore Cached Artifacts + uses: actions/cache/restore@v4.0.0 + with: + key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz - name: Check if the required artifacts already exist id: check_if_apple_artifacts_are_there run: | @@ -204,40 +225,40 @@ jobs: run: yarn install --non-interactive - name: Slice cache macosx if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }} + name: slice-macosx-${{ matrix.flavor }} - name: Slice cache iphoneos if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }} + name: slice-iphoneos-${{ matrix.flavor }} - name: Slice cache iphonesimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }} + name: slice-iphonesimulator-${{ matrix.flavor }} - name: Slice cache catalyst if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }} + name: slice-catalyst-${{ matrix.flavor }} - name: Slice cache xros if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }} + name: slice-xros-${{ matrix.flavor }} - name: Slice cache xrsimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }} + name: slice-xrsimulator-${{ matrix.flavor }} - name: Move back build folders if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -253,6 +274,7 @@ jobs: if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | cd ./packages/react-native/sdks/hermes || exit 1 + chmod +x ./utils/build-apple-framework.sh . ./utils/build-apple-framework.sh prepare_dest_root_for_ci - name: Create fat framework for iOS @@ -262,6 +284,8 @@ jobs: echo "[HERMES] Creating the universal framework" chmod +x ./utils/build-ios-framework.sh ./utils/build-ios-framework.sh build_framework + + chmod +x ./destroot/bin/hermesc - name: Package the Hermes Apple frameworks if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -287,16 +311,6 @@ jobs: mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }} cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }} ls -lR /tmp/hermes/osx-bin/ - - name: Upload darwin artifacts - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-darwin-bin-${{ matrix.flavor }} - path: /tmp/hermes/hermes-runtime-darwin - - name: Upload osx-bin - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-osx-bin-${{ matrix.flavor }} - path: /tmp/hermes/osx-bin - name: Create dSYM archive if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -330,10 +344,32 @@ jobs: with: name: hermes-dSYM-${{ matrix.flavor }} path: /tmp/hermes/dSYM/${{ matrix.flavor }} + - name: Upload hermes Runtime artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-darwin-bin-${{ matrix.flavor }} + path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz + - name: Upload hermes osx artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-osx-bin-${{ matrix.flavor }} + path: /tmp/hermes/osx-bin/${{ matrix.flavor }} + - name: Upload Hermes Artifacts + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz build_hermesc_linux: runs-on: ubuntu-latest needs: prepare_hermes_workspace + env: + HERMES_WS_DIR: /tmp/hermes + HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -342,12 +378,8 @@ jobs: sudo apt update sudo apt install -y git openssh-client cmake build-essential \ libreadline-dev libicu-dev jq zip python3 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + - name: Restore Hermes workspace + uses: ./.github/actions/restore-hermes-workspace - name: Linux cache uses: actions/cache@v4.0.0 with: @@ -381,18 +413,25 @@ jobs: needs: prepare_hermes_workspace env: HERMES_WS_DIR: 'D:\tmp\hermes' + HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin' + HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin' ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip" MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin' CMAKE_DIR: 'C:\Program Files\CMake\bin' steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup + - name: Download Previous Artifacts + uses: actions/download-artifact@v4 with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + name: hermes-workspace + path: 'D:\tmp\hermes' + - name: Set up workspace + run: | + mkdir -p D:\tmp\hermes\osx-bin + mkdir -p .\packages\react-native\sdks\hermes + cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\. + cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\. - name: Windows cache uses: actions/cache@v4.0.0 with: @@ -495,8 +534,8 @@ jobs: name: build-android-results compression-level: 1 path: | - packages/gradle-plugin/settings-plugin/build/reports - packages/gradle-plugin/react-native-gradle-plugin/build/reports + packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports + packages/react-native-gradle-plugin/settings-plugin/build/reports packages/react-native/ReactAndroid/build/reports - name: Upload RNTester APK if: ${{ always() }} @@ -536,12 +575,12 @@ jobs: uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Release - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Release - name: Download osx-bin debug artifacts uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Debug - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Debug - name: Download darwin-bin release artifacts uses: actions/download-artifact@v4.1.3 with: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 578c0b807eb9..a7472c1df752 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -25,7 +25,6 @@ jobs: HERMES_WS_DIR: /tmp/hermes HERMES_VERSION_FILE: packages/react-native/sdks/.hermesversion BUILD_FROM_SOURCE: true - GRADLE_OPTS: '-Dorg.gradle.daemon=false' outputs: react-native-version: ${{ steps.prepare-hermes-workspace.outputs.react-native-version }} hermes-version: ${{ steps.prepare-hermes-workspace.outputs.hermes-version }} @@ -35,6 +34,10 @@ jobs: - name: Prepare Hermes Workspace id: prepare-hermes-workspace uses: ./.github/actions/prepare-hermes-workspace + with: + HERMES_WS_DIR: ${{ env.HERMES_WS_DIR }} + HERMES_VERSION_FILE: ${{ env.HERMES_VERSION_FILE }} + BUILD_FROM_SOURCE: ${{ env.BUILD_FROM_SOURCE }} build_hermesc_apple: runs-on: macos-13 @@ -48,7 +51,7 @@ jobs: - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - name: Hermes apple cache - uses: actions/cache@v4.0.0 + uses: actions/cache/restore@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_host_hermesc key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} @@ -57,6 +60,18 @@ jobs: cd ./packages/react-native/sdks/hermes || exit 1 . ./utils/build-apple-framework.sh build_host_hermesc_if_needed + - name: Upload HermesC Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Cache hermesc apple + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + path: ./packages/react-native/sdks/hermes/build_host_hermesc + key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + enableCrossOsArchive: true build_apple_slices_hermes: runs-on: macos-14 @@ -65,6 +80,9 @@ jobs: HERMES_WS_DIR: /tmp/hermes HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin + IOS_DEPLOYMENT_TARGET: "13.4" + XROS_DEPLOYMENT_TARGET: "1.0" + MAC_DEPLOYMENT_TARGET: "10.15" continue-on-error: true strategy: fail-fast: false @@ -76,33 +94,20 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup xcode uses: ./.github/actions/setup-xcode - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - - name: Check if the required artifacts already exist - id: check_if_apple_artifacts_are_there - run: | - FLAVOR="${{ matrix.flavor }}" - echo "Flavor is $FLAVOR" - OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR" - DSYM="/tmp/hermes/dSYM/$FLAVOR" - HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz" - - if [[ -d "$OSX_BIN" ]] && \ - [[ -d "$DSYM" ]] && \ - [[ -f "$HERMES" ]]; then - - echo "Artifacts are there!" - echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV - echo "ARTIFACTS_EXIST=true" >> $GITHUB_OUTPUT - fi + - name: Restore HermesC Artifact + uses: actions/download-artifact@v4.1.3 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Restore Slice From Cache + id: restore-slice-cache + uses: actions/cache/restore@v4.0.0 + with: + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} + key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} - name: Build the Hermes ${{ matrix.slice }} frameworks - if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | cd ./packages/react-native/sdks/hermes || exit 1 SLICE=${{ matrix.slice }} @@ -120,11 +125,20 @@ jobs: exit 0 fi + export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + + # HermesC is used to build hermes, so it has to be executable + chmod +x ./build_host_hermesc/bin/hermesc + if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" + + chmod +x ./utils/build-mac-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh else echo "[HERMES] Building Hermes for iOS: $SLICE" + + chmod +x ./utils/build-ios-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE" fi @@ -146,9 +160,14 @@ jobs: echo "Please try again" exit 1 fi + - name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}} + uses: actions/upload-artifact@v4.3.1 + with: + name: slice-${{ matrix.slice }}-${{ matrix.flavor }} + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} - name: Save slice cache - if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + uses: actions/cache/save@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} @@ -171,14 +190,16 @@ jobs: uses: ./.github/actions/setup-xcode - name: Setup node.js uses: ./.github/actions/setup-node - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace + - name: Restore Cached Artifacts + uses: actions/cache/restore@v4.0.0 + with: + key: v2-hermes-osx-bin-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz - name: Check if the required artifacts already exist id: check_if_apple_artifacts_are_there run: | @@ -201,40 +222,40 @@ jobs: run: yarn install --non-interactive - name: Slice cache macosx if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }} + name: slice-macosx-${{ matrix.flavor }} - name: Slice cache iphoneos if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }} + name: slice-iphoneos-${{ matrix.flavor }} - name: Slice cache iphonesimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }} + name: slice-iphonesimulator-${{ matrix.flavor }} - name: Slice cache catalyst if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }} + name: slice-catalyst-${{ matrix.flavor }} - name: Slice cache xros if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }} + name: slice-xros-${{ matrix.flavor }} - name: Slice cache xrsimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }} + name: slice-xrsimulator-${{ matrix.flavor }} - name: Move back build folders if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -250,6 +271,7 @@ jobs: if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | cd ./packages/react-native/sdks/hermes || exit 1 + chmod +x ./utils/build-apple-framework.sh . ./utils/build-apple-framework.sh prepare_dest_root_for_ci - name: Create fat framework for iOS @@ -259,6 +281,8 @@ jobs: echo "[HERMES] Creating the universal framework" chmod +x ./utils/build-ios-framework.sh ./utils/build-ios-framework.sh build_framework + + chmod +x ./destroot/bin/hermesc - name: Package the Hermes Apple frameworks if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -284,16 +308,6 @@ jobs: mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }} cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }} ls -lR /tmp/hermes/osx-bin/ - - name: Upload darwin artifacts - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-darwin-bin-${{ matrix.flavor }} - path: /tmp/hermes/hermes-runtime-darwin - - name: Upload osx-bin - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-osx-bin-${{ matrix.flavor }} - path: /tmp/hermes/osx-bin - name: Create dSYM archive if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -327,10 +341,32 @@ jobs: with: name: hermes-dSYM-${{ matrix.flavor }} path: /tmp/hermes/dSYM/${{ matrix.flavor }} + - name: Upload hermes Runtime artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-darwin-bin-${{ matrix.flavor }} + path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz + - name: Upload hermes osx artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-osx-bin-${{ matrix.flavor }} + path: /tmp/hermes/osx-bin/${{ matrix.flavor }} + - name: Upload Hermes Artifacts + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + key: v2-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz build_hermesc_linux: runs-on: ubuntu-latest needs: prepare_hermes_workspace + env: + HERMES_WS_DIR: /tmp/hermes + HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -339,12 +375,8 @@ jobs: sudo apt update sudo apt install -y git openssh-client cmake build-essential \ libreadline-dev libicu-dev jq zip python3 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + - name: Restore Hermes workspace + uses: ./.github/actions/restore-hermes-workspace - name: Linux cache uses: actions/cache@v4.0.0 with: @@ -378,18 +410,25 @@ jobs: needs: prepare_hermes_workspace env: HERMES_WS_DIR: 'D:\tmp\hermes' + HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin' + HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin' ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip" MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin' CMAKE_DIR: 'C:\Program Files\CMake\bin' steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup + - name: Download Previous Artifacts + uses: actions/download-artifact@v4 with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + name: hermes-workspace + path: 'D:\tmp\hermes' + - name: Set up workspace + run: | + mkdir -p D:\tmp\hermes\osx-bin + mkdir -p .\packages\react-native\sdks\hermes + cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\. + cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\. - name: Windows cache uses: actions/cache@v4.0.0 with: @@ -494,8 +533,8 @@ jobs: name: build-android-results compression-level: 1 path: | - packages/gradle-plugin/react-native-gradle-plugin/build/reports - packages/gradle-plugin/settings-plugin/build/reports + packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports + packages/react-native-gradle-plugin/settings-plugin/build/reports packages/react-native/ReactAndroid/build/reports - name: Upload RNTester APK if: ${{ always() }} @@ -535,12 +574,12 @@ jobs: uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Release - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Release - name: Download osx-bin debug artifacts uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Debug - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Debug - name: Download darwin-bin release artifacts uses: actions/download-artifact@v4.1.3 with: diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index ecd5a402d68f..0d36a32735b0 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -62,7 +62,7 @@ jobs: - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - name: Hermes apple cache - uses: actions/cache@v4.0.0 + uses: actions/cache/restore@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_host_hermesc key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} @@ -71,6 +71,18 @@ jobs: cd ./packages/react-native/sdks/hermes || exit 1 . ./utils/build-apple-framework.sh build_host_hermesc_if_needed + - name: Upload HermesC Artifact + uses: actions/upload-artifact@v4.3.1 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Cache hermesc apple + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + path: ./packages/react-native/sdks/hermes/build_host_hermesc + key: v2-hermesc-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + enableCrossOsArchive: true build_apple_slices_hermes: runs-on: macos-14 @@ -79,6 +91,9 @@ jobs: HERMES_WS_DIR: /tmp/hermes HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin HERMES_OSXBIN_ARTIFACTS_DIR: /tmp/hermes/osx-bin + IOS_DEPLOYMENT_TARGET: "13.4" + XROS_DEPLOYMENT_TARGET: "1.0" + MAC_DEPLOYMENT_TARGET: "10.15" continue-on-error: true strategy: fail-fast: false @@ -90,30 +105,19 @@ jobs: uses: actions/checkout@v4.1.1 - name: Setup xcode uses: ./.github/actions/setup-xcode - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - - name: Check if the required artifacts already exist - id: check_if_apple_artifacts_are_there - run: | - FLAVOR="${{ matrix.flavor }}" - echo "Flavor is $FLAVOR" - OSX_BIN="/tmp/hermes/osx-bin/$FLAVOR" - DSYM="/tmp/hermes/dSYM/$FLAVOR" - HERMES="/tmp/hermes/hermes-runtime-darwin/hermes-ios-$FLAVOR.tar.gz" - - if [[ -d "$OSX_BIN" ]] && \ - [[ -d "$DSYM" ]] && \ - [[ -f "$HERMES" ]]; then - - echo "Artifacts are there!" - echo "ARTIFACTS_EXIST=true" >> $GITHUB_ENV - fi + - name: Restore HermesC Artifact + uses: actions/download-artifact@v4.1.3 + with: + name: hermesc-apple + path: ./packages/react-native/sdks/hermes/build_host_hermesc + - name: Restore Slice From Cache + id: restore-slice-cache + uses: actions/cache/restore@v4.0.0 + with: + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} + key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} - name: Build the Hermes ${{ matrix.slice }} frameworks run: | cd ./packages/react-native/sdks/hermes || exit 1 @@ -132,11 +136,20 @@ jobs: exit 0 fi + export RELEASE_VERSION=${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + + # HermesC is used to build hermes, so it has to be executable + chmod +x ./build_host_hermesc/bin/hermesc + if [[ "$SLICE" == "macosx" ]]; then echo "[HERMES] Building Hermes for MacOS" + + chmod +x ./utils/build-mac-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-mac-framework.sh else echo "[HERMES] Building Hermes for iOS: $SLICE" + + chmod +x ./utils/build-ios-framework.sh BUILD_TYPE="${{ matrix.flavor }}" ./utils/build-ios-framework.sh "$SLICE" fi @@ -158,8 +171,14 @@ jobs: echo "Please try again" exit 1 fi + - name: Upload Artifact for Slice (${{ matrix.slice }}, ${{ matrix.flavor }}} + uses: actions/upload-artifact@v4.3.1 + with: + name: slice-${{ matrix.slice }}-${{ matrix.flavor }} + path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} - name: Save slice cache - uses: actions/cache@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + uses: actions/cache/save@v4.0.0 with: path: ./packages/react-native/sdks/hermes/build_${{ matrix.slice }}_${{ matrix.flavor }} key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-${{ matrix.slice }}-${{ matrix.flavor }} @@ -182,14 +201,16 @@ jobs: uses: ./.github/actions/setup-xcode - name: Setup node.js uses: ./.github/actions/setup-node - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace + - name: Restore Cached Artifacts + uses: actions/cache/restore@v4.0.0 + with: + key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz - name: Check if the required artifacts already exist id: check_if_apple_artifacts_are_there run: | @@ -212,40 +233,40 @@ jobs: run: yarn install --non-interactive - name: Slice cache macosx if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_macosx_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-macosx-${{ matrix.flavor }} + name: slice-macosx-${{ matrix.flavor }} - name: Slice cache iphoneos if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphoneos_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphoneos-${{ matrix.flavor }} + name: slice-iphoneos-${{ matrix.flavor }} - name: Slice cache iphonesimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_iphonesimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-iphonesimulator-${{ matrix.flavor }} + name: slice-iphonesimulator-${{ matrix.flavor }} - name: Slice cache catalyst if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_catalyst_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-catalyst-${{ matrix.flavor }} + name: slice-catalyst-${{ matrix.flavor }} - name: Slice cache xros if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xros_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xros-${{ matrix.flavor }} + name: slice-xros-${{ matrix.flavor }} - name: Slice cache xrsimulator if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} - uses: actions/cache@v4.0.0 + uses: actions/download-artifact@v4.1.3 with: path: ./packages/react-native/sdks/hermes/build_xrsimulator_${{ matrix.flavor }} - key: v4-hermes-apple-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashfiles('packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh') }}-xrsimulator-${{ matrix.flavor }} + name: slice-xrsimulator-${{ matrix.flavor }} - name: Move back build folders if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -261,6 +282,7 @@ jobs: if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | cd ./packages/react-native/sdks/hermes || exit 1 + chmod +x ./utils/build-apple-framework.sh . ./utils/build-apple-framework.sh prepare_dest_root_for_ci - name: Create fat framework for iOS @@ -270,6 +292,8 @@ jobs: echo "[HERMES] Creating the universal framework" chmod +x ./utils/build-ios-framework.sh ./utils/build-ios-framework.sh build_framework + + chmod +x ./destroot/bin/hermesc - name: Package the Hermes Apple frameworks if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -295,16 +319,6 @@ jobs: mkdir -p /tmp/hermes/osx-bin/${{ matrix.flavor }} cp ./packages/react-native/sdks/hermes/build_macosx/bin/* /tmp/hermes/osx-bin/${{ matrix.flavor }} ls -lR /tmp/hermes/osx-bin/ - - name: Upload darwin artifacts - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-darwin-bin-${{ matrix.flavor }} - path: /tmp/hermes/hermes-runtime-darwin - - name: Upload osx-bin - uses: actions/upload-artifact@v4.3.1 - with: - name: hermes-osx-bin-${{ matrix.flavor }} - path: /tmp/hermes/osx-bin - name: Create dSYM archive if: ${{ steps.check_if_apple_artifacts_are_there.outputs.ARTIFACTS_EXIST != 'true' }} run: | @@ -338,6 +352,25 @@ jobs: with: name: hermes-dSYM-${{ matrix.flavor }} path: /tmp/hermes/dSYM/${{ matrix.flavor }} + - name: Upload hermes Runtime artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-darwin-bin-${{ matrix.flavor }} + path: /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz + - name: Upload hermes osx artifacts + uses: actions/upload-artifact@v4.3.1 + with: + name: hermes-osx-bin-${{ matrix.flavor }} + path: /tmp/hermes/osx-bin/${{ matrix.flavor }} + - name: Upload Hermes Artifacts + uses: actions/cache/save@v4.0.0 + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode. + with: + key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + path: | + /tmp/hermes/osx-bin/${{ matrix.flavor }} + /tmp/hermes/dSYM/${{ matrix.flavor }} + /tmp/hermes/hermes-runtime-darwin/hermes-ios-${{ matrix.flavor }}.tar.gz test_ios_rntester_ruby_3_2_0: runs-on: macos-13 @@ -407,6 +440,9 @@ jobs: build_hermesc_linux: runs-on: ubuntu-latest needs: prepare_hermes_workspace + env: + HERMES_WS_DIR: /tmp/hermes + HERMES_TARBALL_ARTIFACTS_DIR: /tmp/hermes/hermes-runtime-darwin steps: - name: Checkout uses: actions/checkout@v4.1.1 @@ -415,12 +451,8 @@ jobs: sudo apt update sudo apt install -y git openssh-client cmake build-essential \ libreadline-dev libicu-dev jq zip python3 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + - name: Restore Hermes workspace + uses: ./.github/actions/restore-hermes-workspace - name: Linux cache uses: actions/cache@v4.0.0 with: @@ -454,18 +486,25 @@ jobs: needs: prepare_hermes_workspace env: HERMES_WS_DIR: 'D:\tmp\hermes' + HERMES_TARBALL_ARTIFACTS_DIR: 'D:\tmp\hermes\hermes-runtime-darwin' + HERMES_OSXBIN_ARTIFACTS_DIR: 'D:\tmp\hermes\osx-bin' ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip" MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin' CMAKE_DIR: 'C:\Program Files\CMake\bin' steps: - name: Checkout uses: actions/checkout@v4.1.1 - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup + - name: Download Previous Artifacts + uses: actions/download-artifact@v4 with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} + name: hermes-workspace + path: 'D:\tmp\hermes' + - name: Set up workspace + run: | + mkdir -p D:\tmp\hermes\osx-bin + mkdir -p .\packages\react-native\sdks\hermes + cp -r -Force D:\tmp\hermes\hermes\* .\packages\react-native\sdks\hermes\. + cp -r -Force .\packages\react-native\sdks\hermes-engine\utils\* .\packages\react-native\sdks\hermes\. - name: Windows cache uses: actions/cache@v4.0.0 with: @@ -568,8 +607,8 @@ jobs: name: build-android-results compression-level: 1 path: | - packages/gradle-plugin/react-native-gradle-plugin/build/reports - packages/gradle-plugin/settings-plugin/build/reports + packages/react-native-gradle-plugin/react-native-gradle-plugin/build/reports + packages/react-native-gradle-plugin/settings-plugin/build/reports packages/react-native/ReactAndroid/build/reports - name: Upload RNTester APK if: ${{ always() }} @@ -614,12 +653,12 @@ jobs: uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Release - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Release - name: Download osx-bin debug artifacts uses: actions/download-artifact@v4.1.3 with: name: hermes-osx-bin-Debug - path: /tmp/hermes/osx-bin + path: /tmp/hermes/osx-bin/Debug - name: Download darwin-bin release artifacts uses: actions/download-artifact@v4.1.3 with: @@ -652,12 +691,6 @@ jobs: path: /tmp/hermes/linux64-bin - name: Show /tmp/hermes directory run: ls -lR /tmp/hermes - - name: Cache setup - id: cache_setup - uses: ./.github/actions/cache_setup - with: - hermes-version: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }} - react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }} - name: Copy Hermes binaries shell: bash run: | @@ -834,8 +867,8 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4.3.1 with: - name: template-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }} - path: packages/helloworld/app/build/outputs/apk/ + name: helloworld-apk-${{ matrix.flavor }}-${{ matrix.architecture }}-${{ matrix.jsengine }} + path: ./packages/helloworld/android/app/build/outputs/apk/ compression-level: 0 test_ios_helloworld_with_ruby_3_2_0: diff --git a/scripts/objc-test.sh b/scripts/objc-test.sh index b8b34d0a7f07..f80c89991f1a 100755 --- a/scripts/objc-test.sh +++ b/scripts/objc-test.sh @@ -93,6 +93,9 @@ buildForTesting() { } runTestsOnly() { + # shellcheck disable=SC1091 + source "$ROOT/scripts/.tests.env" + echo "[Testing] Running tests on $IOS_DEVICE for OS $IOS_TARGET_OS" xcodebuild test \ -workspace RNTesterPods.xcworkspace \ -scheme RNTester \ From 2b45785f38b6db66997e009738acca223157031c Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 27 Jun 2024 00:21:04 -0700 Subject: [PATCH 2/3] Port changes in the release testing script from the release branch (#45174) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45174 As per title, this port bck to main the changes we made in the release testing script. Differential Revision: D59054045 Reviewed By: blakef --- scripts/e2e/init-template-e2e.js | 78 ++++++++++++++++++++--- scripts/release-testing/test-e2e-local.js | 31 ++------- scripts/utils/monorepo.js | 2 +- 3 files changed, 75 insertions(+), 36 deletions(-) diff --git a/scripts/e2e/init-template-e2e.js b/scripts/e2e/init-template-e2e.js index 96df007a19ca..ee03d3e536bd 100644 --- a/scripts/e2e/init-template-e2e.js +++ b/scripts/e2e/init-template-e2e.js @@ -11,6 +11,8 @@ 'use strict'; +/*:: import type {ProjectInfo} from '../utils/monorepo'; */ + const {retry} = require('../circleci/retry'); const {REPO_ROOT} = require('../consts'); const {getPackages} = require('../utils/monorepo'); @@ -22,12 +24,12 @@ const { const {parseArgs} = require('@pkgjs/parseargs'); const chalk = require('chalk'); const {execSync} = require('child_process'); +const fs = require('fs'); const path = require('path'); const config = { options: { projectName: {type: 'string'}, - templatePath: {type: 'string'}, directory: {type: 'string'}, verbose: {type: 'boolean', default: false}, help: {type: 'boolean'}, @@ -56,10 +58,10 @@ async function main() { should not be committed. Options: - --projectName The name of the new React Native project. - --templatePath The absolute path to the folder containing the template. - --directory The absolute path to the target project directory. - --verbose Print additional output. Default: false. + --projectName The name of the new React Native project. + --directory The absolute path to the target project directory. + --pathToLocalReactNative The absolute path to the local react-native package. + --verbose Print additional output. Default: false. `); return; } @@ -74,10 +76,10 @@ async function main() { async function initNewProjectFromSource( { projectName, - templatePath, directory, + pathToLocalReactNative = null, verbose = false, - } /*: {projectName: string, templatePath: string, directory: string, verbose?: boolean} */, + } /*: {projectName: string, directory: string, pathToLocalReactNative?: ?string, verbose?: boolean} */, ) { console.log('Starting local npm proxy (Verdaccio)'); const verdaccioPid = setupVerdaccio(); @@ -117,9 +119,9 @@ async function initNewProjectFromSource( console.log('Running react-native init without install'); execSync( - `node ./packages/react-native/cli.js init ${projectName} \ + `npx @react-native-community/cli@next init ${projectName} \ --directory ${directory} \ - --template ${templatePath} \ + --version 0.75.0-rc.2 \ --verbose \ --pm npm \ --skip-install`, @@ -131,6 +133,9 @@ async function initNewProjectFromSource( ); console.log('\nDone ✅'); + _updateScopedPackages(packages, directory); + _updateReactNativeInTemplateIfNeeded(pathToLocalReactNative, directory); + console.log('Installing project dependencies'); await installProjectUsingProxy(directory); console.log('Done ✅'); @@ -169,6 +174,61 @@ async function installProjectUsingProxy(cwd /*: string */) { } } +function _updateScopedPackages( + packages /*: ProjectInfo */, + directory /*: string */, +) { + console.log( + 'Updating the scoped packagesto match the version published in Verdaccio', + ); + + // Packages are updated in a lockstep and all with the same version. + // Pick the version from the first package + const version = packages[Object.keys(packages)[0]].packageJson.version; + + // Update scoped packages which starts with @react-native + const appPackageJsonPath = path.join(directory, 'package.json'); + const appPackageJson = JSON.parse( + fs.readFileSync(appPackageJsonPath, 'utf8'), + ); + + for (const [key, _] of Object.entries(appPackageJson.dependencies)) { + if (key.startsWith('@react-native')) { + appPackageJson.dependencies[key] = version; + } + } + for (const [key, _] of Object.entries(appPackageJson.devDependencies)) { + if (key.startsWith('@react-native')) { + appPackageJson.devDependencies[key] = version; + } + } + + fs.writeFileSync(appPackageJsonPath, JSON.stringify(appPackageJson, null, 2)); + + console.log('Done ✅'); +} + +function _updateReactNativeInTemplateIfNeeded( + pathToLocalReactNative /*: ?string */, + directory /*: string */, +) { + if (pathToLocalReactNative != null) { + console.log('Updating the template version to local react-native'); + // Update template version. + const appPackageJsonPath = path.join(directory, 'package.json'); + const appPackageJson = JSON.parse( + fs.readFileSync(appPackageJsonPath, 'utf8'), + ); + appPackageJson.dependencies['react-native'] = + `file:${pathToLocalReactNative}`; + fs.writeFileSync( + appPackageJsonPath, + JSON.stringify(appPackageJson, null, 2), + ); + console.log('Done ✅'); + } +} + module.exports = { initNewProjectFromSource, }; diff --git a/scripts/release-testing/test-e2e-local.js b/scripts/release-testing/test-e2e-local.js index a4710c414583..68e58909403c 100644 --- a/scripts/release-testing/test-e2e-local.js +++ b/scripts/release-testing/test-e2e-local.js @@ -24,7 +24,6 @@ const { launchPackagerInSeparateWindow, maybeLaunchAndroidEmulator, prepareArtifacts, - setupCircleCIArtifacts, setupGHAArtifacts, } = require('./utils/testing-utils'); const chalk = require('chalk'); @@ -78,7 +77,7 @@ const argv = yargs * - @onReleaseBranch whether we are on a release branch or not */ async function testRNTesterIOS( - ciArtifacts /*: Unwrap> */, + ciArtifacts /*: Unwrap> */, onReleaseBranch /*: boolean */, ) { console.info( @@ -130,7 +129,7 @@ async function testRNTesterIOS( * - @circleCIArtifacts manager object to manage all the download of CircleCIArtifacts. If null, it will fallback not to use them. */ async function testRNTesterAndroid( - ciArtifacts /*: Unwrap> */, + ciArtifacts /*: Unwrap> */, ) { maybeLaunchAndroidEmulator(); @@ -206,7 +205,7 @@ async function testRNTesterAndroid( * - @onReleaseBranch whether we are on a release branch or not */ async function testRNTester( - circleCIArtifacts /*:Unwrap> */, + circleCIArtifacts /*:Unwrap> */, onReleaseBranch /*: boolean */, ) { // FIXME: make sure that the commands retains colors @@ -225,7 +224,7 @@ async function testRNTester( // === RNTestProject === // async function testRNTestProject( - ciArtifacts /*: Unwrap> */, + ciArtifacts /*: Unwrap> */, ) { console.info("We're going to test a fresh new RN project"); @@ -244,11 +243,6 @@ async function testRNTestProject( const buildType = 'dry-run'; const reactNativePackagePath = `${REPO_ROOT}/packages/react-native`; - const templateRepoFolder = '/tmp/template'; - const pathToTemplate = path.join(templateRepoFolder, 'template'); - - // Cleanup template clone folder - exec(`rm -rf ${templateRepoFolder}`); const localNodeTGZPath = `${reactNativePackagePath}/react-native-${releaseVersion}.tgz`; const mavenLocalPath = @@ -286,21 +280,6 @@ async function testRNTestProject( } } - // Cloning the template repo - // TODO: handle versioning of the template to make sure that we are downloading the right version of - // the template, given a specific React Native version - exec( - `git clone https://github.com/react-native-community/template ${templateRepoFolder} --depth=1`, - ); - - // Update template version. - const appPackageJsonPath = path.join(pathToTemplate, 'package.json'); - const appPackageJson = JSON.parse( - fs.readFileSync(appPackageJsonPath, 'utf8'), - ); - appPackageJson.dependencies['react-native'] = `file:${newLocalNodeTGZ}`; - fs.writeFileSync(appPackageJsonPath, JSON.stringify(appPackageJson, null, 2)); - pushd('/tmp/'); debug('Creating RNTestProject from template'); @@ -311,7 +290,7 @@ async function testRNTestProject( await initNewProjectFromSource({ projectName: 'RNTestProject', directory: '/tmp/RNTestProject', - templatePath: templateRepoFolder, + pathToLocalReactNative: newLocalNodeTGZ, }); cd('RNTestProject'); diff --git a/scripts/utils/monorepo.js b/scripts/utils/monorepo.js index b51e7f89435a..7d9505b34dd9 100644 --- a/scripts/utils/monorepo.js +++ b/scripts/utils/monorepo.js @@ -42,7 +42,7 @@ export type PackageInfo = { packageJson: PackageJson, }; -type ProjectInfo = { +export type ProjectInfo = { [packageName: string]: PackageInfo, }; */ From 2131e10a8ed986053219abebce14ff5246db2b97 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 27 Jun 2024 00:42:48 -0700 Subject: [PATCH 3/3] Bump CLI dependencies to alpha.11 (#45179) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45179 ## Changelog: [General][Changed] - Bumps the CLI to alpha 11 Reviewed By: cortinico Differential Revision: D59055459 --- packages/community-cli-plugin/package.json | 4 +- packages/react-native/package.json | 6 +- yarn.lock | 132 ++++++++++----------- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/packages/community-cli-plugin/package.json b/packages/community-cli-plugin/package.json index 4fb815f30385..ca98ca671cc3 100644 --- a/packages/community-cli-plugin/package.json +++ b/packages/community-cli-plugin/package.json @@ -22,8 +22,8 @@ "dist" ], "dependencies": { - "@react-native-community/cli-server-api": "14.0.0-alpha.9", - "@react-native-community/cli-tools": "14.0.0-alpha.9", + "@react-native-community/cli-server-api": "14.0.0-alpha.11", + "@react-native-community/cli-tools": "14.0.0-alpha.11", "@react-native/dev-middleware": "0.76.0-main", "@react-native/metro-babel-transformer": "0.76.0-main", "chalk": "^4.0.0", diff --git a/packages/react-native/package.json b/packages/react-native/package.json index ce72635091fe..d02ef0383cd1 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -109,9 +109,9 @@ }, "dependencies": { "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "14.0.0-alpha.9", - "@react-native-community/cli-platform-android": "14.0.0-alpha.9", - "@react-native-community/cli-platform-ios": "14.0.0-alpha.9", + "@react-native-community/cli": "14.0.0-alpha.11", + "@react-native-community/cli-platform-android": "14.0.0-alpha.11", + "@react-native-community/cli-platform-ios": "14.0.0-alpha.11", "@react-native/assets-registry": "0.76.0-main", "@react-native/codegen": "0.76.0-main", "@react-native/community-cli-plugin": "0.76.0-main", diff --git a/yarn.lock b/yarn.lock index 15a54e2468c0..f351e0bbbec8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2619,22 +2619,22 @@ optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" -"@react-native-community/cli-clean@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-14.0.0-alpha.9.tgz#cf4cd3e55a583b40ecaadb343f23b36c70cf7baf" - integrity sha512-Cz8nNivB9I06nqiPQiDDb8ZE7yDNCQBtRoSe1hle2rbxBYsvtMoAEC/jdyJIuxm9e0tA72WbrrdUSQqM1eLw3A== +"@react-native-community/cli-clean@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-14.0.0-alpha.11.tgz#6b7b95533ec9483562e33d2aae4c0501d4fa41c1" + integrity sha512-pGhrL7xncBv6ciE6vybJHCRAz5c+ejchEdtIcuMBk3GDSP+cWh9A8jwwezMo/6zKDh1FMWSN7KxXFL0fr11Eyw== dependencies: - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-tools" "14.0.0-alpha.11" chalk "^4.1.2" execa "^5.0.0" fast-glob "^3.3.2" -"@react-native-community/cli-config@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-14.0.0-alpha.9.tgz#20878d1984738ef0b14d8e3a5ab03753c9dc3710" - integrity sha512-vxhWya2S3yhrlfjXXpSxj/jEB6zKZjoDpDbZaN+aDzdub8Er+z0LEgCNJUA7QgcLtV4MEH9sNA43gZLhNkRW1A== +"@react-native-community/cli-config@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-14.0.0-alpha.11.tgz#44605edc66f4fb7f65e7c9aeb71ed4c4a54e3abd" + integrity sha512-6De3iEH71LnEPUTQZXORnl8J5t1p3Lsp1iweFf5oaHdYlBPqPLt2pGZxtSc09oNIOdtmYW9RHm14OM6/mJm/xA== dependencies: - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-tools" "14.0.0-alpha.11" chalk "^4.1.2" cosmiconfig "^9.0.0" deepmerge "^4.3.0" @@ -2653,23 +2653,23 @@ fast-glob "^3.3.2" joi "^17.2.1" -"@react-native-community/cli-debugger-ui@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-14.0.0-alpha.9.tgz#233f5fa5ffde9d2b44597bf71890777e4c918de0" - integrity sha512-lIKYXKpDJuTvmDqP03aR9G9CLc3WLn9btJ+CldCxoffIs3CpOEZUYC1NRcxRWbGDTZwNSLgra/oTKWXCgVK1gg== +"@react-native-community/cli-debugger-ui@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-14.0.0-alpha.11.tgz#952bb7c162e136ebff1950e7e80706eb3155fe21" + integrity sha512-0wCNQxhCniyjyMXgR1qXliY180y/2QbvoiYpp2MleGQADr5M1b8lgI4GoyADh5kE+kX3VL0ssjgyxpmbpCD86A== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-14.0.0-alpha.9.tgz#f1ee17c67a674ac83d56bed65c45fe02c841f3b6" - integrity sha512-pN7t6xna1+GqJDuXb1zTtAgbqc9jyw3T0ySvJ86eA9BLCAW11TSI9rjU6IIPcnKB+JxsxOyD4blmQjrFN2VIzA== +"@react-native-community/cli-doctor@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-14.0.0-alpha.11.tgz#1ee0910be05113c920027bd042c3a658908ec203" + integrity sha512-i+awVrt964+MxneGuw/6GXdzm+MJtFyS9Jpuc87HApLxOY9AC4pVjFSi6tUUjC5SlORN3zuMo87DmzgQuqBR+w== dependencies: - "@react-native-community/cli-config" "14.0.0-alpha.9" - "@react-native-community/cli-platform-android" "14.0.0-alpha.9" - "@react-native-community/cli-platform-apple" "14.0.0-alpha.9" - "@react-native-community/cli-platform-ios" "14.0.0-alpha.9" - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-config" "14.0.0-alpha.11" + "@react-native-community/cli-platform-android" "14.0.0-alpha.11" + "@react-native-community/cli-platform-apple" "14.0.0-alpha.11" + "@react-native-community/cli-platform-ios" "14.0.0-alpha.11" + "@react-native-community/cli-tools" "14.0.0-alpha.11" chalk "^4.1.2" command-exists "^1.2.8" deepmerge "^4.3.0" @@ -2682,24 +2682,24 @@ wcwidth "^1.0.1" yaml "^2.2.1" -"@react-native-community/cli-platform-android@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-14.0.0-alpha.9.tgz#8fdadf53e3fa0586b5093adb77a52701995768b7" - integrity sha512-DjPtKnPnKr8JmyIbSnVeEbRk825NWa0kL0ZL6F461NKawhvKunHQ6oIH1xs+oJbQ4apmWvijjFCUCp2/Ye/1xg== +"@react-native-community/cli-platform-android@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-14.0.0-alpha.11.tgz#29bb5ee9e55eea0199d824335f54f7adc0cf50f5" + integrity sha512-DIKku0qcJ2pB75YTqBCHdJiQaMtFBkp8Hhloq57OpNMspDqLTuWjDDbcCtqD7LQb9MGpaf+b6FWUQFw9BNtVkQ== dependencies: - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-tools" "14.0.0-alpha.11" chalk "^4.1.2" execa "^5.0.0" fast-glob "^3.3.2" fast-xml-parser "^4.2.4" logkitty "^0.7.1" -"@react-native-community/cli-platform-apple@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-apple/-/cli-platform-apple-14.0.0-alpha.9.tgz#d8c2683e9609f52c27939e4c6b604be43145e8c0" - integrity sha512-Gs4USDaMhtrnPb46DpjXkC7eq9Bkpc3ENIV2YFBgBdMo2aIFmIsBycvm5+asMSJlKwsyDYnxBJBLo6FOUkwE2w== +"@react-native-community/cli-platform-apple@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-apple/-/cli-platform-apple-14.0.0-alpha.11.tgz#7085a08b2f71f78291722196834e1e47a5d74ae5" + integrity sha512-tNKKte5K/tNNHy0Pxy/vJaSUw0jS7Cuo+F7tTT2ZgDmarp7IlfWnfVMKCtlSC3rR8ZCktmgPgteTf9SicSldxg== dependencies: - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-tools" "14.0.0-alpha.11" chalk "^4.1.2" execa "^5.0.0" fast-glob "^3.3.2" @@ -2718,27 +2718,27 @@ fast-xml-parser "^4.0.12" ora "^5.4.1" -"@react-native-community/cli-platform-ios@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-14.0.0-alpha.9.tgz#4f2686ca03efa186aac3bf354cbf15936627d4f8" - integrity sha512-7Rb399ErNpVpQvcF7RQolFk9HF6xRsZkdSlAZQGM2lCNQ3Wj4CRX6Bixa59bnGAY+uK3bjE/LeFcUbFXPgzr0Q== +"@react-native-community/cli-platform-ios@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-14.0.0-alpha.11.tgz#d446583ebf1eeaf0066ddb649e28b345aa32149e" + integrity sha512-coHbTcymVsrOBYvch0M7JtKIRlfCc2GwXs7JEyG54CUKTfhLGDgWWTGOdAwWxiF4cDbj46Qr/4Es2AGJbmTBGA== dependencies: - "@react-native-community/cli-platform-apple" "14.0.0-alpha.9" + "@react-native-community/cli-platform-apple" "14.0.0-alpha.11" -"@react-native-community/cli-server-api@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-14.0.0-alpha.9.tgz#f5ac1de8a955dd496617322d659e120e44cdc0a5" - integrity sha512-8iEZoFNv0EzqVuTXm2tamUOKzPfq8E3Yjc7kdpqT68gwRD/MBpXM+t7ItEU8EbfhArccUHVADKWjWGdnQ43adw== +"@react-native-community/cli-server-api@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-14.0.0-alpha.11.tgz#505163e11d3a30ebc874950956f72f5b3b6c5fc1" + integrity sha512-I7YeYI7S5wSxnQAqeG8LNqhT99FojiGIk87DU0vTp6U8hIMLcA90fUuBAyJY38AuQZ12ZJpGa8ObkhIhWzGkvg== dependencies: - "@react-native-community/cli-debugger-ui" "14.0.0-alpha.9" - "@react-native-community/cli-tools" "14.0.0-alpha.9" + "@react-native-community/cli-debugger-ui" "14.0.0-alpha.11" + "@react-native-community/cli-tools" "14.0.0-alpha.11" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.1" nocache "^3.0.1" pretty-format "^26.6.2" serve-static "^1.13.1" - ws "^6.2.2" + ws "^6.2.3" "@react-native-community/cli-tools@13.6.4", "@react-native-community/cli-tools@^13.6.4": version "13.6.4" @@ -2757,10 +2757,10 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-tools@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-14.0.0-alpha.9.tgz#1356a21c69bb1982586ea705351d1c1ffd4489f5" - integrity sha512-DGDHyJA/acfOwzjqyPK5cm0ZMHzu1IctL4HwK01y48o+bi5gIxUcKhmGUZWA2LwLTNjIto64EE3i3dUT9jRHAA== +"@react-native-community/cli-tools@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-14.0.0-alpha.11.tgz#95b148a3e65a4c2519af608b27ed7091e7e8b78a" + integrity sha512-HQCfVnX9aqRdKdLxmQy4fUAUo+YhNGlBV7ZjOayPbuEGWJ4RN+vSy0Cawk7epo7hXd6vKzc7P7y3HlU6Kxs7+w== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -2773,10 +2773,10 @@ shell-quote "^1.7.3" sudo-prompt "^9.0.0" -"@react-native-community/cli-types@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-14.0.0-alpha.9.tgz#9a95bf0e3184e8eb44fd6082016ddb1c93b06c24" - integrity sha512-XEDwsrgje9JG5hVuUCBWaH8XVV1H3ZcTwXxd/XhmDNemPyOLnDfgeAlitbEMyi+X/SWB04EGQu1SeRwe5vLePA== +"@react-native-community/cli-types@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-14.0.0-alpha.11.tgz#d8ca6352659bc44d569bae3fb321ed52502168f0" + integrity sha512-jujAIipCmgc0mHXh9G+6cVT8wPaw1m8L3OSpajNKuARtjva+jGNYmx4itRP05c+SgFqN4eASEV563nNfI4Ja/g== dependencies: joi "^17.2.1" @@ -2787,18 +2787,18 @@ dependencies: joi "^17.2.1" -"@react-native-community/cli@14.0.0-alpha.9": - version "14.0.0-alpha.9" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-14.0.0-alpha.9.tgz#0a00a3f8bcee9edb482ad59018bd4d3a8e7210f7" - integrity sha512-1EAs79u+dPxDIBq1TkT2TV3Pa7fw1CakmoFTTSVYA4EHnRVqSnonAQj/kSf8cVuL4ORHDavlnzHcCaSXCB0MRQ== - dependencies: - "@react-native-community/cli-clean" "14.0.0-alpha.9" - "@react-native-community/cli-config" "14.0.0-alpha.9" - "@react-native-community/cli-debugger-ui" "14.0.0-alpha.9" - "@react-native-community/cli-doctor" "14.0.0-alpha.9" - "@react-native-community/cli-server-api" "14.0.0-alpha.9" - "@react-native-community/cli-tools" "14.0.0-alpha.9" - "@react-native-community/cli-types" "14.0.0-alpha.9" +"@react-native-community/cli@14.0.0-alpha.11": + version "14.0.0-alpha.11" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-14.0.0-alpha.11.tgz#e2fe662a68f0597b3ab738240c997301ce11b404" + integrity sha512-V32VYYa1dZJWt7ohxCYQIRa7DVGAXpw3RnP36BSfm4rqv1DD8ymDLM71PVZHoeHG6UWyNABXbTHTY+FOUYjKlQ== + dependencies: + "@react-native-community/cli-clean" "14.0.0-alpha.11" + "@react-native-community/cli-config" "14.0.0-alpha.11" + "@react-native-community/cli-debugger-ui" "14.0.0-alpha.11" + "@react-native-community/cli-doctor" "14.0.0-alpha.11" + "@react-native-community/cli-server-api" "14.0.0-alpha.11" + "@react-native-community/cli-tools" "14.0.0-alpha.11" + "@react-native-community/cli-types" "14.0.0-alpha.11" chalk "^4.1.2" commander "^9.4.1" deepmerge "^4.3.0" @@ -9532,7 +9532,7 @@ ws@>=7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== -ws@^6.2.2, ws@^6.2.3: +ws@^6.2.3: version "6.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.3.tgz#ccc96e4add5fd6fedbc491903075c85c5a11d9ee" integrity sha512-jmTjYU0j60B+vHey6TfR3Z7RD61z/hmxBS3VMSGIrroOWXQEneK1zNuotOUrGyBHQj0yrpsLHPWtigEFd13ndA==