Skip to content

Commit 18f9d9f

Browse files
committed
work on fixing github workflows
1 parent 7fb9270 commit 18f9d9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+157
-236
lines changed

.github/actions/install/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ runs:
5959
- name: install v8
6060
shell: bash
6161
run: |
62-
mkdir -p vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug
63-
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug/libc_v8.a
62+
mkdir -p v8/build/aarch64-macos/debug/ninja/obj/zig/
63+
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/build/${{inputs.arch}}-${{inputs.os}}/debug/ninja/obj/zig/libc_v8.a
6464
65-
mkdir -p vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/release
66-
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/release/libc_v8.a
65+
mkdir -p v8/build/aarch64-macos/release/ninja/obj/zig/
66+
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/build/${{inputs.arch}}-${{inputs.os}}/release/ninja/obj/zig/libc_v8.a
6767
6868
- name: libiconv
6969
shell: bash

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
arch: ${{env.ARCH}}
3232

3333
- name: zig build
34-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dengine=v8 -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
34+
run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
3535

3636
- name: Rename binary
3737
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -63,7 +63,7 @@ jobs:
6363
arch: ${{env.ARCH}}
6464

6565
- name: zig build
66-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dengine=v8 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
66+
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
6767

6868
- name: Rename binary
6969
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -95,7 +95,7 @@ jobs:
9595
arch: ${{env.ARCH}}
9696

9797
- name: zig build
98-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dengine=v8 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
98+
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
9999

100100
- name: Rename binary
101101
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -127,7 +127,7 @@ jobs:
127127
arch: ${{env.ARCH}}
128128

129129
- name: zig build
130-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dengine=v8 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
130+
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
131131

132132
- name: Rename binary
133133
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}

.github/workflows/e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- uses: ./.github/actions/install
4848

4949
- name: zig build release
50-
run: zig build -Doptimize=ReleaseSafe -Dengine=v8
50+
run: zig build -Doptimize=ReleaseSafe
5151

5252
- name: upload artifact
5353
uses: actions/upload-artifact@v4
@@ -86,7 +86,7 @@ jobs:
8686
- name: run puppeteer
8787
run: |
8888
python3 -m http.server 1234 -d ./public & echo $! > PYTHON.pid
89-
./lightpanda serve & echo $! > LPD.pid
89+
./lightpanda serve --gc_hints & echo $! > LPD.pid
9090
RUNS=100 npm run bench-puppeteer-cdp > puppeteer.out || exit 1
9191
cat /proc/`cat LPD.pid`/status |grep VmHWM|grep -oP '\d+' > LPD.VmHWM
9292
kill `cat LPD.pid` `cat PYTHON.pid`

.github/workflows/wpt.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- uses: ./.github/actions/install
5757

58-
- run: zig build wpt -Dengine=v8 -- --safe --summary
58+
- run: zig build wpt -- --safe --summary
5959

6060
# For now WPT tests doesn't pass at all.
6161
# We accept then to continue the job on failure.
@@ -80,7 +80,7 @@ jobs:
8080
- uses: ./.github/actions/install
8181

8282
- name: json output
83-
run: zig build wpt -Dengine=v8 -- --safe --json > wpt.json
83+
run: zig build wpt -- --safe --json > wpt.json
8484

8585
- name: write commit
8686
run: |

.github/workflows/zig-test.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- uses: ./.github/actions/install
5757

5858
- name: zig build debug
59-
run: zig build -Dengine=v8
59+
run: zig build
6060

6161
- name: upload artifact
6262
uses: actions/upload-artifact@v4
@@ -102,11 +102,8 @@ jobs:
102102

103103
- uses: ./.github/actions/install
104104

105-
- name: zig build unittest
106-
run: zig build unittest -freference-trace --summary all
107-
108105
- name: zig build test
109-
run: zig build test -Dengine=v8 -- --json > bench.json
106+
run: zig build test -- --json > bench.json
110107

111108
- name: write commit
112109
run: |

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
ZIG := zig
55
BC := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
6-
# option test filter make unittest F="server"
6+
# option test filter make test F="server"
77
F=
88

99
# OS and ARCH
@@ -47,7 +47,7 @@ help:
4747

