Skip to content

Commit

Permalink
Merge pull request #11 from speed2exe/zig-0.13
Browse files Browse the repository at this point in the history
chore: update to 0.13
  • Loading branch information
speed2exe authored Jun 29, 2024
2 parents bf04b03 + 47c9d47 commit 2bbbbaf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
zig-cache/
.zig-cache/
zig-out/
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ 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="..."
const test_filter = b.option([]const []const u8, "test-filter", "Filter for tests to run");

// 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;

Expand All @@ -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;
Expand Down

0 comments on commit 2bbbbaf

Please sign in to comment.