Skip to content

Commit

Permalink
Merge pull request #30 from Expensify/Rory-UpdateForkFromUpstream
Browse files Browse the repository at this point in the history
Update Expensify/react-native fork from upstream
  • Loading branch information
cead22 authored Sep 6, 2022
2 parents 73a8f0f + 89fc763 commit 6e9d4bf
Show file tree
Hide file tree
Showing 177 changed files with 4,691 additions and 1,263 deletions.
68 changes: 52 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ references:
# Dependency Anchors
# -------------------------
dependency_versions:
# The Xcode version used on CircleCI OSS tests must be kept in sync with
# the Xcode version used on Sandcastle OSS tests. See _XCODE_VERSION in
# tools/utd/migrated_nbtd_jobs/react_native_oss.td
xcode_version: &xcode_version "13.3.1"
nodelts_image: &nodelts_image "cimg/node:16.14"
nodeprevlts_image: &nodeprevlts_image "cimg/node:14.19"
Expand All @@ -50,10 +47,10 @@ references:
checkout_cache_key: &checkout_cache_key v1-checkout
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
hermes_cache_key: &hermes_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
hermes_tarball_cache_key: &hermes_tarball_cache_key v2-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
pods_cache_key: &pods_cache_key v7-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
hermes_cache_key: &hermes_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
hermes_windows_cache_key: &hermes_windows_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
hermes_tarball_cache_key: &hermes_tarball_cache_key v3-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
pods_cache_key: &pods_cache_key v8-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
windows_yarn_cache_key: &windows_yarn_cache_key v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
yarn_cache_key: &yarn_cache_key v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}

Expand Down Expand Up @@ -682,6 +679,16 @@ jobs:
# -------------------------
test_ios_template:
executor: reactnativeios
parameters:
flavor:
type: string
default: "Debug"
architecture:
type: string
default: "OldArch"
jsengine:
type: string
default: "Hermes"
environment:
- PROJECT_NAME: "iOSTemplateProject"
- HERMES_WS_DIR: *hermes_workspace_root
Expand All @@ -692,25 +699,49 @@ jobs:
- attach_workspace:
at: .
- *attach_hermes_workspace
- run:
name: Set USE_HERMES=1
command: echo "export USE_HERMES=1" >> $BASH_ENV
- run:
name: Set HERMES_ENGINE_TARBALL_PATH
command: |
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
- when:
condition:
equal: ["Hermes", << parameters.jsengine >>]
steps:
- run:
name: Set HERMES_ENGINE_TARBALL_PATH
command: |
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $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/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>
command: |
cd /tmp/$PROJECT_NAME
yarn install
cd ios
bundle install
if [[ << parameters.flavor >> == "Release" ]]; then
export PRODUCTION=1
fi
if [[ << parameters.architecture >> == "NewArch" ]]; then
export RCT_NEW_ARCH_ENABLED=1
fi
if [[ << parameters.jsengine >> == "JSC" ]]; then
export USE_HERMES=0
fi
bundle exec pod install
- run:
name: Build template project
command: |
xcodebuild build \
-configuration << parameters.flavor >> \
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \
-scheme $PROJECT_NAME \
-sdk iphonesimulator
Expand Down Expand Up @@ -874,7 +905,7 @@ jobs:
# -------------------------
prepare_hermes_workspace:
docker:
- image: debian:bullseye
- image: debian:11.4
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "sdks/.hermesversion"
Expand Down Expand Up @@ -1311,6 +1342,11 @@ workflows:
- test_ios_template:
requires:
- build_npm_package
matrix:
parameters:
architecture: ["NewArch", "OldArch"]
flavor: ["Debug", "Release"]
jsengine: ["Hermes", "JSC"]
- test_ios_rntester:
requires:
- build_hermes_macos
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ untyped-import
untyped-type-import

[version]
^0.184.0
^0.186.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ untyped-import
untyped-type-import

[version]
^0.184.0
^0.186.0
1 change: 1 addition & 0 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ REACT_PUBLIC_HEADERS = {
"React/RCTBridgeMethod.h": RCTBASE_PATH + "RCTBridgeMethod.h",
"React/RCTBridgeModule.h": RCTBASE_PATH + "RCTBridgeModule.h",
"React/RCTBridgeModuleDecorator.h": RCTBASE_PATH + "RCTBridgeModuleDecorator.h",
"React/RCTBundleManager.h": RCTBASE_PATH + "RCTBundleManager.h",
"React/RCTBundleURLProvider.h": RCTBASE_PATH + "RCTBundleURLProvider.h",
"React/RCTComponent.h": RCTVIEWS_PATH + "RCTComponent.h",
"React/RCTComponentData.h": RCTVIEWS_PATH + "RCTComponentData.h",
Expand Down
Loading

0 comments on commit 6e9d4bf

Please sign in to comment.