4848
# $(ZIG) commands
4949
# ------------
50-
.PHONY: build build-dev run run-release shell test bench download-zig wpt unittest data
50+
.PHONY: build build-dev run run-release shell test bench download-zig wpt data
5151

5252
zig_version = $(shell grep 'recommended_zig_version = "' "vendor/zig-js-runtime/build.zig" | cut -d'"' -f2)
5353

@@ -62,13 +62,13 @@ download-zig:
6262
## Build in release-safe mode
6363
build:
6464
@printf "\e[36mBuilding (release safe)...\e[0m\n"
65-
$(ZIG) build -Doptimize=ReleaseSafe -Dengine=v8 -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
65+
$(ZIG) build -Doptimize=ReleaseSafe -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
6666
@printf "\e[33mBuild OK\e[0m\n"
6767

6868
## Build in debug mode
6969
build-dev:
7070
@printf "\e[36mBuilding (debug)...\e[0m\n"
71-
@$(ZIG) build -Dengine=v8 -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
71+
@$(ZIG) build -Dgit_commit=$$(git rev-parse --short HEAD) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
7272
@printf "\e[33mBuild OK\e[0m\n"
7373

7474
## Run the server in debug mode
@@ -79,16 +79,16 @@ run: build
7979
## Run a JS shell in debug mode
8080
shell:
8181
@printf "\e[36mBuilding shell...\e[0m\n"
82-
@$(ZIG) build shell -Dengine=v8 || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
82+
@$(ZIG) build shell || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
8383

8484
## Run WPT tests
8585
wpt:
8686
@printf "\e[36mBuilding wpt...\e[0m\n"
87-
@$(ZIG) build wpt -Dengine=v8 -- --safe $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
87+
@$(ZIG) build wpt -- --safe $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
8888

8989
wpt-summary:
9090
@printf "\e[36mBuilding wpt...\e[0m\n"
91-
@$(ZIG) build wpt -Dengine=v8 -- --safe --summary $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
91+
@$(ZIG) build wpt -- --safe --summary $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
9292

9393
## Test
9494
test:

build.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn build(b: *std.Build) !void {
7676
{
7777
// get v8
7878
// -------
79-
const v8 = b.dependency("v8", .{.target = target, .optimize = optimize});
79+
const v8 = b.dependency("v8", .{ .target = target, .optimize = optimize });
8080
const get_v8 = b.addRunArtifact(v8.artifact("get-v8"));
8181
const get_step = b.step("get-v8", "Get v8");
8282
get_step.dependOn(&get_v8.step);
@@ -85,7 +85,7 @@ pub fn build(b: *std.Build) !void {
8585
{
8686
// build v8
8787
// -------
88-
const v8 = b.dependency("v8", .{.target = target, .optimize = optimize});
88+
const v8 = b.dependency("v8", .{ .target = target, .optimize = optimize });
8989
const build_v8 = b.addRunArtifact(v8.artifact("build-v8"));
9090
const build_step = b.step("build-v8", "Build v8");
9191
build_step.dependOn(&build_v8.step);

src/browser/dom/attribute.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub const Attr = struct {
6767

6868
const testing = @import("../../testing.zig");
6969
test "Browser.DOM.Attribute" {
70-
var runner = try testing.jsRunner(.{});
70+
var runner = try testing.jsRunner(testing.allocator, .{});
7171
defer runner.deinit();
7272

7373
try runner.testCases(&.{

src/browser/dom/character_data.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ pub const CharacterData = struct {
103103

104104
const testing = @import("../../testing.zig");
105105
test "Browser.DOM.CharacterData" {
106-
var runner = try testing.jsRunner(.{});
106+
var runner = try testing.jsRunner(testing.allocator, .{});
107107
defer runner.deinit();
108108

109109
try runner.testCases(&.{

src/browser/dom/comment.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub const Comment = struct {
4141

4242
const testing = @import("../../testing.zig");
4343
test "Browser.DOM.Comment" {
44-
var runner = try testing.jsRunner(.{});
44+
var runner = try testing.jsRunner(testing.allocator, .{});
4545
defer runner.deinit();
4646

4747
try runner.testCases(&.{

0 commit comments

Comments
 (0)