build: add check step
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m20s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m20s
This commit is contained in:
19
build.zig
19
build.zig
@@ -65,6 +65,14 @@ pub fn build(b: *std.Build) void {
|
|||||||
});
|
});
|
||||||
exec_example.root_module.addImport("zterm", lib);
|
exec_example.root_module.addImport("zterm", lib);
|
||||||
|
|
||||||
|
const tui_example = b.addExecutable(.{
|
||||||
|
.name = "tui",
|
||||||
|
.root_source_file = b.path("examples/tui.zig"),
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
tui_example.root_module.addImport("zterm", lib);
|
||||||
|
|
||||||
// This declares intent for the executable to be installed into the
|
// This declares intent for the executable to be installed into the
|
||||||
// standard location when the user invokes the "install" step (the default
|
// standard location when the user invokes the "install" step (the default
|
||||||
// step when running `zig build`).
|
// step when running `zig build`).
|
||||||
@@ -72,6 +80,17 @@ pub fn build(b: *std.Build) void {
|
|||||||
b.installArtifact(container_example);
|
b.installArtifact(container_example);
|
||||||
b.installArtifact(padding_example);
|
b.installArtifact(padding_example);
|
||||||
b.installArtifact(exec_example);
|
b.installArtifact(exec_example);
|
||||||
|
b.installArtifact(tui_example);
|
||||||
|
|
||||||
|
const exe_check = b.addExecutable(.{
|
||||||
|
.name = "check",
|
||||||
|
.root_source_file = b.path("src/zterm.zig"),
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
|
||||||
|
const check = b.step("check", "Check if project compiles");
|
||||||
|
check.dependOn(&exe_check.step);
|
||||||
|
|
||||||
// Creates a step for unit testing. This only builds the test executable
|
// Creates a step for unit testing. This only builds the test executable
|
||||||
// but does not run it.
|
// but does not run it.
|
||||||
|
|||||||
Reference in New Issue
Block a user