diff --git a/.github/workflows/es-actions.yml b/.github/workflows/es-actions.yml index 4ee0a67ba..6bbd39291 100644 --- a/.github/workflows/es-actions.yml +++ b/.github/workflows/es-actions.yml @@ -268,7 +268,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - tc: ['octane', 'v8 chakracore spidermonkey', 'jetstream-only-simple-parallel-1', 'jetstream-only-simple-parallel-2 jsc-stress', 'jetstream-only-simple-parallel-3 jetstream-only-cdjs'] + tc: ['new-es octane', 'v8 chakracore spidermonkey', 'jetstream-only-simple-parallel-1', 'jetstream-only-simple-parallel-2 jsc-stress', 'jetstream-only-simple-parallel-3 jetstream-only-cdjs'] steps: - uses: actions/checkout@v3 with: @@ -304,11 +304,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - tc: ['new-es octane v8', 'chakracore spidermonkey'] + tc: ['octane v8 web-tooling-benchmark', 'chakracore spidermonkey new-es'] build_opt: ['', '-DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON', '-DESCARGOT_SMALL_CONFIG=ON -DESCARGOT_USE_CUSTOM_LOGGING=ON'] exclude: - # exclude octane, v8 due to low performance incurred by SMALL_CONFIG - - tc: 'new-es octane v8' + # exclude octane, v8, web-tooling-benchmark due to low performance incurred by SMALL_CONFIG + - tc: 'octane v8 web-tooling-benchmark' build_opt: '-DESCARGOT_SMALL_CONFIG=ON -DESCARGOT_USE_CUSTOM_LOGGING=ON' steps: - uses: actions/checkout@v3 @@ -507,6 +507,15 @@ jobs: export PKG_CONFIG_PATH=$GITHUB_WORKSPACE/icu64/usr/lib/x86_64-linux-gnu/pkgconfig cmake -H. -Bout/codecache/x64 $BUILD_OPTIONS ninja -Cout/codecache/x64 + - name: Build x64 Release Mode + env: + BUILD_OPTIONS: -DESCARGOT_MODE=release -DESCARGOT_CODE_CACHE=ON -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja + run: | + export CXXFLAGS="-I$GITHUB_WORKSPACE/icu64/usr/include" + export LDFLAGS="-L$GITHUB_WORKSPACE/icu64/usr/lib/x86_64-linux-gnu -Wl,-rpath=$GITHUB_WORKSPACE/icu64/usr/lib/x86_64-linux-gnu" + export PKG_CONFIG_PATH=$GITHUB_WORKSPACE/icu64/usr/lib/x86_64-linux-gnu/pkgconfig + cmake -H. -Bout/codecache/release/x64 $BUILD_OPTIONS + ninja -Cout/codecache/release/x64 - name: Run x86 test run: | $RUNNER --arch=x86 --engine="$GITHUB_WORKSPACE/out/codecache/x86/escargot" sunspider-js @@ -525,6 +534,11 @@ jobs: $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/x64/escargot" octane-loading $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/x64/escargot" octane-loading rm -rf $HOME/Escargot-cache/ + - name: Run x64 release test + run: | + $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/release/x64/escargot" web-tooling-benchmark + $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/release/x64/escargot" web-tooling-benchmark + rm -rf $HOME/Escargot-cache/ - name: Handle error cases run: | $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/x64/escargot" sunspider-js @@ -534,6 +548,9 @@ jobs: $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/x64/escargot" sunspider-js rm $HOME/Escargot-cache/cache_list $RUNNER --arch=x86_64 --engine="$GITHUB_WORKSPACE/out/codecache/x64/escargot" sunspider-js + - if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 + timeout-minutes: 15 build-test-wasmjs: runs-on: ubuntu-latest diff --git a/.gitmodules b/.gitmodules index 23d5acd38..872469a8b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,3 +26,6 @@ path = third_party/walrus url = https://github.com/Samsung/walrus.git ignore = untracked +[submodule "test/web-tooling-benchmark"] + path = test/web-tooling-benchmark + url = https://github.com/v8/web-tooling-benchmark diff --git a/test/web-tooling-benchmark b/test/web-tooling-benchmark new file mode 160000 index 000000000..4a12828c6 --- /dev/null +++ b/test/web-tooling-benchmark @@ -0,0 +1 @@ +Subproject commit 4a12828c6a1eed02a70c011bd080445dd319a05f diff --git a/tools/run-tests.py b/tools/run-tests.py index 79a2ce7a0..2b934fdc8 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -880,7 +880,7 @@ def run_escargot_debugger(engine, arch, extra_arg): ESCARGOT_DEBUGGER_TESTER = join(PROJECT_SOURCE_DIR, 'tools', 'debugger', 'debugger_tester.sh') print('Running Escargot-Debugger-Server-Source test:') fails = 0 - proc = Popen(['chmod', '+x', ESCARGOT_DEBUGGER_TESTER],stdout=PIPE) + proc = Popen(['chmod', '+x', ESCARGOT_DEBUGGER_TESTER], stdout=PIPE) for files in os.listdir(ESCARGOT_DEBUGGER_TEST_DIR): if files.endswith(".cmd"): test_case, _ = os.path.splitext(files) @@ -902,7 +902,7 @@ def run_escargot_debugger2(engine, arch, extra_arg): ESCARGOT_DEBUGGER_TESTER = join(PROJECT_SOURCE_DIR, 'tools', 'debugger', 'debugger_tester.sh') print('Running Escargot-Debugger-Client-Source test:') fails = 0 - proc = Popen(['chmod', '+x', ESCARGOT_DEBUGGER_TESTER],stdout=PIPE) + proc = Popen(['chmod', '+x', ESCARGOT_DEBUGGER_TESTER], stdout=PIPE) for files in os.listdir(ESCARGOT_DEBUGGER_TEST_DIR): if files.endswith(".cmd"): test_case, _ = os.path.splitext(files) @@ -917,6 +917,33 @@ def run_escargot_debugger2(engine, arch, extra_arg): if fails > 0: raise Exception('Escargot-Debugger-Client-Source tests failed') +@runner('web-tooling-benchmark', default=False) +def run_web_tooling_benchmark(engine, arch, extra_arg): + WEB_TOOLING_DIR = join(PROJECT_SOURCE_DIR, 'test', 'web-tooling-benchmark') + WEB_TOOLING_SRC_DIR = join(WEB_TOOLING_DIR, 'src') + + suite_file = join(WEB_TOOLING_SRC_DIR, 'suite.js') + with open(suite_file, "r") as f: + lines = f.readlines() + with open(suite_file, "w") as f: + for line in lines: + # minimize sample count to 1 + f.write(re.sub(r'minSamples: 20', 'minSamples: 1', line)) + + flag_file = join(WEB_TOOLING_SRC_DIR, 'cli-flags-helper.js') + with open(flag_file, "r") as f: + lines = f.readlines() + with open(flag_file, "w") as f: + for line in lines: + # exclude long running tests + if "babel" not in line and "babylon" not in line and "chai" not in line: + f.write(line) + + proc = Popen(['npx', 'npm@6', 'install'], cwd=WEB_TOOLING_DIR, stdout=PIPE) + proc.wait() + + run([engine, 'dist/cli.js'], cwd=WEB_TOOLING_DIR) + @runner('dump-all', default=False) def run_dump_all(engine, arch, extra_arg): for test in RUNNERS: