all: build: install tests exe
This commit is contained in:
parent
a6a678b912
commit
b500b04c41
8 changed files with 70 additions and 60 deletions
|
|
@ -2,14 +2,17 @@ const std = @import("std");
|
|||
|
||||
pub fn build(b: *std.build.Builder) void {
|
||||
const mode = b.standardReleaseOptions();
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const test_step = b.step("test", "Run library tests");
|
||||
test_step.dependOn(&testStep(b, mode).step);
|
||||
test_step.dependOn(&testStep(b, mode, target).step);
|
||||
}
|
||||
|
||||
pub fn testStep(b: *std.build.Builder, mode: std.builtin.Mode) *std.build.LibExeObjStep {
|
||||
const main_tests = b.addTest(thisDir() ++ "/src/main.zig");
|
||||
pub fn testStep(b: *std.build.Builder, mode: std.builtin.Mode, target: std.zig.CrossTarget) *std.build.RunStep {
|
||||
const main_tests = b.addTestExe("ecs-tests", thisDir() ++ "/src/main.zig");
|
||||
main_tests.setBuildMode(mode);
|
||||
return main_tests;
|
||||
main_tests.setTarget(target);
|
||||
main_tests.install();
|
||||
return main_tests.run();
|
||||
}
|
||||
|
||||
pub const pkg = std.build.Pkg{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue