Hermes: Use pre-built Hermes runtime in iOS Template tests (#33974)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33974

Enable Hermes in iOS Template tests and use pre-built Hermes binaries from Circle CI.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36989241

fbshipit-source-id: a240713d0bd0383fa218f8fc031e81467ebeb376
This commit is contained in:
Héctor Ramos
2022-06-09 11:18:30 -07:00
committed by Facebook GitHub Bot
parent 6154cb7512
commit d592bdcbd3
2 changed files with 22 additions and 4 deletions
+18 -4
View File
@@ -677,13 +677,24 @@ jobs:
executor: reactnativeios
environment:
- PROJECT_NAME: "iOSTemplateProject"
- HERMES_WS_DIR: *hermes_workspace_root
steps:
- checkout_code_with_cache
- run_yarn
- 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
- run:
name: Set RCT_VERBOSE_POD_INSTALL=1
command: echo "export RCT_VERBOSE_POD_INSTALL=1" >> $BASH_ENV
- run:
name: Create iOS template project
command: |
@@ -693,8 +704,7 @@ jobs:
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
mkdir -p ~/tmp
cd ~/tmp
node "$REPO_ROOT/cli.js" init "$PROJECT_NAME" --template "$REPO_ROOT"
node "$REPO_ROOT/cli.js" init "$PROJECT_NAME" --template "$REPO_ROOT" --verbose
- run:
name: Build template project
command: |
@@ -992,6 +1002,9 @@ jobs:
cp LICENSE /tmp/cocoapods-package-root
tar -C /tmp/cocoapods-package-root/ -czvf /tmp/hermes/output/hermes-runtime-darwin-v$(get_release_version).tar.gz .
mkdir -p /tmp/hermes/hermes-runtime-darwin
cp /tmp/hermes/output/hermes-runtime-darwin-v$(get_release_version).tar.gz /tmp/hermes/hermes-runtime-darwin/.
- save_cache:
key: *hermes_cache_key
paths:
@@ -1002,12 +1015,13 @@ jobs:
- ~/react-native/hermes/build_macosx
- ~/react-native/hermes/destroot
- store_artifacts:
path: /tmp/hermes/output/
path: /tmp/hermes/hermes-runtime-darwin/
- store_artifacts:
path: /tmp/hermes/osx-bin/
- persist_to_workspace:
root: /tmp/hermes/
paths:
- hermes-runtime-darwin
- osx-bin
build_hermesc_windows:
+4
View File
@@ -148,6 +148,10 @@ def get_default_flags()
flags[:hermes_enabled] = true
end
if ENV['USE_HERMES'] == '1'
flags[:hermes_enabled] = true
end
return flags
end