diff options
| author | Alexander Rolley <arolley35@gmail.com> | 2026-05-21 15:33:16 +0200 |
|---|---|---|
| committer | Alexander Rolley <arolley35@gmail.com> | 2026-05-21 15:33:16 +0200 |
| commit | 4bca1e746c0eb32bd67fcf1977362cdb83311362 (patch) | |
| tree | feee98d329e555a316d672db5ddfd3a06fa54f86 | |
| parent | a9b6b2495de6c97fd17b37885dd99d8557a9ea0e (diff) | |
| parent | ab49ab9f5cc751d185b2049896913842bd33bf7b (diff) | |
Merge branch 'dev' of https://git.nathanreiner.xyz/memora into develop
| -rw-r--r-- | build.zig | 20 | ||||
| -rw-r--r-- | src/root.zig | 6 |
2 files changed, 24 insertions, 2 deletions
@@ -43,7 +43,7 @@ pub fn build(b: *std.Build) void { .{ .name = "api", .module = api_mod }, .{ .name = "frontend", .module = frontend_mod }, .{ .name = "http", .module = http_mod }, - }, + } }), }); @@ -51,9 +51,9 @@ pub fn build(b: *std.Build) void { const run_step = b.step("run", "Run the app"); + const run_cmd = b.addRunArtifact(exe); run_step.dependOn(&run_cmd.step); - run_cmd.step.dependOn(b.getInstallStep()); if (b.args) |args| { @@ -67,6 +67,7 @@ pub fn build(b: *std.Build) void { const db_test_step = b.step("test-db", "Run database tests"); db_test_step.dependOn(&run_db_tests.step); + const api_tests = b.addTest(.{ .root_module = api_mod, }); @@ -74,6 +75,7 @@ pub fn build(b: *std.Build) void { const api_test_step = b.step("test-api", "Run api tests"); api_test_step.dependOn(&run_api_tests.step); + const frontend_tests = b.addTest(.{ .root_module = frontend_mod, }); @@ -81,6 +83,7 @@ pub fn build(b: *std.Build) void { const frontend_test_step = b.step("test-frontend", "Run frontend tests"); frontend_test_step.dependOn(&run_frontend_tests.step); + const http_tests = b.addTest(.{ .root_module = http_mod, }); @@ -88,11 +91,13 @@ pub fn build(b: *std.Build) void { const http_test_step = b.step("test-http", "Run http tests"); http_test_step.dependOn(&run_http_tests.step); + const exe_tests = b.addTest(.{ .root_module = exe.root_module, }); const run_exe_tests = b.addRunArtifact(exe_tests); + const test_step = b.step("test", "Run all tests"); test_step.dependOn(&run_db_tests.step); test_step.dependOn(&run_api_tests.step); @@ -100,16 +105,27 @@ pub fn build(b: *std.Build) void { test_step.dependOn(&run_http_tests.step); test_step.dependOn(&run_exe_tests.step); + const fmt_step = b.step("fmt", "Format"); const do_fmt = b.addFmt(.{ .paths = &.{ "src" }, }); fmt_step.dependOn(&do_fmt.step); + const check_fmt_step = b.step("check", "Check format and syntax"); const do_check_fmt = b.addFmt(.{ .paths = &.{ "src" }, .check = true, }); check_fmt_step.dependOn(&do_check_fmt.step); + + + const docs_step = b.step("docs", "Emit documentation"); + const docs_install = b.addInstallDirectory(.{ + .install_dir = .prefix, + .install_subdir = "docs", + .source_dir = exe.getEmittedDocs(), + }); + docs_step.dependOn(&docs_install.step); } diff --git a/src/root.zig b/src/root.zig new file mode 100644 index 0000000..8d85eb4 --- /dev/null +++ b/src/root.zig @@ -0,0 +1,6 @@ +//! Memora Software Stack + +pub const db = @import("db"); +pub const api = @import("api"); +pub const frontend = @import("frontend"); +pub const http = @import("http"); |