Add test step
This commit is contained in:
parent
1aab1159da
commit
625827ac4c
1 changed files with 17 additions and 0 deletions
17
build.zig
17
build.zig
|
|
@ -194,6 +194,23 @@ pub fn build(b: *std.Build) !void {
|
||||||
const raylib = rl.getModuleInternal(b);
|
const raylib = rl.getModuleInternal(b);
|
||||||
const raylib_math = rl.math.getModuleInternal(b);
|
const raylib_math = rl.math.getModuleInternal(b);
|
||||||
|
|
||||||
|
const raylib_test = b.addTest(.{
|
||||||
|
.root_source_file = .{ .path = "lib/raylib-zig.zig" },
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
|
||||||
|
const raylib_math_test = b.addTest(.{
|
||||||
|
.root_source_file = .{ .path = "lib/raylib-zig-math.zig" },
|
||||||
|
.target = target,
|
||||||
|
.optimize = optimize,
|
||||||
|
});
|
||||||
|
raylib_math_test.addModule("raylib-zig", raylib);
|
||||||
|
|
||||||
|
const test_step = b.step("test", "Check for library compilation errors");
|
||||||
|
test_step.dependOn(&raylib_test.step);
|
||||||
|
test_step.dependOn(&raylib_math_test.step);
|
||||||
|
|
||||||
for (examples) |ex| {
|
for (examples) |ex| {
|
||||||
if (target.getOsTag() == .emscripten) {
|
if (target.getOsTag() == .emscripten) {
|
||||||
const exe_lib = emcc.compileForEmscripten(b, ex.name, ex.path, target, optimize);
|
const exe_lib = emcc.compileForEmscripten(b, ex.name, ex.path, target, optimize);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue