Add Hermes CI coverage#1736
Conversation
Point JsRuntimeHost at the Hermes integration branch and add Win32 x64 D3D11 plus Android Hermes CI coverage. Import host Hermes compilers for Android cross-compilation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds CI coverage for the Hermes JavaScript engine by wiring Hermes as a selectable engine in existing CI workflows and updating the Android Playground build to support importing Hermes host compilers.
Changes:
- Point
JsRuntimeHostFetchContent dependency at a Hermes integration branch. - Add Win32 x64 D3D11 + Hermes CI job.
- Add Android (Ubuntu) + Hermes CI job and pass host compiler import into the Android CMake build via Gradle.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
Switches JsRuntimeHost source to a Hermes integration branch. |
Apps/Playground/Android/BabylonNative/build.gradle |
Refactors CMake argument construction and adds optional host compiler import argument passing. |
.github/workflows/ci.yml |
Adds Win32 Hermes and Android Ubuntu Hermes jobs to the main CI matrix. |
.github/workflows/build-win32.yml |
Extends engine selection logic to include Hermes (NAPI_JAVASCRIPT_ENGINE=Hermes). |
.github/workflows/build-android.yml |
Builds Hermes host compilers (for Ubuntu Hermes CI) and passes their import script into Gradle. |
Install the Linux host dependency needed by BabylonNative's Hermes host-tool configure and disable Boost.Context for Hermes CI builds to avoid the Windows MASM object link issue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid configuring BabylonNative's full dependency graph for the Android Hermes host compiler build. Build the host Hermes tools directly from the JsRuntimeHost Hermes integration branch instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose globalThis and a canvas alias from the native Playground host so evaluated playground snippets can resolve browser-style globals under Hermes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep Win32 Hermes building and running non-visual tests, but skip Playground visual validation until Hermes has the browser-compatible canvas path required by some validation snippets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add Ubuntu clang Hermes coverage, skip visual validation for Hermes Linux builds, and address Copilot review feedback on Gradle quoting plus macOS Ninja availability for Android Hermes host tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Ubuntu clang Hermes covers configure, build, and UnitTests. Skip ModuleLoadTest for Hermes because its expected boot-module snapshot is engine-specific and currently fails under Hermes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run Playground validation for Win32 Hermes targets so failures are visible in CI while the integration is being brought up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Expose the validation engine and canvas on globalThis so evaluated playground snippets that reference browser-style globals work under Hermes eval scoping. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run validation, module-load, and rendered-picture upload for Linux Hermes builds as well. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nto hermes-integration # Conflicts: # CMakeLists.txt
Add the exact ICU and liblzma shared libraries loaded by Hermes on ubuntu-latest to the Linux ModuleLoadTest expected boot module set. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts: # CMakeLists.txt
9e7b01a to
4e6618d
Compare
ryantrem
left a comment
There was a problem hiding this comment.
Can you update the docs to explain what a BN consumer needs to do to use Hermes? It seems like it is more than just switch the compile flag (like JSC vs. v8 for example).
| if: inputs.js-engine == 'Hermes' | ||
| run: | | ||
| git clone --depth 1 --branch hermes-integration https://github.com/CedricGuillemet/JsRuntimeHost.git Build/JsRuntimeHostHost | ||
| cmake -B Build/HermesHost -G Ninja -S Build/JsRuntimeHostHost \ |
There was a problem hiding this comment.
Will this need to be done by BN consumers as well then?
| FetchContent_Declare(JsRuntimeHost | ||
| GIT_REPOSITORY https://github.com/BabylonJS/JsRuntimeHost.git | ||
| GIT_TAG c88625b6d61b55c4589f02408d03826e83199870) | ||
| GIT_REPOSITORY https://github.com/CedricGuillemet/JsRuntimeHost.git |
There was a problem hiding this comment.
Putting a note here just to make sure it doesn't get forgotten - update to the new commit after the JsRuntimeHost PR is merged.
Summary
Notes