-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.zig
36 lines (29 loc) · 984 Bytes
/
build.zig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const root_source_file = b.path("src/Backoff.zig");
const version = std.SemanticVersion{ .major = 0, .minor = 1, .patch = 0 };
// Module
_ = b.addModule("Backoff", .{ .root_source_file = root_source_file });
// Test suite
const tests_step = b.step("test", "Run test suite");
const tests = b.addTest(.{
.target = target,
.version = version,
.root_source_file = root_source_file,
});
const tests_run = b.addRunArtifact(tests);
tests_step.dependOn(&tests_run.step);
b.default_step.dependOn(tests_step);
// Formatting checks
const fmt_step = b.step("fmt", "Run formatting checks");
const fmt = b.addFmt(.{
.paths = &.{
"src/",
"build.zig",
},
.check = true,
});
fmt_step.dependOn(&fmt.step);
b.default_step.dependOn(fmt_step);
}