feat: 1.0.0 release built and packaged by VBS
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 5m42s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 2s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m22s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 2m59s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m4s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m37s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m36s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 16s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 16s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 19s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 28s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 5m46s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 1m39s
VoidBuildSystem CI / 4A2 · VBS installers (self-hosted) (push) Failing after 1m42s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 1m52s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 1m56s
VoidBuildSystem CI / 5 · Release (push) Skipped
VoidBuildSystem CI / 3A · Linux test (debug) (push) Successful in 5m42s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 2s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 2m22s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 2m59s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 4m4s
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m37s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m36s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 3m0s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 16s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 16s
VoidBuildSystem CI / 4B · Windows package (debug) (push) Successful in 19s
VoidBuildSystem CI / 4B · Windows package (relwithdebinfo) (push) Successful in 28s
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) Successful in 5m46s
VoidBuildSystem CI / 4A · Linux package (debug) (push) Successful in 1m39s
VoidBuildSystem CI / 4A2 · VBS installers (self-hosted) (push) Failing after 1m42s
VoidBuildSystem CI / 4A · Linux package (relwithdebinfo) (push) Successful in 1m52s
VoidBuildSystem CI / 4A · Linux package (sanitizers) (push) Successful in 1m56s
VoidBuildSystem CI / 5 · Release (push) Skipped
- Bump the project version to 1.0.0 (CMake and the VBS description). - vbs install now imports declared dependencies before lowering (previously it ignored providers entirely, so any project with an external dependency could not be installed). - Native providers export plain option names alongside VBS_DEP_OPTION_* because dependencies such as VoidLibrary read VOID_ENABLED_MODULES directly. - The VBS description disables VoidLibrary's own test executables and keeps the entry points out of the core library glob, which lets the self-hosted build link. - CI gains 4A2: builds VBS with VBS and packages tar/sh/zip/deb/rpm/ wix/dmg/nuget installers, which the release publishes. Verified locally: the self-hosted build and all eight installer formats succeed; the tar contains vbs, vbs-registry, the CMake export and package metadata.
This commit is contained in:
1 parent
c8eb950ca0
commit
0186711a90
5 files changed
+174
-12
No files matched your search
+100
-7
@@ -2652,6 +2652,92 @@ int execute_install_command(const InstallCmdOptions &opts) {
|
||||
std::cerr << "vbs install: " << desc.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto state = State::StateStore::open(build_root / ".vbs");
|
||||
if (!state) {
|
||||
std::cerr << "vbs install: " << state.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Import declared dependencies like `vbs build`, so projects with external
|
||||
// dependencies (e.g. VoidLibrary) can be installed too.
|
||||
std::vector<Package::NormalizedDependency> toml_deps;
|
||||
for (const auto &dep_file : desc->dependency_files) {
|
||||
const auto dep_path = std::filesystem::path{dep_file}.is_absolute()
|
||||
? std::filesystem::path{dep_file}
|
||||
: (project_root / dep_file);
|
||||
auto loaded = Package::load_dependencies_toml(dep_path);
|
||||
if (!loaded) {
|
||||
std::cerr << "vbs install: " << loaded.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
toml_deps.insert(toml_deps.end(), loaded->begin(), loaded->end());
|
||||
}
|
||||
auto merged_deps = Package::merge_dependencies(desc->dependencies, toml_deps);
|
||||
if (!merged_deps) {
|
||||
std::cerr << "vbs install: " << merged_deps.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
std::map<std::string, Graph::ImportedTargetInterface, std::less<>> imported_targets;
|
||||
if (!merged_deps->empty()) {
|
||||
auto pinned_lock = Package::load_pinned_lock(project_root / "vbs.lock");
|
||||
if (!pinned_lock) {
|
||||
std::cerr << "vbs install: " << pinned_lock.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto trusted_keys = combine_trusted_keys({}, {}, project_root);
|
||||
if (!trusted_keys) {
|
||||
std::cerr << "vbs install: " << trusted_keys.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto resolved =
|
||||
resolve_and_materialize_deps(ctx, *merged_deps, project_root, build_root,
|
||||
*pinned_lock, false, false, *trusted_keys);
|
||||
if (!resolved) {
|
||||
std::cerr << "vbs install: " << resolved.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
for (const auto &[dep_rec, mat] : resolved->materialized) {
|
||||
DependencyRecord effective_dep = dep_rec;
|
||||
if (effective_dep.builder.empty() &&
|
||||
effective_dep.source_kind == DependencySourceKind::Package) {
|
||||
std::error_code bec;
|
||||
if (std::filesystem::is_regular_file(mat.source_dir / "build.cpp", bec)) {
|
||||
effective_dep.builder = "native";
|
||||
} else if (std::filesystem::is_regular_file(mat.source_dir / "CMakeLists.txt",
|
||||
bec)) {
|
||||
effective_dep.builder = "cmake";
|
||||
} else if (std::filesystem::is_regular_file(mat.source_dir / "meson.build",
|
||||
bec)) {
|
||||
effective_dep.builder = "meson";
|
||||
}
|
||||
}
|
||||
if (effective_dep.builder == "cmake" || effective_dep.builder == "meson" ||
|
||||
effective_dep.builder == "conan" || effective_dep.builder == "native") {
|
||||
Provider::ProviderRequest preq{effective_dep,
|
||||
mat,
|
||||
ctx,
|
||||
*tc,
|
||||
build_root / ".vbs" / "providers",
|
||||
Provider::ProviderMode::FullBuild,
|
||||
{},
|
||||
fopts.sdk_include_dir,
|
||||
fopts.sdk_source_dir,
|
||||
fopts.sdk_library_path.empty()
|
||||
? std::nullopt
|
||||
: std::optional{fopts.sdk_library_path},
|
||||
&(*state),
|
||||
0};
|
||||
auto exported = Provider::resolve_foreign_provider(preq);
|
||||
if (!exported) {
|
||||
std::cerr << "vbs install: " << exported.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
for (const auto &[name, target] : exported->targets) {
|
||||
imported_targets[name] = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const auto snap_inputs = collect_snapshot_inputs(*desc, project_root);
|
||||
Snapshot::SnapshotOptions sopts;
|
||||
@@ -2664,22 +2750,29 @@ int execute_install_command(const InstallCmdOptions &opts) {
|
||||
std::cerr << "vbs install: " << snap.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto graph =
|
||||
Graph::lower_project_graph(*desc, *tc, {project_root, build_root, &(*snap), {}, 32768});
|
||||
auto graph = Graph::lower_project_graph(
|
||||
*desc, *tc,
|
||||
{project_root, build_root, &(*snap), std::move(imported_targets), 32768});
|
||||
if (!graph) {
|
||||
std::cerr << "vbs install: " << graph.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto state = State::StateStore::open(build_root / ".vbs");
|
||||
if (!state) {
|
||||
std::cerr << "vbs install: " << state.error().message() << '\n';
|
||||
return 1;
|
||||
}
|
||||
auto exec = Execution::execute_graph(*graph, *state);
|
||||
if (!exec || !exec->succeeded) {
|
||||
std::cerr << "vbs install: build failed before staging\n";
|
||||
if (!exec) {
|
||||
std::cerr << exec.error().message() << '\n';
|
||||
} else {
|
||||
for (const auto &result : exec->results) {
|
||||
if (result.succeeded) {
|
||||
continue;
|
||||
}
|
||||
std::cerr << "vbs install: action '" << result.action_id
|
||||
<< "' failed: " << result.error_message << '\n';
|
||||
if (!result.stderr_data.empty()) {
|
||||
std::cerr << result.stderr_data << '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user