From fbe8086c9845927f271aae4f2f1a5f9c3cbee760 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 28 Mar 2025 13:33:05 +0100 Subject: [PATCH 1/4] ci: add a browser fetch test --- .github/workflows/zig-test.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/zig-test.yml b/.github/workflows/zig-test.yml index 7f89dbe7..c462eb0c 100644 --- a/.github/workflows/zig-test.yml +++ b/.github/workflows/zig-test.yml @@ -66,6 +66,25 @@ jobs: zig-out/bin/lightpanda retention-days: 1 + browser-fetch: + name: browser fetch + needs: zig-build-dev + + # Don't run the CI with draft PR. + if: github.event.pull_request.draft == false + + runs-on: ubuntu-latest + + steps: + - name: download artifact + uses: actions/download-artifact@v4 + with: + name: lightpanda-build-dev + + - run: chmod a+x ./lightpanda + + - run: ./lightpanda fetch https://httpbin.io/xhr/get + zig-test: name: zig test From cf015b2ce7cc1e22b3d58c6fda7cab7bfc875441 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 28 Mar 2025 15:44:21 +0100 Subject: [PATCH 2/4] main: exit 1 on memory leak detection --- src/main.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.zig b/src/main.zig index 6e7a6526..a1dd2a67 100644 --- a/src/main.zig +++ b/src/main.zig @@ -52,7 +52,7 @@ pub fn main() !void { const alloc = if (builtin.mode == .Debug) gpa.allocator() else std.heap.c_allocator; defer if (builtin.mode == .Debug) { - _ = gpa.detectLeaks(); + if (gpa.detectLeaks()) std.posix.exit(1); }; var args_arena = std.heap.ArenaAllocator.init(alloc); From c6ad734de0af9850d259f21140a92975df305466 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 28 Mar 2025 13:45:28 +0100 Subject: [PATCH 3/4] ci: run wpt classic only on PR --- .github/workflows/wpt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wpt.yml b/.github/workflows/wpt.yml index 3fe78fc4..a3416928 100644 --- a/.github/workflows/wpt.yml +++ b/.github/workflows/wpt.yml @@ -41,8 +41,8 @@ jobs: wpt: name: web platform tests - # Don't run the CI with draft PR. - if: github.event.pull_request.draft == false + # Only for PR without draft. + if: github.event_name == 'pull_request' && github.event.pull_request.draft == false runs-on: ubuntu-latest From f6f83e2114d7c24974fd4726d573c797b7f2a7c2 Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Mon, 31 Mar 2025 12:36:04 +0200 Subject: [PATCH 4/4] upgrade zig-jsruntime --- vendor/zig-js-runtime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/zig-js-runtime b/vendor/zig-js-runtime index ecc49dc1..64b9b2b0 160000 --- a/vendor/zig-js-runtime +++ b/vendor/zig-js-runtime @@ -1 +1 @@ -Subproject commit ecc49dc13a74c046904e1eef8823226c1159cc71 +Subproject commit 64b9b2b0c9e7a46a71bd5c1baff513a6916e7363