Initial import
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
const exe = b.addExecutable(.{ .name = "facts", .root_module = b.createModule(.{ .root_source_file = b.path("facts.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 facts").dependOn(&run_cmd.step);
|
||||
const smoke = b.addSystemCommand(&.{ "sh", "smoke.sh", "zig-out/bin/facts" });
|
||||
smoke.setCwd(b.path("."));
|
||||
smoke.step.dependOn(b.getInstallStep());
|
||||
b.step("test", "Run smoke test").dependOn(&smoke.step);
|
||||
}
|
||||
Reference in New Issue
Block a user