diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d9aabf5c7e292..d9fafd447a25f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -683,7 +683,16 @@ jobs: - 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=$HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-$CIRCLE_TAG.tar.gz" >> $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: | @@ -992,6 +1001,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 +1014,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: diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 5040c90c03cf3f..e9f6f98e8bc7cb 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -83,6 +83,7 @@ def use_react_native! (options={}) pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true if new_arch_enabled + puts_verbose("Using New Architecture.") app_path = options[:app_path] config_file_dir = options[:config_file_dir] use_react_native_codegen_discovery!({ @@ -101,11 +102,13 @@ def use_react_native! (options={}) pod 'React-Codegen', :path => $CODEGEN_OUTPUT_DIR, :modular_headers => true if fabric_enabled + puts_verbose("Fabric is enabled.") checkAndGenerateEmptyThirdPartyProvider!(prefix, new_arch_enabled, $CODEGEN_OUTPUT_DIR) setup_fabric!(prefix) end if hermes_enabled + puts_verbose("Hermes is enabled.") prepare_hermes = 'node scripts/hermes/prepare-hermes-for-build' react_native_dir = Pod::Config.instance.installation_root.join(prefix) prep_output, prep_status = Open3.capture2e(prepare_hermes, :chdir => react_native_dir) @@ -122,6 +125,7 @@ def use_react_native! (options={}) # Flipper doesn't currently compile for release https://github.com/facebook/react-native/issues/33764 # Setting the production flag to true when build for production make sure that we don't install Flipper in the app in the first place. if flipper_configuration.flipper_enabled && !production + puts_verbose("Flipper is enabled.") install_flipper_dependencies(prefix) use_flipper_pods(flipper_configuration.versions, :configurations => flipper_configuration.configurations) end @@ -148,6 +152,10 @@ def get_default_flags() flags[:hermes_enabled] = true end + if ENV['USE_HERMES'] == '1' + flags[:hermes_enabled] = true + end + return flags end @@ -654,3 +662,7 @@ def detect_changes_with_podfile(podfile) changes end end + +def puts_verbose(msg) + Pod::UI.puts(msg) if ENV['RCT_VERBOSE_POD_INSTALL'] +end