diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..19892e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.zig-cache diff --git a/build.zig b/build.zig new file mode 100644 index 0000000..f82aac0 --- /dev/null +++ b/build.zig @@ -0,0 +1,18 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const test_step = b.step("test", "Run unit tests"); + + const unit_tests = b.addTest(.{ + .root_module = b.createModule(.{ + .root_source_file = b.path("./main.zig"), + .target = target, + .optimize = optimize, + }), + }); + const run_unit_tests = b.addRunArtifact(unit_tests); + test_step.dependOn(&run_unit_tests.step); +} diff --git a/main.zig b/main.zig new file mode 100644 index 0000000..6223f15 --- /dev/null +++ b/main.zig @@ -0,0 +1,7 @@ +const std = @import("std"); + +pub fn main() !void {} + +test "main" { + _ = @import("./vec3/src/vec3.zig"); +}