Skip to content

Add Hermes CI coverage#1736

Open
CedricGuillemet wants to merge 13 commits into
BabylonJS:masterfrom
CedricGuillemet:hermes-integration
Open

Add Hermes CI coverage#1736
CedricGuillemet wants to merge 13 commits into
BabylonJS:masterfrom
CedricGuillemet:hermes-integration

Conversation

@CedricGuillemet

@CedricGuillemet CedricGuillemet commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • point JsRuntimeHost at the Hermes integration branch
  • add Win32 x64 D3D11 + Hermes CI
  • add Android + Hermes CI with host compiler import
  • add Ubuntu + Hermer CI

Notes

  • Apple + Hermes is intentionally not added because shutdown currently aborts on macOS/iOS.

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>
Copilot AI review requested due to automatic review settings June 5, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 JsRuntimeHost FetchContent 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.

Comment thread CMakeLists.txt
Comment thread Apps/Playground/Android/BabylonNative/build.gradle
Comment thread .github/workflows/build-android.yml
CedricGuillemet and others added 4 commits June 5, 2026 14:32
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>
@CedricGuillemet CedricGuillemet marked this pull request as draft June 5, 2026 14:06
CedricGuillemet and others added 8 commits June 5, 2026 16:10
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>
@CedricGuillemet CedricGuillemet marked this pull request as ready for review June 10, 2026 12:16

@ryantrem ryantrem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this need to be done by BN consumers as well then?

Comment thread CMakeLists.txt
FetchContent_Declare(JsRuntimeHost
GIT_REPOSITORY https://github.com/BabylonJS/JsRuntimeHost.git
GIT_TAG c88625b6d61b55c4589f02408d03826e83199870)
GIT_REPOSITORY https://github.com/CedricGuillemet/JsRuntimeHost.git

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Putting a note here just to make sure it doesn't get forgotten - update to the new commit after the JsRuntimeHost PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants