feat(ci): guest-cpu/guest-memory-mb action inputs on main
Runner fetches the composite action from @main. Propagates the VMX override inputs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user