Skip to content

Commit 41e1b4c

Browse files
lavenzgmeta-codesync[bot]
authored andcommitted
Switch GitHub CI to C++ test runner (facebook#1963)
Summary: Pull Request resolved: facebook#1963 Replace the Python test_runner.py invocation with the C++ test-runner binary in the GitHub Actions CI workflow for macOS, Linux, and Linux ARMv7 jobs. The C++ runner is ~8x faster and runs tests in-process. Key changes: - macOS/Linux: use build/bin/test-runner with --test-intl and --skiplist - JIT matrix variant: replace --vm-args='-Xjit=force' with --jit=force - ARMv7: same as Linux, no JIT variant - Windows: kept on Python runner (C++ runner uses POSIX signal APIs for crash isolation that aren't available on Windows) Differential Revision: D98531546
1 parent 3f8f37e commit 41e1b4c

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ jobs:
4545
os: [macos-15]
4646
cmake_flags: [""]
4747
lit_flags: [""]
48-
test_runner_flags: [""]
48+
test_runner_jit_flag: [""]
4949
include:
5050
- os: macos-15
5151
cmake_flags: "-DHERMESVM_ALLOW_JIT=2"
5252
lit_flags: "-Xjit=force"
53-
test_runner_flags: "--vm-args='-Xjit=force'"
53+
test_runner_jit_flag: "--jit=force"
5454
runs-on: ${{ matrix.os }}
5555
steps:
5656
- uses: maxim-lobanov/setup-xcode@v1
@@ -73,7 +73,8 @@ jobs:
7373
cmake -S hermes -B build -GNinja -DHERMES_ENABLE_INTL=ON -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_flags }}
7474
cmake --build ./build
7575
cmake --build ./build --target check-hermes
76-
python3 hermes/utils/test_runner.py --test-intl test262/test -b build/bin ${{ matrix.test_runner_flags }}
76+
cmake --build ./build --target test-runner
77+
build/bin/test-runner --test-intl test262/test --skiplist hermes/utils/testsuite/skiplist.json ${{ matrix.test_runner_jit_flag }}
7778
7879
test-linux-test262:
7980
strategy:
@@ -82,12 +83,12 @@ jobs:
8283
os: [4-core-ubuntu, ubuntu-24.04-arm]
8384
cmake_flags: [""]
8485
lit_flags: [""]
85-
test_runner_flags: [""]
86+
test_runner_jit_flag: [""]
8687
include:
8788
- os: ubuntu-24.04-arm
8889
cmake_flags: "-DHERMESVM_ALLOW_JIT=2"
8990
lit_flags: "-Xjit=force"
90-
test_runner_flags: "--vm-args='-Xjit=force'"
91+
test_runner_jit_flag: "--jit=force"
9192
runs-on: ${{ matrix.os }}
9293
steps:
9394
- uses: actions/checkout@v4.1.0
@@ -111,11 +112,12 @@ jobs:
111112
112113
cmake -S hermes -GNinja -B build_intl -DHERMES_ENABLE_INTL=ON -DCMAKE_CXX_FLAGS=-O2 -DCMAKE_C_FLAGS=-O2 -DCMAKE_BUILD_TYPE=Debug ${{ matrix.cmake_flags }}
113114
cmake --build ./build_intl
115+
cmake --build ./build_intl --target test-runner
114116
# Not running Hermes test with -DHERMES_ENABLE_INTL=ON until more of
115117
# Intl is built out: toLocaleLowerCase and toLocaleUpperCase are the two
116118
# main ones.
117119
# cmake --build ./build_intl --target check-hermes
118-
python3 hermes/utils/test_runner.py --test-intl test262/test -b build_intl/bin ${{ matrix.test_runner_flags }}
120+
build_intl/bin/test-runner --test-intl test262/test --skiplist hermes/utils/testsuite/skiplist.json ${{ matrix.test_runner_jit_flag }}
119121
120122
test-linux-armv7:
121123
runs-on: ubuntu-24.04-arm
@@ -148,11 +150,12 @@ jobs:
148150
-DCMAKE_CXX_FLAGS=-O2 -DCMAKE_C_FLAGS=-O2 -DCMAKE_BUILD_TYPE=Debug \
149151
-DCMAKE_SYSTEM_PROCESSOR=arm -DCMAKE_SYSTEM_NAME=Linux
150152
cmake --build ./build_intl
153+
cmake --build ./build_intl --target test-runner
151154
# Not running Hermes test with -DHERMES_ENABLE_INTL=ON until more of
152155
# Intl is built out: toLocaleLowerCase and toLocaleUpperCase are the two
153156
# main ones.
154157
# cmake --build ./build_intl --target check-hermes
155-
python3 hermes/utils/test_runner.py --test-intl test262/test -b build_intl/bin
158+
build_intl/bin/test-runner --test-intl test262/test --skiplist hermes/utils/testsuite/skiplist.json
156159
157160
test-windows-test262:
158161
strategy:
@@ -201,5 +204,5 @@ jobs:
201204
cmake --build build --config ${{ matrix.build_type }} --target hermes -- \
202205
-m /p:UseMultiToolTask=true /p:EnforceProcessCountAcrossBuilds=true
203206
204-
# Run test262 suite
207+
# Run test262 suite (using Python runner — C++ runner not yet ported to Windows)
205208
python3 hermes/utils/test_runner.py test262/test -b build/bin/${{ matrix.build_type }} --timeout 600

0 commit comments

Comments
 (0)