all: build: install tests exe
This commit is contained in:
parent
a6a678b912
commit
b500b04c41
8 changed files with 70 additions and 60 deletions
22
build.zig
22
build.zig
|
|
@ -18,25 +18,27 @@ pub fn build(b: *std.build.Builder) void {
|
|||
};
|
||||
const options = Options{ .gpu_dawn_options = gpu_dawn_options };
|
||||
|
||||
const main_tests = b.addTest("src/main.zig");
|
||||
const main_tests = b.addTestExe("mach-tests", "src/main.zig");
|
||||
main_tests.setBuildMode(mode);
|
||||
main_tests.setTarget(target);
|
||||
main_tests.addPackage(pkg);
|
||||
main_tests.addPackage(gpu.pkg);
|
||||
main_tests.addPackage(glfw.pkg);
|
||||
main_tests.install();
|
||||
|
||||
const test_step = b.step("test", "Run library tests");
|
||||
test_step.dependOn(&main_tests.step);
|
||||
test_step.dependOn(&main_tests.run().step);
|
||||
test_step.dependOn(&gpu.testStep(b, mode, target, @bitCast(gpu.Options, options)).step);
|
||||
test_step.dependOn(&gpu_dawn.testStep(b, mode, target).step);
|
||||
test_step.dependOn(&glfw.testStep(b, mode, target).step);
|
||||
test_step.dependOn(&ecs.testStep(b, mode, target).step);
|
||||
test_step.dependOn(&freetype.testStep(b, mode, target).step);
|
||||
test_step.dependOn(&sysaudio.testStep(b, mode, target, .{}).step);
|
||||
// TODO: we need a way to test wasm stuff
|
||||
// test_mach_step.dependOn(&sysjs.testStep(b, mode, target).step);
|
||||
|
||||
const test_mach_step = b.step("test-mach", "Run Mach Core library tests");
|
||||
test_mach_step.dependOn(&main_tests.step);
|
||||
test_mach_step.dependOn(&gpu.testStep(b, mode, @bitCast(gpu.Options, options)).step);
|
||||
test_mach_step.dependOn(&gpu_dawn.testStep(b, mode).step);
|
||||
test_mach_step.dependOn(&glfw.testStep(b, mode).step);
|
||||
test_mach_step.dependOn(&ecs.testStep(b, mode).step);
|
||||
test_mach_step.dependOn(&freetype.testStep(b, mode).step);
|
||||
test_mach_step.dependOn(&sysaudio.testStep(b, mode, .{}).step);
|
||||
test_mach_step.dependOn(&sysjs.testStep(b, mode).step);
|
||||
test_mach_step.dependOn(&main_tests.run().step);
|
||||
|
||||
// TODO(build-system): https://github.com/hexops/mach/issues/229#issuecomment-1100958939
|
||||
ensureGit(b.allocator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue