From ff0b7ed6bf2e66783f243dcfcfaadc489a130e8d Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 29 Mar 2024 15:51:53 +0100 Subject: [PATCH 1/6] build: fix path error --- build.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index dfe6ee5b4..a06184740 100644 --- a/build.zig +++ b/build.zig @@ -157,7 +157,7 @@ fn linkNetSurf(step: *std.build.LibExeObjStep) void { step.addIncludePath(.{ .path = "vendor/libiconv/include" }); // netsurf libs - const ns = "vendor/netsurf/"; + const ns = "vendor/netsurf"; const libs: [4][]const u8 = .{ "libdom", "libhubbub", @@ -166,7 +166,7 @@ fn linkNetSurf(step: *std.build.LibExeObjStep) void { }; inline for (libs) |lib| { step.addObjectFile(.{ .path = ns ++ "/lib/" ++ lib ++ ".a" }); - step.addIncludePath(.{ .path = ns ++ lib ++ "/src" }); + step.addIncludePath(.{ .path = ns ++ "/" ++ lib ++ "/src" }); } step.addIncludePath(.{ .path = ns ++ "/include" }); } From b59618120f043b3964e5ab39574eea969d61a118 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 29 Mar 2024 09:19:21 +0100 Subject: [PATCH 2/6] build: remove shell installation --- build.zig | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.zig b/build.zig index a06184740..5fbda7321 100644 --- a/build.zig +++ b/build.zig @@ -65,8 +65,6 @@ pub fn build(b: *std.build.Builder) !void { }); try common(shell, options); try jsruntime_pkgs.add_shell(shell); - // do not install shell binary - b.installArtifact(shell); // run const shell_cmd = b.addRunArtifact(shell); From a2eee9a278b55f49b3d3e38d94a9b3308f4b1c06 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Thu, 28 Mar 2024 14:53:23 +0100 Subject: [PATCH 3/6] README: upgrade zig version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6dbd21793..a78620aec 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Prerequisites -Browsercore is written with [Zig](https://ziglang.org/) `0.11.0`. You have to +Browsercore is written with [Zig](https://ziglang.org/) `0.12`. You have to install it with the right version in order to build the project. Browsercore also depends on From 20f25fc352e664b734f6a896ef06a653c922b9b9 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Thu, 28 Mar 2024 14:39:01 +0100 Subject: [PATCH 4/6] build: remove useless getInstallStep deps the dependance of getInstallStep is useful only if we need a previous binary to exists before using running the step. --- build.zig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.zig b/build.zig index 5fbda7321..bb6e83769 100644 --- a/build.zig +++ b/build.zig @@ -44,7 +44,6 @@ pub fn build(b: *std.build.Builder) !void { // run const run_cmd = b.addRunArtifact(exe); - run_cmd.step.dependOn(b.getInstallStep()); if (b.args) |args| { run_cmd.addArgs(args); } @@ -68,7 +67,6 @@ pub fn build(b: *std.build.Builder) !void { // run const shell_cmd = b.addRunArtifact(shell); - shell_cmd.step.dependOn(b.getInstallStep()); if (b.args) |args| { shell_cmd.addArgs(args); } @@ -108,7 +106,6 @@ pub fn build(b: *std.build.Builder) !void { // run const wpt_cmd = b.addRunArtifact(wpt); - wpt_cmd.step.dependOn(b.getInstallStep()); if (b.args) |args| { wpt_cmd.addArgs(args); } @@ -131,7 +128,6 @@ pub fn build(b: *std.build.Builder) !void { // run const get_cmd = b.addRunArtifact(get); - get_cmd.step.dependOn(b.getInstallStep()); if (b.args) |args| { get_cmd.addArgs(args); } From 0af69fee6d12e63645c3ca1105ce8b45dfde0a98 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 3 Apr 2024 14:58:11 +0200 Subject: [PATCH 5/6] build: remove deprecated usage --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.zig b/build.zig index bb6e83769..19ca117ee 100644 --- a/build.zig +++ b/build.zig @@ -137,7 +137,7 @@ pub fn build(b: *std.build.Builder) !void { } fn common( - step: *std.Build.CompileStep, + step: *std.Build.Step.Compile, options: jsruntime.Options, ) !void { try jsruntime_pkgs.add(step, options); From 6e8398be969886bcd644a463fa462f3081c5e46c Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Wed, 3 Apr 2024 15:00:27 +0200 Subject: [PATCH 6/6] ci: track build.zig changes --- .github/workflows/wpt.yml | 2 ++ .github/workflows/zig-fmt.yml | 1 + .github/workflows/zig-test.yml | 2 ++ 3 files changed, 5 insertions(+) diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml index fb94441fd..33fb2c9e7 100644 --- a/.github/workflows/wpt.yml +++ b/.github/workflows/wpt.yml @@ -12,6 +12,7 @@ on: branches: - main paths: + - "build.zig" - "src/**/*.zig" - "src/*.zig" - "tests/wpt/**" @@ -26,6 +27,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] paths: + - "build.zig" - "src/**/*.zig" - "src/*.zig" - "tests/wpt/**" diff --git a/.github/workflows/zig-fmt.yml b/.github/workflows/zig-fmt.yml index 46c854bbd..c20b35fdf 100644 --- a/.github/workflows/zig-fmt.yml +++ b/.github/workflows/zig-fmt.yml @@ -11,6 +11,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] paths: + - "build.zig" - "src/**/*.zig" - "src/*.zig" # Allows you to run this workflow manually from the Actions tab diff --git a/.github/workflows/zig-test.yml b/.github/workflows/zig-test.yml index 474456e55..a23b9bc7a 100644 --- a/.github/workflows/zig-test.yml +++ b/.github/workflows/zig-test.yml @@ -8,6 +8,7 @@ on: branches: - main paths: + - "build.zig" - "src/**/*.zig" - "src/*.zig" - "vendor/jsruntime-lib" @@ -21,6 +22,7 @@ on: types: [opened, synchronize, reopened, ready_for_review] paths: + - "build.zig" - "src/**/*.zig" - "src/*.zig" - "vendor/**"