update html5ever instructions

This commit is contained in:
Pierre Tachoire
2025-11-26 16:19:16 +01:00
parent e74a286d70
commit bde8b64ba3
5 changed files with 28 additions and 11 deletions

View File

@@ -26,6 +26,10 @@ inputs:
description: 'cache dir to use' description: 'cache dir to use'
required: false required: false
default: '~/.cache' default: '~/.cache'
mode:
description: 'debug or release'
required: false
default: 'debug'
runs: runs:
using: "composite" using: "composite"
@@ -58,19 +62,26 @@ runs:
wget -O ${{ inputs.cache-dir }}/v8/libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${{ inputs.zig-v8 }}/libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a wget -O ${{ inputs.cache-dir }}/v8/libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${{ inputs.zig-v8 }}/libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a
- name: install v8 - name: install v8 release
if: ${{ inputs.mode == 'release' }}
shell: bash
run: |
mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a
- name: install v8 debug
if: ${{ inputs.mode == 'debug' }}
shell: bash shell: bash
run: | run: |
mkdir -p v8/out/${{ inputs.os }}/debug/obj/zig/ mkdir -p v8/out/${{ inputs.os }}/debug/obj/zig/
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/debug/obj/zig/libc_v8.a ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/debug/obj/zig/libc_v8.a
mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/ - name: hmtl5ever release
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a if: ${{ inputs.mode == 'release' }}
- name: build html5ever
shell: bash shell: bash
run: make install-html5ever run: zig -Doptimize=ReleaseSafe build html5ever
- name: build html5ever dev - name: hmtl5ever debug
if: ${{ inputs.mode == 'debug' }}
shell: bash shell: bash
run: make install-html5ever-dev run: zig build html5ever

View File

@@ -36,6 +36,7 @@ jobs:
with: with:
os: ${{env.OS}} os: ${{env.OS}}
arch: ${{env.ARCH}} arch: ${{env.ARCH}}
mode: 'release'
- name: zig build - name: zig build
run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }}) run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
@@ -74,6 +75,7 @@ jobs:
with: with:
os: ${{env.OS}} os: ${{env.OS}}
arch: ${{env.ARCH}} arch: ${{env.ARCH}}
mode: 'release'
- name: zig build - name: zig build
run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=generic -Dgit_commit=$(git rev-parse --short ${{ github.sha }}) run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=generic -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
@@ -114,6 +116,7 @@ jobs:
with: with:
os: ${{env.OS}} os: ${{env.OS}}
arch: ${{env.ARCH}} arch: ${{env.ARCH}}
mode: 'release'
- name: zig build - name: zig build
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }}) run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
@@ -157,6 +160,7 @@ jobs:
with: with:
os: ${{env.OS}} os: ${{env.OS}}
arch: ${{env.ARCH}} arch: ${{env.ARCH}}
mode: 'release'
- name: zig build - name: zig build
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }}) run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})

View File

@@ -56,6 +56,8 @@ jobs:
submodules: recursive submodules: recursive
- uses: ./.github/actions/install - uses: ./.github/actions/install
with:
mode: 'release'
- name: zig build release - name: zig build release
run: zig build -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }}) run: zig build -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})

View File

@@ -40,7 +40,7 @@ WORKDIR /browser
RUN git submodule init && \ RUN git submodule init && \
git submodule update --recursive git submodule update --recursive
RUN make install-html5ever RUN zig build -Doptimize=ReleaseFast html5ever
# download and install v8 # download and install v8
RUN case $TARGETPLATFORM in \ RUN case $TARGETPLATFORM in \

View File

@@ -220,10 +220,10 @@ make install-submodule
[html5ver](https://github.com/servo/html5ever) is high-performance browser-grade HTML5 parser. [html5ver](https://github.com/servo/html5ever) is high-performance browser-grade HTML5 parser.
``` ```
make install-html5ever zig build html5ever
``` ```
For dev env, use `make install-html5ever-dev`. For a release build, use `zig build -Doptimize=ReleaseFast html5ever`.
**v8** **v8**