Skip to content

Commit

Permalink
chore(build.zig): Update for zig v0.13.0
Browse files Browse the repository at this point in the history
Signed-off-by: prajwalch <[email protected]>
  • Loading branch information
prajwalch committed Jul 9, 2024
1 parent 1dc047b commit e91b2c0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

const main_tests = b.addTest(.{ .root_source_file = b.path("src/test.zig") });
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&main_tests.step);
const unit_tests = b.addTest(.{
.root_source_file = b.path("src/test.zig"),
.target = target,
.optimize = optimize,
});
const run_unit_tests = b.addRunArtifact(unit_tests);
test_step.dependOn(&run_unit_tests.step);

const docs_test = b.addTest(.{ .root_source_file = b.path("src/lib.zig") });
const install_docs = b.addInstallDirectory(.{
Expand All @@ -30,6 +35,7 @@ pub fn build(b: *std.Build) void {
});
const install_example = b.addInstallArtifact(example, .{});
example.root_module.addImport("yazap", yazap_mod);
examples_step.dependOn(&example.step);
examples_step.dependOn(&install_example.step);
}
}

0 comments on commit e91b2c0

Please sign in to comment.