╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ build.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
104 105 const run_cmd = b.addRunArtifact(exe); 106 run_cmd.step.dependOn(b.getInstallStep()); 107 if (b.args) |args| { 108 run_cmd.addArgs(args); 109 } 110 111 const run_step = b.step("try", "Try the app"); 112 run_step.dependOn(&run_cmd.step); 113 } 114 115 // testnet 116 { 117 const unit_tests = b.addTest(.{ 118 .root_module = b.createModule(.{ 119 .root_source_file = b.path("src/testnet.zig"), 120 .target = target, 121 .optimize = optimize, 122 }), 123 }); 124 unit_tests.root_module.addImport("haxy", haxy); 125 126 const run_unit_tests = b.addRunArtifact(unit_tests); 127 run_unit_tests.has_side_effects = true; 128 const test_step = b.step("testnet", "Run network unit tests"); 129 test_step.dependOn(&install_main_exe.step); 130 test_step.dependOn(&run_unit_tests.step); 131 } 132 } 133