2021-06-05 15:03:22 +00:00
|
|
|
name: Run test262 with LibJS and push results to the website repo
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
env:
|
|
|
|
SERENITY_SOURCE_DIR: ${{ github.workspace }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run_and_update_results:
|
2021-07-03 16:19:02 +00:00
|
|
|
runs-on: self-hosted
|
2021-06-05 15:03:22 +00:00
|
|
|
if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master'
|
|
|
|
|
|
|
|
concurrency: libjs-test262
|
|
|
|
|
|
|
|
steps:
|
2021-07-03 18:36:49 +00:00
|
|
|
- name: Cleanup
|
|
|
|
run: |
|
|
|
|
echo "Cleaning up previous run"
|
|
|
|
rm -rf "${{ github.workspace }}/*"
|
|
|
|
|
2021-06-05 15:03:22 +00:00
|
|
|
- name: Checkout SerenityOS/serenity
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Checkout linusg/libjs-test262
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: linusg/libjs-test262
|
|
|
|
path: libjs-test262
|
|
|
|
|
|
|
|
- name: Checkout linusg/libjs-website
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: linusg/libjs-website
|
|
|
|
path: libjs-website
|
|
|
|
|
|
|
|
- name: Checkout tc39/test262
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: tc39/test262
|
|
|
|
path: test262
|
|
|
|
|
|
|
|
- name: Checkout tc39/test262-parser-tests
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: tc39/test262-parser-tests
|
|
|
|
path: test262-parser-tests
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-08-26 21:11:41 +00:00
|
|
|
sudo apt-get install ninja-build unzip
|
2021-06-05 15:03:22 +00:00
|
|
|
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
|
|
|
|
- name: Install Python dependencies
|
|
|
|
# The setup-python action set default python to python3.x. Note that we are not using system python here.
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install -r libjs-test262/requirements.txt
|
|
|
|
|
|
|
|
- name: Check versions
|
|
|
|
run: set +e; g++ --version; g++-10 --version; python --version; python3 --version; ninja --version
|
|
|
|
|
2021-08-07 12:40:22 +00:00
|
|
|
- name: Create build directory
|
2021-06-05 15:03:22 +00:00
|
|
|
run: |
|
2021-08-07 14:28:07 +00:00
|
|
|
mkdir -p libjs-test262/Build/UCD
|
2021-08-07 12:40:22 +00:00
|
|
|
|
|
|
|
- name: UnicodeData cache
|
|
|
|
# TODO: Change the version to the released version when https://github.com/actions/cache/pull/489 (or 571) is merged.
|
|
|
|
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
|
|
|
|
with:
|
2021-08-07 14:28:07 +00:00
|
|
|
path: ${{ github.workspace }}/libjs-test262/Build/UCD
|
2021-08-08 06:06:55 +00:00
|
|
|
key: UnicodeData-${{ hashFiles('Meta/CMake/unicode_data.cmake') }}
|
2021-08-07 12:40:22 +00:00
|
|
|
|
2021-08-07 14:28:07 +00:00
|
|
|
- name: Build libjs-test262-runner and test-js
|
2021-06-05 15:03:22 +00:00
|
|
|
working-directory: libjs-test262
|
|
|
|
run: |
|
|
|
|
cd Build
|
2021-07-29 08:42:36 +00:00
|
|
|
cmake -GNinja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DSERENITY_SOURCE_DIR=${{ env.SERENITY_SOURCE_DIR }} ..
|
2021-08-07 14:28:07 +00:00
|
|
|
ninja libjs-test262-runner test-js
|
2021-06-05 15:03:22 +00:00
|
|
|
|
|
|
|
- name: Run test262 and test262-parser-tests
|
|
|
|
working-directory: libjs-test262
|
|
|
|
run: |
|
|
|
|
python3 run_all_and_update_results.py \
|
|
|
|
--serenity .. \
|
|
|
|
--test262 ../test262 \
|
|
|
|
--test262-parser-tests ../test262-parser-tests \
|
|
|
|
--results-json ../libjs-website/test262/data/results.json
|
|
|
|
|
|
|
|
- name: Deploy to GitHub pages
|
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.1
|
|
|
|
with:
|
|
|
|
git-config-name: BuggieBot
|
|
|
|
git-config-email: buggiebot@serenityos.org
|
|
|
|
branch: main
|
|
|
|
repository-name: linusg/libjs-website
|
|
|
|
token: ${{ secrets.BUGGIEBOT }}
|
|
|
|
folder: libjs-website
|