mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 17:46:32 -04:00
Merge branch 'main' into agent
This commit is contained in:
4
.github/actions/install/action.yml
vendored
4
.github/actions/install/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: "Browsercore install"
|
||||
description: "Install deps for the project browsercore"
|
||||
name: "Deps install"
|
||||
description: "Install deps for the browser"
|
||||
|
||||
inputs:
|
||||
arch:
|
||||
|
||||
42
.github/actions/v8-snapshot/action.yml
vendored
Normal file
42
.github/actions/v8-snapshot/action.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: "V8 snaphsot"
|
||||
description: "Generate v8 snapshot"
|
||||
|
||||
inputs:
|
||||
arch:
|
||||
description: 'CPU arch used to select the v8 lib'
|
||||
required: false
|
||||
default: 'x86_64'
|
||||
os:
|
||||
description: 'OS used to select the v8 lib'
|
||||
required: false
|
||||
default: 'linux'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
|
||||
steps:
|
||||
# Use the commit hash of bridge.zig and Snapshot.zig as cache key for
|
||||
# snapshot.
|
||||
- name: V8 snapshot cache key
|
||||
id: snapshot_cache_key
|
||||
run: echo "hash=v8-snapshot-${{ inputs.os }}_${{ inputs.arch }}-$(git log -n 1 --pretty=format:%H --
|
||||
src/browser/js/bridge.zig
|
||||
src/browser/js/Snapshot.zig
|
||||
)" >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
|
||||
# Fetch the cache for snapshot
|
||||
- name: Cache V8 snapshot
|
||||
id: cache-v8-snapshot
|
||||
uses: actions/cache@v5
|
||||
env:
|
||||
cache-name: cache-v8-snapshot
|
||||
with:
|
||||
path: src/snapshot.bin
|
||||
key: ${{ steps.snapshot_cache_key.outputs.hash }}
|
||||
|
||||
# Generate snapshot on cache miss.
|
||||
- name: v8 snapshot
|
||||
shell: bash
|
||||
if: hashFiles('src/snapshot.bin') == ''
|
||||
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin
|
||||
6
.github/workflows/e2e-test.yml
vendored
6
.github/workflows/e2e-test.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
name: zig build release
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 20
|
||||
|
||||
# Don't run the CI with draft PR.
|
||||
if: github.event.pull_request.draft == false
|
||||
@@ -50,9 +50,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: ./.github/actions/install
|
||||
|
||||
- name: v8 snapshot
|
||||
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin
|
||||
- uses: ./.github/actions/v8-snapshot
|
||||
|
||||
- name: zig build release
|
||||
run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast -Dcpu=x86_64
|
||||
|
||||
21
.github/workflows/wpt.yml
vendored
21
.github/workflows/wpt.yml
vendored
@@ -36,8 +36,10 @@ jobs:
|
||||
os: ${{env.OS}}
|
||||
arch: ${{env.ARCH}}
|
||||
|
||||
- name: v8 snapshot
|
||||
run: zig build -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast snapshot_creator -- src/snapshot.bin
|
||||
- uses: ./.github/actions/v8-snapshot
|
||||
with:
|
||||
os: ${{env.OS}}
|
||||
arch: ${{env.ARCH}}
|
||||
|
||||
- name: zig build release
|
||||
run: zig build -Dsnapshot_path=../../snapshot.bin -Dprebuilt_v8_path=v8/libc_v8.a -Doptimize=ReleaseFast -Dcpu=generic
|
||||
@@ -170,6 +172,21 @@ jobs:
|
||||
cd ./wptdiff
|
||||
CGO_ENABLED=0 go build
|
||||
|
||||
- run: |
|
||||
./wptdiff/wptdiff --completion |tee completion.log
|
||||
|
||||
- name: Send completion to slack
|
||||
uses: slackapi/slack-github-action@v3.0.1
|
||||
with:
|
||||
errors: true
|
||||
method: files.uploadV2
|
||||
token: ${{ secrets.CI_SLACK_BOT_TOKEN }}
|
||||
payload: |
|
||||
channel_id: ${{ vars.WPT_SLACK_CHANNEL_ID }}
|
||||
initial_comment: "Last WPT completion"
|
||||
file: "./completion.log"
|
||||
filename: "wpt-completion-${{ github.sha }}.txt"
|
||||
|
||||
- run: |
|
||||
./wptdiff/wptdiff |tee diff.log
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ pub fn create() !Snapshot {
|
||||
|
||||
var data_start: usize = 0;
|
||||
const isolate = v8.v8__SnapshotCreator__getIsolate(snapshot_creator).?;
|
||||
defer v8.v8__Isolate__LowMemoryNotification(isolate);
|
||||
|
||||
{
|
||||
// CreateBlob, which we'll call once everything is setup, MUST NOT
|
||||
|
||||
@@ -458,6 +458,9 @@ pub const Connection = struct {
|
||||
// try libcurl.curl_easy_setopt(easy, .debug_function, debugCallback);
|
||||
}
|
||||
|
||||
// default write callback to prevent libcurl from writing to stdout
|
||||
try self.setWriteCallback(discardBody);
|
||||
|
||||
// IP filter: block private/internal network addresses
|
||||
if (ip_filter) |filter| {
|
||||
try libcurl.curl_easy_setopt(self._easy, .opensocket_function, opensocketCallback);
|
||||
|
||||
Reference in New Issue
Block a user