| ... | ... | @@ -2,12 +2,18 @@ const std = @import("std"); |
| 2 | 2 | const deps = @import("./deps.zig"); |
| 3 | 3 | |
| 4 | 4 | pub fn build(b: *std.Build) void { |
| 5 | const target = b.standardTargetOptions(.{}); |
| 6 | const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug; |
| 7 | |
| 5 | 8 | const t = b.addTest(.{ |
| 6 | | .root_source_file = .{ .path = "main.zig" }, |
| 9 | .root_source_file = b.path("main.zig"), |
| 10 | .target = target, |
| 11 | .optimize = mode, |
| 7 | 12 | }); |
| 8 | 13 | deps.addAllTo(t); |
| 9 | 14 | |
| 10 | 15 | const run_t = b.addRunArtifact(t); |
| 16 | run_t.has_side_effects = true; |
| 11 | 17 | |
| 12 | 18 | const t_step = b.step("test", "Run all the tests."); |
| 13 | 19 | t_step.dependOn(&run_t.step); |