forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '6f7eae5c583090bd62ca60a4c3170445e5a0a751' into main
- Loading branch information
Showing
2,683 changed files
with
148,852 additions
and
120,850 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -384,9 +384,9 @@ jobs: | |
destination: template-apk | ||
|
||
# ------------------------- | ||
# JOBS: Test iOS Template | ||
# JOBS: Test iOS HelloWorld | ||
# ------------------------- | ||
test_ios_template: | ||
test_ios_helloworld: | ||
parameters: | ||
flavor: | ||
default: "Debug" | ||
|
@@ -412,25 +412,18 @@ jobs: | |
default: "2.6.10" | ||
description: The version of ruby that must be used | ||
type: string | ||
podfile_lock_path: | ||
type: string | ||
default: "/tmp/iOSTemplateProject/ios/Podfile.lock" | ||
pods_build_folder: | ||
type: string | ||
default: "/tmp/iOSTemplateProject/ios/Pods" | ||
podfile_lock_cache_key: | ||
type: string | ||
default: *template_podfile_lock_cache_key | ||
default: *helloworld_podfile_lock_cache_key | ||
cocoapods_cache_key: | ||
type: string | ||
default: *template_cocoapods_cache_key | ||
default: *helloworld_cocoapods_cache_key | ||
executor: | ||
description: The executor to use | ||
default: reactnativeios | ||
type: string | ||
executor: << parameters.executor >> | ||
environment: | ||
- PROJECT_NAME: "iOSTemplateProject" | ||
- HERMES_WS_DIR: *hermes_workspace_root | ||
- YARN_ENABLE_IMMUTABLE_INSTALLS: false | ||
steps: | ||
|
@@ -451,48 +444,37 @@ jobs: | |
BUILD_TYPE="<< parameters.flavor >>" | ||
TARBALL_FILENAME=$(node ./packages/react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") | ||
echo "export HERMES_ENGINE_TARBALL_PATH=$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" >> $BASH_ENV | ||
- run: | ||
name: Create iOS template project | ||
command: | | ||
REPO_ROOT=$(pwd) | ||
PACKAGE=$(cat build/react-native-package-version) | ||
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE" | ||
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$PATH_TO_PACKAGE\"}" | ||
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose | ||
- with_xcodebuild_cache: | ||
podfile_lock_path: << parameters.podfile_lock_path >> | ||
pods_build_folder: << parameters.pods_build_folder >> | ||
podfile_lock_path: packages/helloworld/ios/Podfile.lock | ||
pods_build_folder: packages/helloworld/ios/Pods | ||
cocoapods_cache_key: << parameters.cocoapods_cache_key >> | ||
podfile_lock_cache_key: << parameters.podfile_lock_cache_key >> | ||
steps: | ||
- run: | ||
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>> | ||
command: | | ||
cd /tmp/$PROJECT_NAME/ios | ||
if [[ << parameters.architecture >> == "NewArch" ]]; then | ||
export RCT_NEW_ARCH_ENABLED=1 | ||
cd packages/helloworld | ||
args=() | ||
if [[ << parameters.architecture >> == "OldArch" ]]; then | ||
args+=(--arch old) | ||
fi | ||
if [[ << parameters.jsengine >> == "JSC" ]]; then | ||
export USE_HERMES=0 | ||
args+=(--jsvm jsc) | ||
fi | ||
if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then | ||
export USE_FRAMEWORKS=dynamic | ||
args+=(--frameworks dynamic) | ||
fi | ||
cd .. | ||
bundle install | ||
bundle exec pod install --project-directory=ios | ||
yarn bootstrap ios "${args[@]}" | cat | ||
- run: | ||
name: Build template project | ||
name: Build helloworld project | ||
command: | | ||
xcodebuild build \ | ||
-configuration << parameters.flavor >> \ | ||
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \ | ||
-scheme $PROJECT_NAME \ | ||
-sdk iphonesimulator | ||
cd packages/helloworld | ||
args=() | ||
if [[ << parameters.flavor >> == "Release" ]]; then | ||
args+=(--prod) | ||
fi | ||
yarn build ios "${args[@]}" | cat | ||
yarn bundle ios "${args[@]}" | cat | ||
# ------------------------- | ||
# JOBS: Test iOS RNTester | ||
|
@@ -599,7 +581,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 | ||
|
@@ -780,7 +762,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 | ||
|
@@ -813,13 +795,19 @@ jobs: | |
exit 0 | ||
fi | ||
export RELEASE_VERSION=$(cat /tmp/react-native-version) | ||
if [[ "$SLICE" == "macosx" ]]; then | ||
echo "[HERMES] Building Hermes for MacOS" | ||
export MAC_DEPLOYMENT_TARGET=10.13 | ||
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-mac-framework.sh | ||
unset MAC_DEPLOYMENT_TARGET | ||
else | ||
echo "[HERMES] Building Hermes for iOS: $SLICE" | ||
export IOS_DEPLOYMENT_TARGET=13.4 | ||
BUILD_TYPE="<< parameters.flavor >>" ./utils/build-ios-framework.sh "$SLICE" | ||
unset IOS_DEPLOYMENT_TARGET | ||
fi | ||
unset RELEASE_VERSION | ||
echo "Moving from build_$SLICE to $FINAL_PATH" | ||
mv build_"$SLICE" "$FINAL_PATH" | ||
|
@@ -879,6 +867,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: | | ||
|
@@ -887,6 +879,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: | | ||
|
@@ -898,7 +892,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: | | ||
|
@@ -933,6 +931,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 | ||
|
@@ -941,6 +941,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" . | ||
|
@@ -1025,7 +1027,7 @@ jobs: | |
name: Build HermesC for Windows | ||
command: | | ||
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) { | ||
choco install --no-progress cmake --version 3.14.7 -y | ||
choco install --no-progress cmake -y | ||
if (-not $?) { throw "Failed to install CMake" } | ||
cd $Env:HERMES_WS_DIR\icu | ||
|
@@ -1076,36 +1078,65 @@ 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 | ||
executor: nodelts | ||
steps: | ||
- checkout_code_with_cache | ||
- run_yarn | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "1f:c7:61:c4:e2:ff:77:e3:cc:ca:a7:34:c2:79:e3:3c" | ||
- 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 >>" | ||
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: | ||
|
Oops, something went wrong.