Skip to content

Commit 0531379

Browse files
committed
build: use custom step instead of install step
1 parent bd36012 commit 0531379

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

build.zig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ pub fn build(b: *std.Build) void {
1717

1818
node_api.addSystemIncludePath(node_api_headers.path("include"));
1919

20-
const install_step = b.getInstallStep();
21-
2220
// zig build (test modules)
21+
const build_mods_step = b.step("build_test_modules", "build native zig modules");
2322
{
2423
var dir = std.fs.cwd().openDir("tests/zig_modules", .{ .iterate = true }) catch unreachable;
2524
defer dir.close();
@@ -53,7 +52,7 @@ pub fn build(b: *std.Build) void {
5352
};
5453
std.log.info("sub path: {s}", .{sub_path});
5554

56-
install_step.dependOn(
55+
build_mods_step.dependOn(
5756
&b.addInstallArtifact(
5857
mod,
5958
.{
@@ -73,13 +72,13 @@ pub fn build(b: *std.Build) void {
7372
}
7473

7574
// `zig build test`
75+
const test_step = b.step("test", "test bindings");
7676
{
7777
const run_cmd = b.addSystemCommand(&.{"bun"});
7878
run_cmd.addArg("test");
7979
run_cmd.cwd = .{ .cwd_relative = "tests" };
80-
run_cmd.step.dependOn(install_step);
80+
run_cmd.step.dependOn(build_mods_step);
8181

82-
const test_step = b.step("test", "test bindings");
8382
test_step.dependOn(&run_cmd.step);
8483
}
8584
}

0 commit comments

Comments
 (0)