CI: Re-enable libjs-test262 and test-wasm runs

This commit is contained in:
Andrew Kaster
2024-06-21 18:40:29 -06:00
committed by Tim Flynn
parent 79db3b32c2
commit 527632f416
2 changed files with 34 additions and 18 deletions

View File

@@ -4,12 +4,12 @@ on: [push]
env: env:
LADYBIRD_SOURCE_DIR: ${{ github.workspace }} LADYBIRD_SOURCE_DIR: ${{ github.workspace }}
VCPKG_ROOT: ${{ github.workspace }}/Toolchain/Tarballs/vcpkg
jobs: jobs:
run_and_update_results: run_and_update_results:
runs-on: self-hosted runs-on: self-hosted
if: false if: always() && github.repository == 'LadybirdBrowser/ladybird' && github.ref == 'refs/heads/master'
#if: always() && github.repository == 'LadybirdBrowser/ladybird' && github.ref == 'refs/heads/master'
concurrency: libjs-test262 concurrency: libjs-test262
@@ -22,16 +22,16 @@ jobs:
- name: Checkout LadybirdBrowser/ladybird - name: Checkout LadybirdBrowser/ladybird
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Checkout SerenityOS/libjs-test262 - name: Checkout LadybirdBrowser/libjs-test262
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: SerenityOS/libjs-test262 repository: LadybirdBrowser/libjs-test262
path: libjs-test262 path: libjs-test262
- name: Checkout SerenityOS/libjs-data - name: Checkout LadybirdBrowser/libjs-data
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: SerenityOS/libjs-data repository: LadybirdBrowser/libjs-data
path: libjs-data path: libjs-data
- name: Checkout tc39/test262 - name: Checkout tc39/test262
@@ -49,13 +49,15 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget sudo apt-get install -y ninja-build unzip gcc-13 g++-13 jq wget curl zip tar autoconf autoconf-archive automake pkg-config libgl1-mesa-dev
test -e /opt/wabt-1.0.35 || ( test -e /opt/wabt-1.0.35 || (
cd /tmp cd /tmp
wget https://github.com/WebAssembly/wabt/releases/download/1.0.35/wabt-1.0.35-ubuntu-20.04.tar.gz wget https://github.com/WebAssembly/wabt/releases/download/1.0.35/wabt-1.0.35-ubuntu-20.04.tar.gz
sudo tar xf wabt-1.0.35-ubuntu-20.04.tar.gz -C /opt sudo tar xf wabt-1.0.35-ubuntu-20.04.tar.gz -C /opt
rm wabt-1.0.35-ubuntu-20.04.tar.gz rm wabt-1.0.35-ubuntu-20.04.tar.gz
) )
# FIXME: Just use the setup action
./Toolchain/BuildVcpkg.sh --ci
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
@@ -84,17 +86,21 @@ jobs:
cp -R libjs-data/test262 libjs-data/wasm old-libjs-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
run: | run: |
# FIXME: Why does vcpkg need this?
# Running as a normal user would make this a non-issue though
export HOME=${{ github.workspace }}/home
mkdir -p $HOME
env PATH="/opt/wabt-1.0.35/bin:$PATH" \ env PATH="/opt/wabt-1.0.35/bin:$PATH" \
cmake -GNinja -B Build \ CC=gcc-13 \
CXX=g++-13 \
cmake --preset CI -B libjs-test262/Build \
-DCMAKE_C_COMPILER=gcc-13 \ -DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \ -DCMAKE_CXX_COMPILER=g++-13 \
-DWASM_SPEC_TEST_SKIP_FORMATTING=ON \ -DWASM_SPEC_TEST_SKIP_FORMATTING=ON \
-DINCLUDE_WASM_SPEC_TESTS=ON \ -DINCLUDE_WASM_SPEC_TESTS=ON \
-DLADYBIRD_SOURCE_DIR=${{ env.LADYBIRD_SOURCE_DIR }} \ -DENABLE_QT=OFF
-DSERENITY_CACHE_DIR=Build/caches ninja -C libjs-test262/Build test262-runner test-js test-wasm
ninja -C Build test262-runner test-js test-wasm
- name: Run test262 and test262-parser-tests - name: Run test262 and test262-parser-tests
working-directory: libjs-test262 working-directory: libjs-test262
@@ -109,7 +115,7 @@ jobs:
- 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-data/wasm/per-file-master.json || true Build/bin/test-wasm --per-file Build/Lagom/Userland/Libraries/LibWasm/Tests > ../libjs-data/wasm/per-file-master.json || true
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 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),
@@ -142,9 +148,9 @@ jobs:
- name: Deploy to GitHub - name: Deploy to GitHub
uses: JamesIves/github-pages-deploy-action@v4.6.1 uses: JamesIves/github-pages-deploy-action@v4.6.1
with: with:
git-config-name: BuggieBot git-config-name: LadybirdBot
git-config-email: buggiebot@serenityos.org git-config-email: ladybirdbot@ladybird.org
branch: master branch: master
repository-name: SerenityOS/libjs-data repository-name: LadybirdBrowser/libjs-data
token: ${{ secrets.BUGGIEBOT_TOKEN }} token: ${{ secrets.LADYBIRD_BOT_TOKEN }}
folder: libjs-data folder: libjs-data

View File

@@ -8,7 +8,17 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=/dev/null # shellcheck source=/dev/null
. "${DIR}/../Meta/shell_include.sh" . "${DIR}/../Meta/shell_include.sh"
exit_if_running_as_root "Do not run BuildVcpkg.sh as root, parts of your Toolchain directory will become root-owned" # FIXME: Make the test262-runner CI use a non-root user
ci=0
if [[ "$1" == "--ci" ]]; then
echo "Running in CI mode, will not check for root user"
ci=1
shift
fi
if [ "$ci" -eq 0 ]; then
exit_if_running_as_root "Do not run BuildVcpkg.sh as root, parts of your Toolchain directory will become root-owned"
fi
GIT_REPO="https://github.com/microsoft/vcpkg.git" GIT_REPO="https://github.com/microsoft/vcpkg.git"
GIT_REV="01f602195983451bc83e72f4214af2cbc495aa94" # 2024.05.24 GIT_REV="01f602195983451bc83e72f4214af2cbc495aa94" # 2024.05.24