build: check step
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
This commit is contained in:
12
build.zig
12
build.zig
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user