CI: Switch export of test262/Wasm test results to libjs-data

This commit is contained in:
Timothy Flynn 2023-10-31 11:13:00 -04:00 committed by Tim Flynn
parent 99216b2a87
commit 92e9145edc
Notes: sideshowbarker 2024-07-17 06:51:48 +09:00
2 changed files with 23 additions and 23 deletions

View File

@ -27,11 +27,11 @@ jobs:
repository: SerenityOS/libjs-test262 repository: SerenityOS/libjs-test262
path: libjs-test262 path: libjs-test262
- name: Checkout SerenityOS/libjs-test262-data - name: Checkout SerenityOS/libjs-data
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: SerenityOS/libjs-test262-data repository: SerenityOS/libjs-data
path: libjs-test262-data path: libjs-data
- name: Checkout tc39/test262 - name: Checkout tc39/test262
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -90,8 +90,8 @@ jobs:
- name: Get previous results - name: Get previous results
run: | run: |
mkdir -p old-libjs-test262-data mkdir -p old-libjs-data
cp -R libjs-test262-data/test262 libjs-test262-data/wasm old-libjs-test262-data cp -R libjs-data/test262 libjs-data/wasm old-libjs-data
- name: Build test262-runner, test-js and test-wasm - name: Build test262-runner, test-js and test-wasm
working-directory: libjs-test262 working-directory: libjs-test262
@ -113,14 +113,14 @@ jobs:
--serenity .. \ --serenity .. \
--test262 ../test262 \ --test262 ../test262 \
--test262-parser-tests ../test262-parser-tests \ --test262-parser-tests ../test262-parser-tests \
--results-json ../libjs-test262-data/test262/results.json \ --results-json ../libjs-data/test262/results.json \
--per-file-output ../libjs-test262-data/test262/per-file-master.json --per-file-output ../libjs-data/test262/per-file-master.json
- name: Run test-wasm - name: Run test-wasm
working-directory: libjs-test262 working-directory: libjs-test262
run: | run: |
Build/bin/test-wasm --per-file Build/_deps/lagom-build/Userland/Libraries/LibWasm/Tests > ../libjs-test262-data/wasm/per-file-master.json || true Build/bin/test-wasm --per-file Build/_deps/lagom-build/Userland/Libraries/LibWasm/Tests > ../libjs-data/wasm/per-file-master.json || true
jq -nc -f /dev/stdin <<-EOF --slurpfile previous ../libjs-test262-data/wasm/results.json --slurpfile details ../libjs-test262-data/wasm/per-file-master.json > wasm-new-results.json jq -nc -f /dev/stdin <<-EOF --slurpfile previous ../libjs-data/wasm/results.json --slurpfile details ../libjs-data/wasm/per-file-master.json > wasm-new-results.json
\$details[0] as \$details | \$previous[0] + [{ \$details[0] as \$details | \$previous[0] + [{
"commit_timestamp": $(git -C .. log -1 --format=%ct), "commit_timestamp": $(git -C .. log -1 --format=%ct),
"run_timestamp": $(date +%s), "run_timestamp": $(date +%s),
@ -141,13 +141,13 @@ jobs:
} }
}] }]
EOF EOF
mv wasm-new-results.json ../libjs-test262-data/wasm/results.json mv wasm-new-results.json ../libjs-data/wasm/results.json
- name: Compare test262 results - name: Compare test262 results
run: ./libjs-test262/per_file_result_diff.py -o old-libjs-test262-data/test262/per-file-master.json -n libjs-test262-data/test262/per-file-master.json run: ./libjs-test262/per_file_result_diff.py -o old-libjs-data/test262/per-file-master.json -n libjs-data/test262/per-file-master.json
- name: Compare Wasm results - name: Compare Wasm results
run: ./libjs-test262/per_file_result_diff.py -o old-libjs-test262-data/wasm/per-file-master.json -n libjs-test262-data/wasm/per-file-master.json run: ./libjs-test262/per_file_result_diff.py -o old-libjs-data/wasm/per-file-master.json -n libjs-data/wasm/per-file-master.json
- name: Deploy to GitHub - name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@v4.4.3 uses: JamesIves/github-pages-deploy-action@v4.4.3
@ -155,6 +155,6 @@ jobs:
git-config-name: BuggieBot git-config-name: BuggieBot
git-config-email: buggiebot@serenityos.org git-config-email: buggiebot@serenityos.org
branch: master branch: master
repository-name: SerenityOS/libjs-test262-data repository-name: SerenityOS/libjs-data
token: ${{ secrets.BUGGIEBOT_TOKEN }} token: ${{ secrets.BUGGIEBOT_TOKEN }}
folder: libjs-test262-data folder: libjs-data

View File

@ -31,11 +31,11 @@ jobs:
emcc --version emcc --version
ninja --version ninja --version
gcc --version gcc --version
- name: Checkout SerenityOS/libjs-test262-data libjs-wasm - name: Checkout SerenityOS/libjs-data libjs-wasm
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: SerenityOS/libjs-test262-data repository: SerenityOS/libjs-data
path: libjs-test262-data path: libjs-data
ref: libjs-wasm ref: libjs-wasm
- name: "Create build directories" - name: "Create build directories"
run: | run: |
@ -88,10 +88,10 @@ jobs:
- name: "Prepare files" - name: "Prepare files"
run: | run: |
cp ${{ github.workspace }}/Build/wasm/bin/libjs.js ${{ github.workspace }}/libjs-test262-data/libjs.js cp ${{ github.workspace }}/Build/wasm/bin/libjs.js ${{ github.workspace }}/libjs-data/libjs.js
cp ${{ github.workspace }}/Build/wasm/bin/libjs.wasm ${{ github.workspace }}/libjs-test262-data/libjs.wasm cp ${{ github.workspace }}/Build/wasm/bin/libjs.wasm ${{ github.workspace }}/libjs-data/libjs.wasm
echo 'Module.SERENITYOS_COMMIT = "${{ github.sha }}";' >> ${{ github.workspace }}/libjs-test262-data/libjs.js echo 'Module.SERENITYOS_COMMIT = "${{ github.sha }}";' >> ${{ github.workspace }}/libjs-data/libjs.js
tar --exclude='.[^/]*' -czvf libjs-wasm.tar.gz -C ${{ github.workspace }}/libjs-test262-data . tar --exclude='.[^/]*' -czvf libjs-wasm.tar.gz -C ${{ github.workspace }}/libjs-data .
- name: Deploy to GitHub - name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@v4.4.3 uses: JamesIves/github-pages-deploy-action@v4.4.3
@ -100,9 +100,9 @@ jobs:
git-config-name: BuggieBot git-config-name: BuggieBot
git-config-email: buggiebot@serenityos.org git-config-email: buggiebot@serenityos.org
branch: libjs-wasm branch: libjs-wasm
repository-name: SerenityOS/libjs-test262-data repository-name: SerenityOS/libjs-data
token: ${{ secrets.BUGGIEBOT_TOKEN }} token: ${{ secrets.BUGGIEBOT_TOKEN }}
folder: ${{ github.workspace }}/libjs-test262-data folder: ${{ github.workspace }}/libjs-data
- name: Upload artifact package - name: Upload artifact package
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master'