build: check step
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s

This commit is contained in:
2024-11-19 22:03:35 +01:00
parent 4f3fa1e1b0
commit 31ff39f5cd

View File

@@ -40,6 +40,18 @@ pub fn build(b: *std.Build) void {
// step when running `zig build`).
b.installArtifact(exe);
const exe_check = b.addExecutable(.{
.name = "check",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_check.root_module.addImport("zlog", zlog.module("zlog"));
exe_check.root_module.addImport("zterm", zterm.module("zterm"));
const check = b.step("check", "Check if project compiles");
check.dependOn(&exe_check.step);
// This *creates* a Run step in the build graph, to be executed when another
// step is evaluated that depends on it. The next line below will establish
// such a dependency.