diff --git a/.gitea/workflows/vbs.yml b/.gitea/workflows/vbs.yml index c24c39d..320cff7 100644 --- a/.gitea/workflows/vbs.yml +++ b/.gitea/workflows/vbs.yml @@ -27,8 +27,8 @@ jobs: - name: Native build run: /tmp/vbs-build/bin/vbs build --project . --build-dir build-vbs --jobs 4 - - name: Native smoke test - run: /tmp/vbs-build/bin/vbs test --project . --build-dir build-vbs --target void_smoke --jobs 4 + - name: Native tests + run: /tmp/vbs-build/bin/vbs test --project . --build-dir build-vbs --jobs 4 - name: Install check run: | diff --git a/build.cpp b/build.cpp index 38c5f9a..55f95c7 100644 --- a/build.cpp +++ b/build.cpp @@ -43,6 +43,29 @@ void build(Void::Build::Project &project) { project.install_directory("include", "include"); project.install_file("README.md", "share/doc/VoidLibrary"); + // Per-module package tests (standalone mains under tests/package/Only). + const std::vector> package_tests = { + {"algorithms", "Algorithms"}, {"core", "Core"}, + {"crypto", "Crypto"}, {"configuration", "Configuration"}, + {"archive", "Archive"}, {"binary", "Binary"}, + {"containers", "Containers"}, {"data", "Data"}, + {"fsm", "Fsm"}, {"io", "IO"}, + {"text", "Text"}, {"unicode", "Unicode"}, + {"async", "Async"}, {"log", "Log"}, + {"storage", "Storage"}, {"sqlite", "Sqlite"}, + }; + for (const auto &[test_name, module_name] : package_tests) { + const std::string test_dir = "tests/package/" + module_name + "Only"; + if (!std::filesystem::is_directory(test_dir) || + !std::filesystem::is_regular_file(test_dir + "/main.cpp")) { + continue; + } + auto package_test = project.test("void_" + test_name + "_tests"); + package_test.cxx_standard(Void::Build::CxxStandard::Cxx26) + .sources({test_dir + "/main.cpp"}) + .link(libs.modules.at(module_name)); + } + // Smoke test exercising the native VoidLibrary closure through VBS. auto smoke = project.test("void_smoke"); smoke.cxx_standard(Void::Build::CxxStandard::Cxx26)