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:
@@ -156,6 +156,22 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: '{}'
|
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:
|
use-shared-cache:
|
||||||
description: >
|
description: >
|
||||||
Set to "true" to redirect NuGet and pip caches to VMware shared folders
|
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_EXTRA_GUEST_ENV_JSON: ${{ inputs.extra-guest-env-json }}
|
||||||
INPUT_USE_SHARED_CACHE: ${{ inputs.use-shared-cache }}
|
INPUT_USE_SHARED_CACHE: ${{ inputs.use-shared-cache }}
|
||||||
INPUT_SKIP_ARTIFACT: ${{ inputs.skip-artifact }}
|
INPUT_SKIP_ARTIFACT: ${{ inputs.skip-artifact }}
|
||||||
|
INPUT_GUEST_CPU: ${{ inputs.guest-cpu }}
|
||||||
|
INPUT_GUEST_MEMORY_MB: ${{ inputs.guest-memory-mb }}
|
||||||
run: |
|
run: |
|
||||||
#Requires -Version 5.1
|
#Requires -Version 5.1
|
||||||
Set-StrictMode -Version Latest
|
Set-StrictMode -Version Latest
|
||||||
@@ -325,6 +343,9 @@ runs:
|
|||||||
else { $pyArgs += '--use-git-clone' }
|
else { $pyArgs += '--use-git-clone' }
|
||||||
if ($env:INPUT_USE_SHARED_CACHE -eq 'true') { $pyArgs += '--use-shared-cache' }
|
if ($env:INPUT_USE_SHARED_CACHE -eq 'true') { $pyArgs += '--use-shared-cache' }
|
||||||
if ($env:INPUT_SKIP_ARTIFACT -eq 'true') { $pyArgs += '--skip-artifact' }
|
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 '{}') {
|
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)
|
$pyArgs += @('--extra-env-json', $env:INPUT_EXTRA_GUEST_ENV_JSON)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ jobs:
|
|||||||
# Cross-repo build: github.ref_name is this repo's branch, not
|
# Cross-repo build: github.ref_name is this repo's branch, not
|
||||||
# nsis-plugin-ns7zip's. Pin the target repo's branch.
|
# nsis-plugin-ns7zip's. Pin the target repo's branch.
|
||||||
repo-branch: 'main'
|
repo-branch: 'main'
|
||||||
|
# 8 GB: the parallel MinGW cross-compile thrashes at the 4 GB
|
||||||
|
# Linux template default (3 concurrent make -j). Harmless for
|
||||||
|
# Windows (host has ample RAM).
|
||||||
|
guest-memory-mb: '8192'
|
||||||
# Suffix disambiguates artifact dirs: F:\CI\Artifacts\{run_id}-{attempt}-windows
|
# Suffix disambiguates artifact dirs: F:\CI\Artifacts\{run_id}-{attempt}-windows
|
||||||
job-id-suffix: '${{ matrix.target }}'
|
job-id-suffix: '${{ matrix.target }}'
|
||||||
artifact-name: 'nsis-plugin-ns7zip-${{ matrix.target }}-${{ github.ref_name }}'
|
artifact-name: 'nsis-plugin-ns7zip-${{ matrix.target }}-${{ github.ref_name }}'
|
||||||
|
|||||||
Reference in New Issue
Block a user