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

- 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:
faumaray committed 2026-12-06 08:40:16 +03:00
1 parent c8eb950ca0
commit 0186711a90
5 files changed
+174 -12

No files matched your search

+61 -2
View File
@@ -216,6 +216,60 @@ jobs:
path: dist-linux-${{ matrix.variant }}/ path: dist-linux-${{ matrix.variant }}/
retention-days: 30 retention-days: 30
# ---------------------------------------------------------------------------
# 4A2 - the release installers, built and packaged by VBS itself
# ---------------------------------------------------------------------------
vbs-installers:
name: "4A2 · VBS installers (self-hosted)"
needs: linux-test
runs-on: vulkan
steps:
- uses: actions/checkout@v4
- name: Download the RelWithDebInfo build
uses: actions/download-artifact@v3
with:
name: vbs-linux-build-relwithdebinfo
path: build/linux-relwithdebinfo
- name: Make the restored binaries executable
run: chmod +x build/linux-relwithdebinfo/bin/*
- name: Build and package every installer format with VBS
run: |
set -eu
vbs=build/linux-relwithdebinfo/bin/vbs
version="$(sed -nE 's/^project\(VoidBuildSystem VERSION ([0-9.]+).*/\1/p' CMakeLists.txt)"
label="${{ github.event.inputs.tag }}"
if [ -z "${label}" ]; then
case "${GITHUB_REF_NAME}" in
v*) label="${GITHUB_REF_NAME}" ;;
*) label="dev-$(printf '%s' "${GITHUB_SHA}" | cut -c1-7)" ;;
esac
fi
out=dist-installers
prefix="$(mktemp -d)"
mkdir -p "${out}"
# The first install builds the project with VBS (build.cpp); the rest reuse
# the shared build directory.
for fmt in tar sh zip deb rpm wix dmg nuget; do
case "${fmt}" in
tar) ext=tar ;;
wix) ext=wxs ;;
nuget) ext=nupkg ;;
*) ext="${fmt}" ;;
esac
"${vbs}" install --project . --build-dir build/selfhost --profile release \
--prefix "${prefix}" --package-name VoidBuildSystem \
--package-version "${version}" \
--archive "${out}/vbs-${label}-linux-x86_64-${fmt}.${ext}" \
--archive-format "${fmt}"
done
ls -l "${out}/"
- name: Upload the installers
uses: actions/upload-artifact@v3
with:
name: vbs-installers
path: dist-installers/
retention-days: 30
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# 2B / 3B / 4B - Windows via Wine: VBS is cross-compiled with MinGW-w64, its # 2B / 3B / 4B - Windows via Wine: VBS is cross-compiled with MinGW-w64, its
# test executables run under Wine, and the Windows binaries are packaged. # test executables run under Wine, and the Windows binaries are packaged.
@@ -370,9 +424,9 @@ jobs:
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
release: release:
name: "5 · Release" name: "5 · Release"
# Linked to both package lanes and only dispatched for a release tag or an # Linked to every package lane and only dispatched for a release tag or an
# explicit publish dispatch (always() would queue the job on every push). # explicit publish dispatch (always() would queue the job on every push).
needs: [linux-package, wine-package] needs: [linux-package, wine-package, vbs-installers]
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish == 'true' if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.publish == 'true'
runs-on: vulkan runs-on: vulkan
steps: steps:
@@ -388,6 +442,11 @@ jobs:
with: with:
name: vbs-windows-package-relwithdebinfo name: vbs-windows-package-relwithdebinfo
path: dist path: dist
- name: Download the VBS installers
uses: actions/download-artifact@v3
with:
name: vbs-installers
path: dist
- name: Verify the tag matches the project version - name: Verify the tag matches the project version
run: | run: |
tag="${{ github.event.inputs.tag }}" tag="${{ github.event.inputs.tag }}"
+1 -1
View File
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 4.0) cmake_minimum_required(VERSION 4.0)
project(VoidBuildSystem VERSION 0.1.0 LANGUAGES CXX) project(VoidBuildSystem VERSION 1.0.0 LANGUAGES CXX)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
message(FATAL_ERROR message(FATAL_ERROR
+9 -2
View File
@@ -9,6 +9,9 @@ void build(Void::Build::Project &project) {
Void::Build::Commit{"de1fdcda72ddd6ac069fba433b13f643327efa3f"}) Void::Build::Commit{"de1fdcda72ddd6ac069fba433b13f643327efa3f"})
.native_builder({{"VOID_ENABLED_MODULES", .native_builder({{"VOID_ENABLED_MODULES",
"Configuration;Text;Unicode;Async;Algorithms;Crypto;Archive;Testing;Log"}, "Configuration;Text;Unicode;Async;Algorithms;Crypto;Archive;Testing;Log"},
// Only the Testing library is needed, not VoidLibrary's own test
// executables (the CMake path sets VOID_ENABLE_TESTING=OFF too).
{"VOID_ENABLE_TESTING", "0"},
{"BUILD_SHARED_LIBS", false}}); {"BUILD_SHARED_LIBS", false}});
// Source membership comes from conventions and globs, not explicit file lists: // Source membership comes from conventions and globs, not explicit file lists:
@@ -24,8 +27,12 @@ void build(Void::Build::Project &project) {
} }
auto core = project.static_library("VoidBuildCore"); auto core = project.static_library("VoidBuildCore");
// The entry points (src/Main.cpp, src/Describe.cpp) are not part of the core
// library: they define main() and Describe.cpp references the example
// description's build()/profiles(). Glob only the subdirectories.
core.cxx_standard(Void::Build::CxxStandard::Cxx26) core.cxx_standard(Void::Build::CxxStandard::Cxx26)
.sources(project.glob("src/**/*.cpp")) .sources(project.glob("src/*/*.cpp"))
.sources(project.glob("src/*/*/*.cpp"))
.sources(project.glob("recipes/**/*.cpp")) .sources(project.glob("recipes/**/*.cpp"))
.include_directory("include", Void::Build::Visibility::Public) .include_directory("include", Void::Build::Visibility::Public)
.include_directory("recipes", Void::Build::Visibility::Public) .include_directory("recipes", Void::Build::Visibility::Public)
@@ -55,7 +62,7 @@ void build(Void::Build::Project &project) {
"#pragma once\n" "#pragma once\n"
"#include <string_view>\n" "#include <string_view>\n"
"namespace Void::Build::Bootstrap {\n" "namespace Void::Build::Bootstrap {\n"
"inline constexpr std::string_view version = \"0.1.0\";\n" "inline constexpr std::string_view version = \"1.0.0\";\n"
"inline constexpr std::string_view os = \"" + "inline constexpr std::string_view os = \"" +
ctx.os + ctx.os +
"\";\n" "\";\n"
+100 -7
View File
@@ -2652,6 +2652,92 @@ int execute_install_command(const InstallCmdOptions &opts) {
std::cerr << "vbs install: " << desc.error().message() << '\n'; std::cerr << "vbs install: " << desc.error().message() << '\n';
return 1; 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); const auto snap_inputs = collect_snapshot_inputs(*desc, project_root);
Snapshot::SnapshotOptions sopts; Snapshot::SnapshotOptions sopts;
@@ -2664,22 +2750,29 @@ int execute_install_command(const InstallCmdOptions &opts) {
std::cerr << "vbs install: " << snap.error().message() << '\n'; std::cerr << "vbs install: " << snap.error().message() << '\n';
return 1; return 1;
} }
auto graph = auto graph = Graph::lower_project_graph(
Graph::lower_project_graph(*desc, *tc, {project_root, build_root, &(*snap), {}, 32768}); *desc, *tc,
{project_root, build_root, &(*snap), std::move(imported_targets), 32768});
if (!graph) { if (!graph) {
std::cerr << "vbs install: " << graph.error().message() << '\n'; std::cerr << "vbs install: " << graph.error().message() << '\n';
return 1; 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); auto exec = Execution::execute_graph(*graph, *state);
if (!exec || !exec->succeeded) { if (!exec || !exec->succeeded) {
std::cerr << "vbs install: build failed before staging\n"; std::cerr << "vbs install: build failed before staging\n";
if (!exec) { if (!exec) {
std::cerr << exec.error().message() << '\n'; 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; return 1;
} }
+3
View File
@@ -1069,6 +1069,9 @@ run_native_provider(const ProviderRequest &request, const std::filesystem::path
fopts.extra_environment["VBS_DEP_NAME"] = request.dependency.name; fopts.extra_environment["VBS_DEP_NAME"] = request.dependency.name;
for (const auto &[key, value] : request.dependency.options) { for (const auto &[key, value] : request.dependency.options) {
fopts.extra_environment["VBS_DEP_OPTION_" + key] = cmake_option_value(value); fopts.extra_environment["VBS_DEP_OPTION_" + key] = cmake_option_value(value);
// Dependencies may read their options from the plain environment
// (VoidLibrary's build.cpp reads VOID_ENABLED_MODULES directly).
fopts.extra_environment[key] = cmake_option_value(value);
} }
auto compiled = Config::compile_descriptor(fopts); auto compiled = Config::compile_descriptor(fopts);
if (!compiled) { if (!compiled) {