Skip to content

Commit a80a8ab

Browse files
lavenzgfacebook-github-bot
authored andcommitted
Add e2e android intl test (#1644)
Summary: Pull Request resolved: #1644 Differential Revision: D70862275
1 parent e941fb2 commit a80a8ab

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,34 @@ jobs:
121121
# toLocaleLowerCase and toLocaleUpperCase are the two main ones.
122122
# cmake --build ./build --target check-hermes
123123
python3 hermes/utils/test_runner.py --test-intl test262/test -b build/bin ${{ matrix.test_runner_flags }}
124+
125+
test-android-e2e-intl:
126+
strategy:
127+
fail-fast: false
128+
matrix:
129+
os: [ubuntu-24.04]
130+
abis: ["x86", "x86_64", "arm64-v8a", "armeabi-v7a"]
131+
runs-on: ${{ matrix.os }}
132+
env:
133+
HERMES_WS_DIR: /home/runner/work/hermes
134+
ANDROID_NDK: /usr/local/lib/android/sdk/ndk/27.1.12297006
135+
steps:
136+
- name: Checkout Hermes
137+
uses: actions/[email protected]
138+
- name: Checkout Test262
139+
run: |-
140+
cd "$HERMES_WS_DIR"
141+
git clone https://github.com/tc39/test262
142+
cd test262
143+
git checkout 62626e083bd506124aac6c799464d76c2c42851b
144+
- name: Build Hermes Compiler
145+
run: |-
146+
cd "$HERMES_WS_DIR"
147+
cmake -S hermes -B ./build -DCMAKE_BUILD_TYPE=Release
148+
cmake --build ./build -j 4 --target hermesc
149+
- name: Run android tests
150+
uses: ReactiveCircus/android-emulator-runner@v2
151+
with:
152+
api-level: 29
153+
emulator-options: -timezone Europe/Paris -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
154+
script: cd android && ./gradlew :intltest:prepareTests && ./gradlew -Pabis=${{ matrix.abis }} :intltest:connectedAndroidTest

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ buildscript {
2828
// This is used as part of the Hermes build process
2929
hermesC = ""
3030
for (f in [
31-
"${hermesHostBuild}/build/ImportHermesc.cmake",
32-
"${hermesHostBuild}/build_release/ImportHermesc.cmake"]) {
31+
"${hermesHostBuild}/build/ImportHostCompilers.cmake",
32+
"${hermesHostBuild}/build_release/ImportHostCompilers.cmake"]) {
3333
if(file(f).exists()) hermesC = f;
3434
}
3535
assert hermesC != "" : "Hermes host build not found"

android/hermes/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424
arguments "-DHERMES_FACEBOOK_BUILD=${rootProject.ext.facebookBuild}"
2525
arguments "-DANDROID_STL=c++_shared"
2626
arguments "-DANDROID_PIE=True"
27-
arguments "-DIMPORT_HERMESC=${rootProject.ext.hermesC}"
27+
arguments "-DIMPORT_HOST_COMPILERS=${rootProject.ext.hermesC}"
2828
arguments "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True"
2929
arguments "-DHERMES_BUILD_SHARED_JSI=True"
3030
targets "libhermes"

android/intltest/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ android {
7171
arguments "-DHERMES_FACEBOOK_BUILD=${rootProject.ext.facebookBuild}"
7272
arguments "-DANDROID_STL=c++_shared"
7373
arguments "-DANDROID_PIE=True"
74-
arguments "-DIMPORT_HERMESC=${rootProject.ext.hermesC}"
74+
arguments "-DIMPORT_HOST_COMPILERS=${rootProject.ext.hermesC}"
7575
arguments "-DHERMES_SLOW_DEBUG=False"
7676
arguments "-DHERMES_ENABLE_INTL=True"
7777
targets "jsijni", "jsijniepi", "libhermes"

0 commit comments

Comments
 (0)