mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-16 16:28:58 +00:00
Merge pull request #1235 from lightpanda-io/fix-ci-install
Cleanup installation instructions
This commit is contained in:
49
.github/actions/install/action.yml
vendored
49
.github/actions/install/action.yml
vendored
@@ -17,7 +17,7 @@ inputs:
|
|||||||
zig-v8:
|
zig-v8:
|
||||||
description: 'zig v8 version to install'
|
description: 'zig v8 version to install'
|
||||||
required: false
|
required: false
|
||||||
default: 'v0.1.33'
|
default: 'v0.1.35'
|
||||||
v8:
|
v8:
|
||||||
description: 'v8 version to install'
|
description: 'v8 version to install'
|
||||||
required: false
|
required: false
|
||||||
@@ -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"
|
||||||
@@ -38,7 +42,7 @@ runs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y wget xz-utils python3 ca-certificates git pkg-config libglib2.0-dev gperf libexpat1-dev cmake clang
|
sudo apt-get install -y wget xz-utils python3 ca-certificates git pkg-config libglib2.0-dev gperf libexpat1-dev cmake clang
|
||||||
|
|
||||||
- uses: mlugg/setup-zig@v2
|
- uses: mlugg/setup-zig@v2.0.5
|
||||||
with:
|
with:
|
||||||
version: ${{ inputs.zig }}
|
version: ${{ inputs.zig }}
|
||||||
|
|
||||||
@@ -58,37 +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: Cache libiconv
|
|
||||||
id: cache-libiconv
|
|
||||||
uses: actions/cache@v4
|
|
||||||
env:
|
|
||||||
cache-name: cache-libiconv
|
|
||||||
with:
|
|
||||||
path: ${{ inputs.cache-dir }}/libiconv
|
|
||||||
key: vendor/libiconv/libiconv-1.17
|
|
||||||
|
|
||||||
- name: download libiconv
|
|
||||||
if: ${{ steps.cache-libiconv.outputs.cache-hit != 'true' }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: make download-libiconv
|
run: zig build -Doptimize=ReleaseFast html5ever
|
||||||
|
|
||||||
- name: build libiconv
|
- name: hmtl5ever debug
|
||||||
|
if: ${{ inputs.mode == 'debug' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: make build-libiconv
|
run: zig build html5ever
|
||||||
|
|
||||||
- name: build mimalloc
|
|
||||||
shell: bash
|
|
||||||
run: make install-mimalloc
|
|
||||||
|
|
||||||
- name: build netsurf
|
|
||||||
shell: bash
|
|
||||||
run: make install-netsurf
|
|
||||||
|
|||||||
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -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 }})
|
||||||
|
|||||||
2
.github/workflows/e2e-test.yml
vendored
2
.github/workflows/e2e-test.yml
vendored
@@ -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 }})
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ ARG MINISIG=0.12
|
|||||||
ARG ZIG=0.15.2
|
ARG ZIG=0.15.2
|
||||||
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
|
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
|
||||||
ARG V8=14.0.365.4
|
ARG V8=14.0.365.4
|
||||||
ARG ZIG_V8=v0.1.33
|
ARG ZIG_V8=v0.1.35
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
RUN apt-get update -yq && \
|
RUN apt-get update -yq && \
|
||||||
@@ -40,9 +40,7 @@ WORKDIR /browser
|
|||||||
RUN git submodule init && \
|
RUN git submodule init && \
|
||||||
git submodule update --recursive
|
git submodule update --recursive
|
||||||
|
|
||||||
RUN make install-libiconv && \
|
RUN zig build -Doptimize=ReleaseFast html5ever
|
||||||
make install-netsurf && \
|
|
||||||
make install-mimalloc
|
|
||||||
|
|
||||||
# download and install v8
|
# download and install v8
|
||||||
RUN case $TARGETPLATFORM in \
|
RUN case $TARGETPLATFORM in \
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -140,13 +140,14 @@ You may still encounter errors or crashes. Please open an issue with specifics i
|
|||||||
|
|
||||||
Here are the key features we have implemented:
|
Here are the key features we have implemented:
|
||||||
|
|
||||||
- [x] HTTP loader (based on Libcurl)
|
- [x] HTTP loader ([Libcurl](https://curl.se/libcurl/))
|
||||||
- [x] HTML parser and DOM tree (based on Netsurf libs)
|
- [x] HTML parser ([html5ever](https://github.com/servo/html5ever))
|
||||||
- [x] Javascript support (v8)
|
- [x] DOM tree
|
||||||
|
- [x] Javascript support ([v8](https://v8.dev/))
|
||||||
- [x] DOM APIs
|
- [x] DOM APIs
|
||||||
- [x] Ajax
|
- [x] Ajax
|
||||||
- [x] XHR API
|
- [x] XHR API
|
||||||
- [x] Fetch API (polyfill)
|
- [x] Fetch API
|
||||||
- [x] DOM dump
|
- [x] DOM dump
|
||||||
- [x] CDP/websockets server
|
- [x] CDP/websockets server
|
||||||
- [x] Click
|
- [x] Click
|
||||||
@@ -214,37 +215,15 @@ To init or update the submodules in the `vendor/` directory:
|
|||||||
make install-submodule
|
make install-submodule
|
||||||
```
|
```
|
||||||
|
|
||||||
**iconv**
|
**html5ever**
|
||||||
|
|
||||||
libiconv is an internationalization library used by Netsurf.
|
[html5ver](https://github.com/servo/html5ever) is high-performance browser-grade HTML5 parser.
|
||||||
|
|
||||||
```
|
```
|
||||||
make install-libiconv
|
zig build html5ever
|
||||||
```
|
```
|
||||||
|
|
||||||
**Netsurf libs**
|
For a release build, use `zig build -Doptimize=ReleaseFast html5ever`.
|
||||||
|
|
||||||
Netsurf libs are used for HTML parsing and DOM tree generation.
|
|
||||||
|
|
||||||
```
|
|
||||||
make install-netsurf
|
|
||||||
```
|
|
||||||
|
|
||||||
For dev env, use `make install-netsurf-dev`.
|
|
||||||
|
|
||||||
**Mimalloc**
|
|
||||||
|
|
||||||
Mimalloc is used as a C memory allocator.
|
|
||||||
|
|
||||||
```
|
|
||||||
make install-mimalloc
|
|
||||||
```
|
|
||||||
|
|
||||||
For dev env, use `make install-mimalloc-dev`.
|
|
||||||
|
|
||||||
Note: when Mimalloc is built in dev mode, you can dump memory stats with the
|
|
||||||
env var `MIMALLOC_SHOW_STATS=1`. See
|
|
||||||
[https://microsoft.github.io/mimalloc/environment.html](https://microsoft.github.io/mimalloc/environment.html).
|
|
||||||
|
|
||||||
**v8**
|
**v8**
|
||||||
|
|
||||||
|
|||||||
@@ -493,7 +493,7 @@ pub const JsApis = flattenTypes(&.{
|
|||||||
@import("../webapi/collections.zig"),
|
@import("../webapi/collections.zig"),
|
||||||
@import("../webapi/Console.zig"),
|
@import("../webapi/Console.zig"),
|
||||||
@import("../webapi/Crypto.zig"),
|
@import("../webapi/Crypto.zig"),
|
||||||
@import("../webapi/CSS.zig"),
|
@import("../webapi/css.zig"),
|
||||||
@import("../webapi/css/CSSRule.zig"),
|
@import("../webapi/css/CSSRule.zig"),
|
||||||
@import("../webapi/css/CSSRuleList.zig"),
|
@import("../webapi/css/CSSRuleList.zig"),
|
||||||
@import("../webapi/css/CSSStyleDeclaration.zig"),
|
@import("../webapi/css/CSSStyleDeclaration.zig"),
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ pub const Attribute = @import("element/Attribute.zig");
|
|||||||
const CSSStyleProperties = @import("css/CSSStyleProperties.zig");
|
const CSSStyleProperties = @import("css/CSSStyleProperties.zig");
|
||||||
pub const DOMStringMap = @import("element/DOMStringMap.zig");
|
pub const DOMStringMap = @import("element/DOMStringMap.zig");
|
||||||
const DOMRect = @import("DOMRect.zig");
|
const DOMRect = @import("DOMRect.zig");
|
||||||
const CSS = @import("CSS.zig");
|
const CSS = @import("css.zig");
|
||||||
const ShadowRoot = @import("ShadowRoot.zig");
|
const ShadowRoot = @import("ShadowRoot.zig");
|
||||||
|
|
||||||
pub const Svg = @import("element/Svg.zig");
|
pub const Svg = @import("element/Svg.zig");
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ const Page = @import("../Page.zig");
|
|||||||
const Console = @import("Console.zig");
|
const Console = @import("Console.zig");
|
||||||
const History = @import("History.zig");
|
const History = @import("History.zig");
|
||||||
const Crypto = @import("Crypto.zig");
|
const Crypto = @import("Crypto.zig");
|
||||||
const CSS = @import("CSS.zig");
|
const CSS = @import("css.zig");
|
||||||
const Navigator = @import("Navigator.zig");
|
const Navigator = @import("Navigator.zig");
|
||||||
const Screen = @import("Screen.zig");
|
const Screen = @import("Screen.zig");
|
||||||
const Performance = @import("Performance.zig");
|
const Performance = @import("Performance.zig");
|
||||||
|
|||||||
Reference in New Issue
Block a user