feat(install): cross-target installs and target-only builds
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 6m26s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 6m38s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 1m26s
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 1m18s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 1m15s
VoidBuildSystem CI / 4A2 · VBS installers (self-hosted) (push) Failing after 31s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 2s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m51s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m31s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m13s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 3m24s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m43s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 20s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 26s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m42s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 22s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 37s

- vbs install accepts --target-os/--target-arch like vbs build, so the
  Windows installers can be produced from the Linux host.
- Only targets carrying an install rule (plus their dependencies) are
  built, so install no longer links test executables.
- Failed install actions print their captured stderr.
- The VBS description compares the target OS case-insensitively.
- The installer job uses a per-run build directory: concurrent runs on
  the same runner share the repository workspace.
This commit is contained in:
faumaray committed 2026-12-06 09:12:21 +03:00
1 parent 0186711a90
commit f1e52467d7
3 files changed
+43 -8

No files matched your search

+19 -2
View File
@@ -1,5 +1,22 @@
#include "build-support/Defaults.hpp"
#include <algorithm>
#include <cctype>
#include <string>
namespace {
// The profile context carries the target OS as written on the command line
// ("windows") or as the host name ("Windows"): compare case-insensitively.
bool targets_windows(const Void::Build::ProfileContext &ctx) {
std::string os = ctx.os;
std::ranges::transform(os, os.begin(),
[](unsigned char c) { return static_cast<char>(std::tolower(c)); });
return os == "windows";
}
} // namespace
void build(Void::Build::Project &project) {
const auto &ctx = project.context();
@@ -48,7 +65,7 @@ void build(Void::Build::Project &project) {
.link(library.target("Void::Crypto"), Void::Build::Visibility::Public)
.link(library.target("Void::Archive"), Void::Build::Visibility::Public)
.link(library.target("Void::Log"), Void::Build::Visibility::Public);
if (ctx.os == "Windows") {
if (targets_windows(ctx)) {
// Winsock for the registry client and the native Windows HTTP fallbacks.
core.link_option("-lws2_32");
}
@@ -92,7 +109,7 @@ void build(Void::Build::Project &project) {
BuildSupport::compiler_warnings(cli, ctx);
// The registry service is POSIX-only until its Track C3 Windows port lands.
if (ctx.os != "Windows") {
if (!targets_windows(ctx)) {
auto registry_lib = project.static_library("VoidBuildRegistry");
registry_lib.cxx_standard(Void::Build::CxxStandard::Cxx26)
.sources(project.glob("registry/service/*.cpp"))