feat(install): --jobs option; bound the CI installer build
VoidBuildSystem CI / 3A · Linux test (sanitizers) (push) Successful in 1m31s
VoidBuildSystem CI / 1 · Requirements (push) Successful in 4s
VoidBuildSystem CI / 2A · Linux build (debug) (push) Successful in 3m47s
VoidBuildSystem CI / 2A · Linux build (sanitizers) (push) Successful in 5m25s
VoidBuildSystem CI / 2A · Linux build (relwithdebinfo) (push) Successful in 5m45s
VoidBuildSystem CI / 2B · Windows Wine build (debug) (push) Successful in 1m39s
VoidBuildSystem CI / 2B · Windows Wine build (relwithdebinfo) (push) Successful in 2m53s
VoidBuildSystem CI / 3B · Windows Wine test (debug) (push) Successful in 18s
VoidBuildSystem CI / 3B · Windows Wine test (relwithdebinfo) (push) Successful in 18s
VoidBuildSystem CI / 3A · Linux test (debug) (push) In progress
VoidBuildSystem CI / 3A · Linux test (relwithdebinfo) (push) In progress

The nested dependency build ran at full parallelism and large
translation units failed on the runner without a visible diagnostic.
vbs install accepts --jobs (also forwarded to the provider build and
the parent graph) and the installers use 4.
This commit is contained in:
faumaray committed 2026-12-06 12:05:26 +03:00
1 parent 286b0044d5
commit 08cc7dc101
2 files changed
+15 -3

No files matched your search

+2 -2
View File
@@ -301,7 +301,7 @@ jobs:
local attempt=1
while true; do
if "${vbs}" install --project . --build-dir "${build_dir}" --profile release \
--prefix "${prefix}" --package-name VoidBuildSystem \
--jobs 4 --prefix "${prefix}" --package-name VoidBuildSystem \
--package-version "${version}" \
--archive "${out}/vbs-${label}-linux-x86_64-${fmt}.${ext}" \
--archive-format "${fmt}"; then
@@ -383,7 +383,7 @@ jobs:
*) ext="${fmt}" ;;
esac
"${vbs}" install --project . --build-dir "${build_dir}" --profile release \
--target-os windows --target-arch x86_64 \
--jobs 4 --target-os windows --target-arch x86_64 \
--prefix "${prefix}" --package-name VoidBuildSystem \
--package-version "${version}" \
--archive "${out}/vbs-${label}-windows-x86_64-${fmt}.${ext}" \
+13 -1
View File
@@ -2571,6 +2571,7 @@ struct InstallCmdOptions {
std::optional<std::string> compiler_arg;
std::optional<std::string> target_os_arg;
std::optional<std::string> target_arch_arg;
std::optional<std::string> jobs_arg;
std::optional<std::string> prefix_arg;
std::optional<std::string> pkg_name_arg;
std::string pkg_ver{"0.1.0"};
@@ -2598,6 +2599,15 @@ int execute_install_command(const InstallCmdOptions &opts) {
return 2;
}
}
std::size_t jobs = 0;
if (opts.jobs_arg) {
int parsed_jobs = 0;
if (!Void::Str::to_int(*opts.jobs_arg, parsed_jobs) || parsed_jobs < 0) {
std::cerr << "vbs install: invalid --jobs value '" << *opts.jobs_arg << "'\n";
return 2;
}
jobs = static_cast<std::size_t>(parsed_jobs);
}
// Absolute roots: the self-hosted dependency build runs actions with their
// own working directory, so relative graph paths would not resolve.
@@ -2762,7 +2772,7 @@ int execute_install_command(const InstallCmdOptions &opts) {
? std::nullopt
: std::optional{fopts.sdk_library_path},
&(*state),
0};
jobs};
auto exported = Provider::resolve_foreign_provider(preq);
if (!exported) {
std::cerr << "vbs install: " << exported.error().message() << '\n';
@@ -2797,6 +2807,7 @@ int execute_install_command(const InstallCmdOptions &opts) {
// need to be built: test executables and tools without install rules are
// not part of the package.
Execution::ExecutionOptions eopts;
eopts.jobs = jobs;
for (const auto &target : desc->targets) {
if (target.install_rule) {
eopts.selected_targets.push_back(target.name);
@@ -3939,6 +3950,7 @@ int main(int argc, char **argv) {
install_opts.target_os_arg)
.option("--target-arch", "", "Target architecture (default: host, e.g. x86_64)",
install_opts.target_arch_arg)
.option("--jobs", "-j", "Parallel job count (0 = auto)", install_opts.jobs_arg)
.option("--prefix", "", "Install destination prefix (required)", install_opts.prefix_arg)
.option("--package-name", "", "Exported package name", install_opts.pkg_name_arg)
.option_default("--package-version", "", "Exported package version", install_opts.pkg_ver,