quicker zig build test
This commit is contained in:
@@ -18,12 +18,12 @@ This is written with help from LLM:
|
||||
|
||||
Quick test:
|
||||
|
||||
zig build test
|
||||
zig build fmt test
|
||||
|
||||
Full test with all supported compilers and valgrind (run before commit,
|
||||
takes a while):
|
||||
Full test and static analysis with all supported compilers and valgrind (run
|
||||
before commit, takes a while):
|
||||
|
||||
zig build fmt && zig build -Dvalgrind
|
||||
zig build -Dvalgrind
|
||||
|
||||
# Debugging tips
|
||||
|
||||
|
||||
11
build.zig
11
build.zig
@@ -116,19 +116,18 @@ pub fn build(b: *std.Build) !void {
|
||||
lint_step.dependOn(&cppcheck.step);
|
||||
}
|
||||
|
||||
const all_step = b.step("all", "Run fmt check, lint, and tests with all compilers");
|
||||
all_step.dependOn(lint_step);
|
||||
|
||||
const fmt_check = b.addSystemCommand(&.{ "clang-format", "--dry-run", "-Werror" });
|
||||
for (all_c_files ++ headers) |f| fmt_check.addFileArg(b.path(f));
|
||||
fmt_check.expectExitCode(0);
|
||||
all_step.dependOn(&fmt_check.step);
|
||||
b.default_step.dependOn(&fmt_check.step);
|
||||
|
||||
for (compilers) |compiler| {
|
||||
addTestStep(b, all_step, target, optimize, compiler, false, valgrind, test_timeout);
|
||||
addTestStep(b, b.default_step, target, optimize, compiler, false, valgrind, test_timeout);
|
||||
}
|
||||
|
||||
b.default_step = all_step;
|
||||
const all_step = b.step("all", "Run fmt check, lint, and tests with all compilers");
|
||||
all_step.dependOn(b.default_step);
|
||||
all_step.dependOn(lint_step);
|
||||
}
|
||||
|
||||
fn addTestStep(
|
||||
|
||||
Reference in New Issue
Block a user