From 5d79f3a90865ac83e84cf2daa1fa76ae6270bd36 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 29 Jun 2024 19:53:31 +0800 Subject: [PATCH 1/2] chore: update to 0.13 --- .github/workflows/integrations.yml | 2 +- .gitignore | 1 + build.zig | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integrations.yml b/.github/workflows/integrations.yml index 321cc28..8431cbb 100644 --- a/.github/workflows/integrations.yml +++ b/.github/workflows/integrations.yml @@ -20,7 +20,7 @@ jobs: - name: install zig run: | - ZIG_VERSION=0.12.0 + ZIG_VERSION=0.13.0 wget https://ziglang.org/builds/zig-linux-x86_64-$ZIG_VERSION.tar.xz tar xf zig-linux-x86_64-$ZIG_VERSION.tar.xz mv zig-linux-x86_64-$ZIG_VERSION $HOME/zig-build diff --git a/.gitignore b/.gitignore index e73c965..8be35bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ zig-cache/ +.zig-cache/ zig-out/ diff --git a/build.zig b/build.zig index 1f28be1..4625414 100644 --- a/build.zig +++ b/build.zig @@ -2,7 +2,7 @@ const std = @import("std"); pub fn build(b: *std.Build) void { const myzql = b.addModule("myzql", .{ - .root_source_file = .{ .path = "./src/myzql.zig" }, + .root_source_file = b.path("./src/myzql.zig"), }); // -Dtest-filter="..." @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { // zig build unit_test const unit_tests = b.addTest(.{ - .root_source_file = .{ .path = "./src/myzql.zig" }, + .root_source_file = b.path("./src/myzql.zig"), }); if (test_filter) |t| unit_tests.filters = t; @@ -24,7 +24,7 @@ pub fn build(b: *std.Build) void { // zig build -Dtest-filter="..." integration_test const integration_tests = b.addTest(.{ - .root_source_file = .{ .path = "./integration_tests/main.zig" }, + .root_source_file = b.path("./integration_tests/main.zig"), }); integration_tests.root_module.addImport("myzql", myzql); if (test_filter) |t| integration_tests.filters = t; From 47c9d47fd3a59c78b737a9035f8ec262095e9ff4 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sat, 29 Jun 2024 19:55:21 +0800 Subject: [PATCH 2/2] fix: integration test --- .github/workflows/unit_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index dfbbbfa..28fdb8c 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - name: install zig run: | - ZIG_VERSION=0.12.0-dev.3291+17bad9f88 + ZIG_VERSION=0.13 wget https://ziglang.org/builds/zig-linux-x86_64-$ZIG_VERSION.tar.xz tar xf zig-linux-x86_64-$ZIG_VERSION.tar.xz mv zig-linux-x86_64-$ZIG_VERSION $HOME/zig-build