Skip to content

Commit

Permalink
Merge commit '5e6fed361c1a95b770c9d9b2dd7bb49676fa95e0' into 0.74-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi committed Aug 7, 2024
2 parents 7ed80be + 5e6fed3 commit 6bf0298
Show file tree
Hide file tree
Showing 427 changed files with 6,488 additions and 3,527 deletions.
14 changes: 11 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@ parameters:
default: false
type: boolean

release_latest:
run_nightly_workflow:
default: false
type: boolean

release_version:
default: "9999"
default: ""
type: string

run_nightly_workflow:
release_monorepo_packages_version:
default: ""
type: string

release_tag:
default: ""
type: string

release_dry_run:
default: false
type: boolean

Expand Down
4 changes: 3 additions & 1 deletion .circleci/configurations/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ commands:
- restore_cache:
key: *rbenv_cache_key
- run:
name: Bundle Install
name: Install the proper Ruby and run Bundle install
command: |
# Check if rbenv is installed. CircleCI is migrating to rbenv so we may not need to always install it.
Expand All @@ -58,8 +58,10 @@ commands:
# Set ruby dependencies
rbenv global << parameters.ruby_version >>
if [[ << parameters.ruby_version >> == "2.6.10" ]]; then
rbenv rehash
gem install bundler -v 2.4.22
else
rbenv rehash
gem install bundler
fi
bundle check || bundle install --path vendor/bundle --clean
Expand Down
10 changes: 5 additions & 5 deletions .circleci/configurations/executors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ executors:
<<: *defaults
macos:
xcode: *xcode_version
resource_class: macos.x86.medium.gen2
resource_class: macos.m1.medium.gen1
environment:
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
reactnativeios-lts:
<<: *defaults
macos:
xcode: '14.3.1'
resource_class: macos.x86.medium.gen2
xcode: '15.1'
resource_class: macos.m1.medium.gen1
environment:
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
90 changes: 70 additions & 20 deletions .circleci/configurations/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
executor: reactnativeios
parameters:
ruby_version:
default: "2.7.7"
default: "2.7.8"
description: The version of ruby that must be used
type: string
steps:
Expand Down Expand Up @@ -599,7 +599,7 @@ jobs:
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "packages/react-native/sdks/.hermesversion"
- BUILD_FROM_SOURCE: true
- RCT_BUILD_HERMES_FROM_SOURCE: true
steps:
- run:
name: Install dependencies
Expand Down Expand Up @@ -780,7 +780,7 @@ jobs:
default: "iphoneos"
description: The Hermes Slice that this job has to build
type: enum
enum: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
enum: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
executor: reactnativeios
environment:
- HERMES_WS_DIR: *hermes_workspace_root
Expand Down Expand Up @@ -813,13 +813,18 @@ jobs:
exit 0
fi
export RELEASE_VERSION=$(cat /tmp/react-native-version)
if [[ "$SLICE" == "macosx" ]]; then
echo "[HERMES] Building Hermes for MacOS"
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh
else
BUILD_TYPE="<< parameters.flavor >>" MACOSX_DEPLOYMENT_TARGET=10.15 ./utils/build-mac-framework.sh
elif [[ "$SLICE" == "xros" ]] || [[ "$SLICE" == "xrsimulator" ]]; then
echo "[HERMES] Building Hermes for XR: $SLICE"
BUILD_TYPE="<< parameters.flavor >>" XROS_DEPLOYMENT_TARGET=1.0 ./utils/build-ios-framework.sh "$SLICE"
elif [[ "$SLICE" == "iphoneos" ]] || [[ "$SLICE" == "iphonesimulator" ]] || [[ "$SLICE" == "catalyst" ]] ; then
echo "[HERMES] Building Hermes for iOS: $SLICE"
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE"
BUILD_TYPE="<< parameters.flavor >>" IOS_DEPLOYMENT_TARGET=13.4 ./utils/build-ios-framework.sh "$SLICE"
fi
unset RELEASE_VERSION
echo "Moving from build_$SLICE to $FINAL_PATH"
mv build_"$SLICE" "$FINAL_PATH"
Expand Down Expand Up @@ -879,6 +884,10 @@ jobs:
key: << parameters.slice_base_cache_key >>-iphonesimulator-<< parameters.flavor >>
- restore_cache:
key: << parameters.slice_base_cache_key >>-catalyst-<< parameters.flavor >>
- restore_cache:
key: << parameters.slice_base_cache_key >>-xros-<< parameters.flavor >>
- restore_cache:
key: << parameters.slice_base_cache_key >>-xrsimulator-<< parameters.flavor >>
- run:
name: "Move back build folders"
command: |
Expand All @@ -887,6 +896,8 @@ jobs:
mv build_iphoneos_<< parameters.flavor >> build_iphoneos
mv build_iphonesimulator_<< parameters.flavor >> build_iphonesimulator
mv build_catalyst_<< parameters.flavor >> build_catalyst
mv build_xros_<< parameters.flavor >> build_xros
mv build_xrsimulator_<< parameters.flavor >> build_xrsimulator
- run:
name: "Prepare destroot folder"
command: |
Expand All @@ -898,7 +909,11 @@ jobs:
command: |
cd ./packages/react-native/sdks/hermes || exit 1
echo "[HERMES] Creating the universal framework"
export IOS_DEPLOYMENT_TARGET=13.4
export RELEASE_VERSION=$(cat /tmp/react-native-version)
./utils/build-ios-framework.sh build_framework
unset RELEASE_VERSION
unset IOS_DEPLOYMENT_TARGET
- run:
name: Package the Hermes Apple frameworks
command: |
Expand Down Expand Up @@ -933,6 +948,8 @@ jobs:
mkdir -p "$WORKING_DIR/catalyst"
mkdir -p "$WORKING_DIR/iphoneos"
mkdir -p "$WORKING_DIR/iphonesimulator"
mkdir -p "$WORKING_DIR/xros"
mkdir -p "$WORKING_DIR/xrsimulator"
cd ./packages/react-native/sdks/hermes || exit 1
Expand All @@ -941,6 +958,8 @@ jobs:
cp -r build_catalyst/$DSYM_FILE_PATH "$WORKING_DIR/catalyst/"
cp -r build_iphoneos/$DSYM_FILE_PATH "$WORKING_DIR/iphoneos/"
cp -r build_iphonesimulator/$DSYM_FILE_PATH "$WORKING_DIR/iphonesimulator/"
cp -r build_xrsimulator/$DSYM_FILE_PATH "$WORKING_DIR/xrsimulator/"
cp -r build_xros/$DSYM_FILE_PATH "$WORKING_DIR/xros/"
DEST_DIR="/tmp/hermes/dSYM/$FLAVOR"
tar -C "$WORKING_DIR" -czvf "hermes.framework.dSYM" .
Expand Down Expand Up @@ -1076,14 +1095,20 @@ jobs:
# -------------------------
# JOBS: Releases
# -------------------------
prepare_package_for_release:

