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