this repo has no description
at main 32 lines 1.0 kB view raw
1const std = @import("std"); 2 3pub fn build(b: *std.Build) void { 4 const target = b.standardTargetOptions(.{}); 5 const optimize = b.standardOptimizeOption(.{}); 6 7 const mod = b.addModule("k256", .{ 8 .root_source_file = b.path("src/root.zig"), 9 .target = target, 10 .optimize = optimize, 11 }); 12 13 // library tests (src/) 14 const lib_tests = b.addTest(.{ .root_module = mod }); 15 const run_lib_tests = b.addRunArtifact(lib_tests); 16 17 // integration tests (tests/) 18 const int_mod = b.addModule("verify_test", .{ 19 .root_source_file = b.path("tests/verify_test.zig"), 20 .target = target, 21 .optimize = optimize, 22 .imports = &.{ 23 .{ .name = "k256", .module = mod }, 24 }, 25 }); 26 const int_tests = b.addTest(.{ .root_module = int_mod }); 27 const run_int_tests = b.addRunArtifact(int_tests); 28 29 const test_step = b.step("test", "run all tests"); 30 test_step.dependOn(&run_lib_tests.step); 31 test_step.dependOn(&run_int_tests.step); 32}