This repository has been archived on 2026-07-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
lines/build.zig
T
2026-07-04 20:44:28 +02:00

36 lines
1.2 KiB
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "lines",
.root_module = b.createModule(.{
.root_source_file = b.path("lines.zig"),
.target = target,
.optimize = optimize,
}),
});
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| run_cmd.addArgs(args);
b.step("run", "Run lines").dependOn(&run_cmd.step);
// req: verification/001
const smoke = b.addSystemCommand(&.{ "sh", "smoke.sh", "zig-out/bin/lines" });
smoke.setCwd(b.path("."));
smoke.step.dependOn(b.getInstallStep());
b.step("test", "Run POSIX smoke test").dependOn(&smoke.step);
// req: performance/002
// req: performance/003
// req: verification/003
const perf = b.addSystemCommand(&.{ "sh", "perf.sh", "zig-out/bin/lines" });
perf.setCwd(b.path("."));
perf.step.dependOn(b.getInstallStep());
b.step("perf", "Run large-file elapsed-time and RSS proof").dependOn(&perf.step);
}