ci: add the native VBS workflow #64

Closed
faumaray wants to merge 4 commits from build-vbs into main
pull from: build-vbs
2 changed files with 25 additions and 2 deletions
Showing only changes of commit 99c91ab5fc - Show all commits

No files matched your search

+2 -2
View File
@@ -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: |
+23
View File
@@ -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/<Module>Only).
const std::vector<std::pair<std::string, std::string>> 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)