Meta: Run Wasm spec tests on master push

...and report the results on libjs-website.
This commit is contained in:
Ali Mohammad Pur 2022-03-11 10:39:00 +03:30 committed by Linus Groh
parent ab55abb0f8
commit c0dbea43f3
Notes: sideshowbarker 2024-07-17 17:18:35 +09:00

View File

@ -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: |