feat(ci): expose guest-cpu/guest-memory-mb; ns7zip Linux 8GB

job.py already patches the clone VMX (numvcpus/memsize) via
--guest-cpu/--guest-memory-mb; expose them as action inputs
(default '0' = keep template). build-ns7zip.yml sets
guest-memory-mb: 8192 — the parallel MinGW cross-compile thrashes at
the 4 GB Linux template default (Windows template is 6 GB).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Simone
2026-05-17 21:42:47 +02:00
parent 9b42823984
commit 7b4051412b
2 changed files with 25 additions and 0 deletions
+21
View File
@@ -156,6 +156,22 @@ inputs:
required: false
default: '{}'
guest-cpu:
description: >
Override the build VM vCPU count (numvcpus in the clone VMX).
"0" (default) keeps the template value.
required: false
default: '0'
guest-memory-mb:
description: >
Override the build VM RAM in MB (memsize in the clone VMX).
"0" (default) keeps the template value. Raise for memory-heavy
parallel builds (e.g. the Linux MinGW cross-compile thrashes at
the 4 GB template default).
required: false
default: '0'
use-shared-cache:
description: >
Set to "true" to redirect NuGet and pip caches to VMware shared folders
@@ -212,6 +228,8 @@ runs:
INPUT_EXTRA_GUEST_ENV_JSON: ${{ inputs.extra-guest-env-json }}
INPUT_USE_SHARED_CACHE: ${{ inputs.use-shared-cache }}
INPUT_SKIP_ARTIFACT: ${{ inputs.skip-artifact }}
INPUT_GUEST_CPU: ${{ inputs.guest-cpu }}
INPUT_GUEST_MEMORY_MB: ${{ inputs.guest-memory-mb }}
run: |
#Requires -Version 5.1
Set-StrictMode -Version Latest
@@ -325,6 +343,9 @@ runs:
else { $pyArgs += '--use-git-clone' }
if ($env:INPUT_USE_SHARED_CACHE -eq 'true') { $pyArgs += '--use-shared-cache' }
if ($env:INPUT_SKIP_ARTIFACT -eq 'true') { $pyArgs += '--skip-artifact' }
# VMX overrides: forward only when > 0 (0 = keep template value).
if ([int]($env:INPUT_GUEST_CPU) -gt 0) { $pyArgs += @('--guest-cpu', $env:INPUT_GUEST_CPU) }
if ([int]($env:INPUT_GUEST_MEMORY_MB) -gt 0) { $pyArgs += @('--guest-memory-mb', $env:INPUT_GUEST_MEMORY_MB) }
if ($env:INPUT_EXTRA_GUEST_ENV_JSON -and $env:INPUT_EXTRA_GUEST_ENV_JSON -ne '{}') {
$pyArgs += @('--extra-env-json', $env:INPUT_EXTRA_GUEST_ENV_JSON)
}