From c0dbea43f3367e9bfeb83539328dd4c03d23b4d7 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Fri, 11 Mar 2022 10:39:00 +0330 Subject: [PATCH] Meta: Run Wasm spec tests on master push ...and report the results on libjs-website. --- .github/workflows/libjs-test262.yml | 38 ++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/libjs-test262.yml b/.github/workflows/libjs-test262.yml index 69e7a83e6e4..0188d71ee2b 100644 --- a/.github/workflows/libjs-test262.yml +++ b/.github/workflows/libjs-test262.yml @@ -49,7 +49,7 @@ jobs: run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update - sudo apt-get install -y ninja-build unzip gcc-11 g++-11 + sudo apt-get install -y ninja-build unzip gcc-11 g++-11 jq - name: Setup Python uses: actions/setup-python@v2 @@ -94,14 +94,15 @@ jobs: working-directory: libjs-test262 run: | cd Build - cmake -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DSERENITY_SOURCE_DIR=${{ env.SERENITY_SOURCE_DIR }} .. - ninja libjs-test262-runner test-js + cmake -GNinja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DINCLUDE_WASM_SPEC_TESTS=ON -DSERENITY_SOURCE_DIR=${{ env.SERENITY_SOURCE_DIR }} .. + ninja libjs-test262-runner test-js test-wasm - name: Get previous results working-directory: libjs-test262 run: | cp -f ../libjs-website/test262/data/per-file-master.json . cp -f ../libjs-website/test262/data/per-file-bytecode-master.json . + cp -f ../libjs-website/wasm/data/per-file-master.json wasm-per-file-master.json - name: Run test262 and test262-parser-tests working-directory: libjs-test262 @@ -114,6 +115,32 @@ jobs: --per-file-output ../libjs-website/test262/data/per-file-master.json \ --per-file-bytecode-output ../libjs-website/test262/data/per-file-bytecode-master.json + - name: Run test-wasm + working-directory: libjs-test262/Build + run: | + _deps/lagom-build/test-wasm --per-file > ../../libjs-website/wasm/data/per-file-master.json + jq -nc -f <<-EOF --slurpfile previous ../../libjs-website/wasm/data/results.json --slurpfile details ../../libjs-website/wasm/data/per-file-master.json + \$details[0] as \$details | \$previous[0] + [{ + "commit_timestamp": $(git -C ../.. log -1 --format=%ct), + "run_timestamp": $(date +%s), + "versions": { + "serenity": "$(git -C ../.. rev-parse HEAD)" + }, + "tests": { + "spectest": { + "duration": (\$details.duration), + "results": { + "total": (\$details.results | keys | length), + "passed": ([\$details.results | values[] | select(. == "PASSED")] | length), + "failed": ([\$details.results | values[] | select(. == "FAILED")] | length), + "skipped": ([\$details.results | values[] | select(. == "SKIPPED")] | length), + "process_error": ([\$details.results | values[] | select(. == "PROCESS_ERROR")] | length) + } + } + } + }] + EOF + - name: Deploy to GitHub pages uses: JamesIves/github-pages-deploy-action@4.1.1 with: @@ -134,6 +161,11 @@ jobs: working-directory: libjs-test262 run: ./per_file_result_diff.py -o per-file-bytecode-master.json -n ../libjs-website/test262/data/per-file-bytecode-master.json + - name: Compare wasm + continue-on-error: true + working-directory: libjs-test262 + run: ./per_file_result_diff.py -o wasm-per-file-master.json -n ../libjs-website/wasm/data/per-file-master.json + - name: Build and package js working-directory: libjs-test262/Build run: |