Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Héctor Ramos 6154cb7512 Hermes: Use arbitrary path to hermes-runtime-darwin if ENV set
Summary:
Allow an arbitrary path to hermes-runtime-darwin-vX.Y.Z.tgz to be specified. This can be used in CI or in local e2e tests to test with Hermes enabled without having a matching GitHub release.

Usage:

```
HERMES_ENGINE_TARBALL_PATH=~/Downloads/hermes- runtime-darwin-v0.69.0.tar.gz \
  USE_HERMES=1 \
  pod install
```

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36985477

fbshipit-source-id: 853829c89e6f0ac3f63781c7f290cf3994b8e0cd
2022-06-09 11:18:30 -07:00
Nicola Corti bffad4351c Backports fixes on the 0.69 release branch to main (#33938)
Summary:
This PR includes a set of changes that landed only on the 0.69-stable release branch and need to be backported to main:

- a72d1960ff
- 659b693fcd
- 2a6832a7e3
- 0ca6e41059
- f50936bef2

Most of the fixes are working around the assumption that
`version != 1000.0.0 => Build Hermes From Source`.

That is not true in the release branch as the version is named (e.g. 0.69.0-rc4) and we need to build Hermes there.

## Changelog

[Internal] - Backports fixes on the 0.69 release branch to main

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

Test Plan: Tested that those commits are working fine on the release branch.

Reviewed By: hramos

Differential Revision: D36776291

Pulled By: cortinico

fbshipit-source-id: 66e28232d80054fab4a2a97c8d2de12e3c1cf392
2022-05-31 10:37:12 -07:00
Héctor Ramos 38b70653b2 Hermes: Use pre-built artifacts in hermes-engine
Summary:
Update `hermes-engine.podspec` to use pre-built Hermes artifacts from the corresponding React Native GitHub Release when targeting a specific React Native release.
Otherwise, fallback to building Hermes from source.

Changelog: [Internal]

Reviewed By: cortinico, cipolleschi

Differential Revision: D36609257

fbshipit-source-id: 6179c9e255558c7eaf1417ff46a2e7db120295f0
2022-05-25 03:30:57 -07:00
Héctor Ramos 004b8609d9 Hermes: Add scripts to package, remove shelljs
Summary:
The new Hermes scripts need to be included in the `react-native` npm.

The `shelljs` dependency that was used by the Hermes scripts is a dev dependency, so instead of adding to the `react-native` npm size, we refactored its use out of hermes-utils.js.

Changelog:
[General][Added] - Add Hermes scripts to package

Reviewed By: cortinico

Differential Revision: D36387135

fbshipit-source-id: 12d0bc29d365c4cb18d33a0d390e6e7d34864b7a
2022-05-24 14:08:48 -07:00
Héctor Ramos 644fe430fd iOS: Use pre-built hermesc if available (#33827)
Summary:
Use pre-built hermesc if available by generating a ImportHermesc.cmake file that points to the hermesc binary. Recent `react-native` releases should have hermesc available in sdks/hermesc.

Hermes build scripts have been updated to support a `HERMES_OVERRIDE_HERMESC_PATH` envvar which can point to this generated ImportHermesc.cmake file.

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

Changelog:
[iOS] [Changed] - Use pre-built HermesC if available in current React Native release

Reviewed By: cortinico

Differential Revision: D36024615

fbshipit-source-id: 476569f73309f9bd142f28cb02d1f7d57b6cbc6a
2022-05-13 14:43:14 -07:00
Héctor Ramos 5dae5936fc Hermes: Add tests for hermes-utils.js
Summary:
Add test coverage for the new `scripts/hermes/hermes-utils.js` consolidated Hermes scripts.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D36334652

fbshipit-source-id: e9570d1232c21e36da4e6be8c67d80f4ec224326
2022-05-13 11:29:08 -07:00
Héctor Ramos 6c2e34be0b Hermes: Create prepare-hermes-for-build.js script
Summary:
Adds a script that uses the new hermes-utils.js functions to prepare the local filesystem for Hermes to be built from source (e.g. download the Hermes source code tarball and extract it into its final location).

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36334624

fbshipit-source-id: 012f758ecda07931bdb0ab1728b87733bf5af16a
2022-05-12 20:11:59 -07:00
Héctor Ramos 3412f067a5 Hermes: Consolidate Hermes build scripts into scripts/hermes/hermes-utils.js
Summary:
Currently, the tasks for downloading, expanding, and preparing Hermes to be built for Apple targets are split across the Circle CI and CocoaPods configs.

This diff sets out to consolidate these tasks into a single hermes-utils.js script that can be reused across CI and build systems.

The release script that is used to assign the Hermes tag for a given React Native version has been moved into `scripts/hermes`.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D36329356

fbshipit-source-id: 0222070adf201fa533b607a183471396d45c6caf
2022-05-12 20:11:59 -07:00