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

This commit is contained in:
2024-11-19 22:01:08 +01:00
parent dda2199706
commit 06752299be

View File

@@ -50,6 +50,17 @@ 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);
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.