ci: add CI workflows for tests #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: wpt | |
env: | |
ARCH: x86_64-linux | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "src/**/*.zig" | |
- "src/*.zig" | |
pull_request: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
wpt: | |
name: web platform tests | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/browsercore/zig-browsercore:0.11.0 | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_CI_PAT }} | |
# fetch submodules recusively, to get jsruntime-lib submodules also. | |
submodules: recursive | |
- name: install v8 | |
run: | | |
mkdir -p vendor/jsruntime-lib/vendor/v8/${{env.ARCH}}/debug | |
ln -s /usr/local/lib/libc_v8.a vendor/jsruntime-lib/vendor/v8/${{env.ARCH}}/debug/libc_v8.a | |
mkdir -p vendor/jsruntime-lib/vendor/v8/${{env.ARCH}}/release | |
ln -s /usr/local/lib/libc_v8.a vendor/jsruntime-lib/vendor/v8/${{env.ARCH}}/release/libc_v8.a | |
- name: install deps | |
run: | | |
ln -s /usr/local/lib/lexbor vendor/lexbor | |
ln -s /usr/local/lib/libiconv vendor/libiconv | |
ln -s /usr/local/lib/netsurf/build vendor/netsurf/build | |
ln -s /usr/local/lib/netsurf/lib vendor/netsurf/lib | |
ln -s /usr/local/lib/netsurf/include vendor/netsurf/include | |
# For now WPT tests doesn't pass at all. | |
# We accept then to continue the job on failure. | |
# TODO remove the exit 0 from the script when tests will pass. | |
- run: | | |
zig build wpt -Dengine=v8 | |
exit 0 |