# Writes a new commit and tag(s), which will trigger the `publish_release`
# and `publish_bumped_packages` workflows.
prepare_release:
parameters:
version:
type: string
latest:
type: boolean
default: false
dryrun:
# TODO(T182538198): Required for 0.74.x, where workspace packages are out
# of sync with react-native. This will be removed for 0.75+.
monorepo_packages_version:
type: string
tag:
type: string
dry_run:
type: boolean
default: false
executor: reactnativeios
Expand All @@ -1096,16 +1121,41 @@ jobs:
- brew_install:
package: cmake
- run:
name: "Set new react-native version and commit changes"
name: Versioning workspace packages
command: |
VERSION=<< parameters.version >>
if [[ -z "$VERSION" ]]; then
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -1)
echo "Using the version from the package.json: $VERSION"
fi
node ./scripts/releases-ci/prepare-package-for-release.js -v "$VERSION" -l << parameters.latest >> --dry-run << parameters.dryrun >>
node scripts/releases/set-version "<< parameters.monorepo_packages_version >>" --skip-react-native-version
- run:
name: Versioning react-native package
command: |
node scripts/releases/set-rn-version.js -v "<< parameters.version >>" --build-type "release"
- run:
name: Creating release commit
command: |
# I'm seeing failures in automatically detect the email for the
# agent that should push the commit.
git config --global user.name "Distiller"
git config --global user.email "[email protected]"
git commit -a -m "Release << parameters.version >>" -m "#publish-packages-to-npm&<< parameters.tag >>"
git tag -a "v<< parameters.version >>" -m "v<< parameters.version >>"
env GIT_PAGER=cat git show HEAD
- when:
condition:
equal: ["latest", << parameters.tag >>]
steps:
- run:
name: Updating "latest" tag
command: |
git tag -d "latest"
git push origin :latest
git tag -a "latest" -m "latest"
- unless:
condition: << parameters.dry_run >>
steps:
run:
name: Pushing release commit
command: |
git push origin $CIRCLE_BRANCH --follow-tags
build_npm_package:
parameters:
Expand Down
27 changes: 14 additions & 13 deletions .circleci/configurations/test_workflows/testAll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_release:
name: "prepare_release (dry run test)"
version: "0.0.0"
monorepo_packages_version: "0.0.0"
tag: test
dry_run: true
- prepare_hermes_workspace
- build_android:
release_type: "dry-run"
Expand All @@ -24,7 +25,7 @@
matrix:
parameters:
flavor: ["Debug", "Release"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
- build_hermes_macos:
requires:
- build_apple_slices_hermes
Expand Down Expand Up @@ -56,8 +57,8 @@
- test_ios_template:
requires:
- build_npm_package
name: "Test Template with Ruby 3.2.0"
ruby_version: "3.2.0"
name: "Test Template with Ruby 3.2.2"
ruby_version: "3.2.2"
architecture: "NewArch"
flavor: "Debug"
executor: reactnativeios-lts
Expand All @@ -71,15 +72,15 @@
jsengine: ["Hermes", "JSC"]
use_frameworks: ["StaticLibraries", "DynamicFrameworks"]
exclude:
# This config is tested with Ruby 3.2.0. Let's not double test it.
# This config is tested with Ruby 3.2.2. Let's not double test it.
- flavor: "Debug"
jsengine: "Hermes"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
requires:
- build_hermes_macos
name: "Test RNTester with Ruby 3.2.0"
ruby_version: "3.2.0"
name: "Test RNTester with Ruby 3.2.2"
ruby_version: "3.2.2"
executor: reactnativeios-lts
- test_ios_rntester:
requires:
Expand All @@ -95,11 +96,11 @@
# Tested by test_ios-JSC
- jsengine: "JSC"
use_frameworks: "StaticLibraries"
# Tested with Ruby 3.2.0, do not test this twice.
# Tested with Ruby 3.2.2, do not test this twice.
- jsengine: "Hermes"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
run_unit_tests: true
run_unit_tests: false
use_frameworks: "StaticLibraries"
ruby_version: "2.6.10"
requires:
Expand Down
13 changes: 7 additions & 6 deletions .circleci/configurations/test_workflows/testAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: ''
latest : false
dryrun: true
- prepare_release:
name: "prepare_release (dry run test)"
version: "0.0.0"
monorepo_packages_version: "0.0.0"
tag: test
dry_run: true
- prepare_hermes_workspace
- build_android:
release_type: "dry-run"
Expand All @@ -24,7 +25,7 @@
matrix:
parameters:
flavor: ["Debug", "Release"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
- build_hermes_macos:
requires:
- build_apple_slices_hermes
Expand Down
2 changes: 1 addition & 1 deletion .circleci/configurations/test_workflows/testE2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
jobs:
- test_e2e_ios:
ruby_version: "2.7.7"
ruby_version: "2.7.8"
- test_e2e_android
Loading

0 comments on commit 6bf0298

Please sign in to comment.