From d8ae823a489033b6793b1ce5b78f89cd81f4e78f Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Fri, 6 Mar 2026 17:58:45 +0530 Subject: [PATCH 01/49] Add build-lvlibp-docker action [REQ-039] --- actions/OpenSourceActions.psd1 | 1 + actions/OpenSourceActions.psm1 | 57 +++++ artifacts/linux/action-docs.json | 222 ++++++++++++++++++ artifacts/linux/action-docs.md | 42 ++++ build-lvlibp-docker/action.yml | 86 +++++++ ci_evidence.txt | 2 +- dispatchers.json | 78 ++++++ docs/actions/build-lvlibp-docker.md | 144 ++++++++++++ docs/scripts/build-lvlibp-docker.md | 72 ++++++ requirements.json | 7 + .../build-lvlibp-docker/BuildLvlibpDocker.ps1 | 195 +++++++++++++++ .../BuildLvlibpDocker.Workflow.Tests.ps1 | 72 ++++++ 12 files changed, 977 insertions(+), 1 deletion(-) create mode 100644 build-lvlibp-docker/action.yml create mode 100644 docs/actions/build-lvlibp-docker.md create mode 100644 docs/scripts/build-lvlibp-docker.md create mode 100644 scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 create mode 100644 tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 diff --git a/actions/OpenSourceActions.psd1 b/actions/OpenSourceActions.psd1 index 184cc1eb..475c7141 100644 --- a/actions/OpenSourceActions.psd1 +++ b/actions/OpenSourceActions.psd1 @@ -14,6 +14,7 @@ 'Invoke-ApplyVIPC' 'Invoke-Build' 'Invoke-BuildLvlibp' + 'Invoke-BuildLvlibpDocker' 'Invoke-BuildViPackage' 'Invoke-CloseLabVIEW' 'Invoke-GenerateReleaseNotes' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 7e0e374f..7c4fa893 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -228,6 +228,63 @@ function Invoke-BuildLvlibp { return Invoke-OpenSourceActionScript -ScriptSegments @('build-lvlibp','Build_lvlibp.ps1') -Arguments $args -DryRun:$DryRun -gcliPath $gcliPath } +# Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. +# MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). +# SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). +# ProjectPath: Path to the LabVIEW project .lvproj file. +# TargetName: Target that contains the build specification. +# BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). +# Major: Major version component. +# Minor: Minor version component. +# Patch: Patch version component. +# Build: Build number component. +# Commit: Commit hash or identifier. +# DockerImage: Docker image name (default: "nationalinstruments/labview"). +# ImageTag: Docker image tag (defaults to "2026q1-linux"). +# DryRun: If set, prints the command instead of executing it. +# gcliPath: Optional path prepended to PATH for locating the g CLI. +function Invoke-BuildLvlibpDocker { + [CmdletBinding()] + param( + [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, + [Parameter(Mandatory)] [string] $SupportedBitness, + [Parameter(Mandatory)] [string] $ProjectPath, + [Parameter(Mandatory)] [string] $TargetName, + [Parameter()] [string] $BuildSpecName = "", + [Parameter(Mandatory)] [int] $Major, + [Parameter(Mandatory)] [int] $Minor, + [Parameter(Mandatory)] [int] $Patch, + [Parameter(Mandatory)] [int] $Build, + [Parameter(Mandatory)] [string] $Commit, + [Parameter()] [string] $DockerImage = "nationalinstruments/labview", + [Parameter()] [string] $ImageTag = "", + [switch] $DryRun, + [string] $gcliPath + ) + Write-Information "Invoking BuildLvlibpDocker" -InformationAction Continue + + $result = Invoke-OpenSourceActionScript ` + -ScriptSegments @('build-lvlibp-docker', 'BuildLvlibpDocker.ps1') ` + -Arguments @{ + MinimumSupportedLVVersion = $MinimumSupportedLVVersion + SupportedBitness = $SupportedBitness + ProjectPath = $ProjectPath + TargetName = $TargetName + BuildSpecName = $BuildSpecName + Major = $Major + Minor = $Minor + Patch = $Patch + Build = $Build + Commit = $Commit + DockerImage = $DockerImage + ImageTag = $ImageTag + } ` + -DryRun:$DryRun ` + -gcliPath $gcliPath + + return $result +} + # Closes any running instance of LabVIEW. # MinimumSupportedLVVersion: Minimum LabVIEW version that the project supports. # SupportedBitness: Target LabVIEW bitness (32- or 64-bit). diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index 7bbf8583..118878a8 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -196,6 +196,84 @@ } } }, + "Invoke-BuildLvlibpDocker": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "", + "description": "Docker image tag (defaults to \"2026q1-linux\")" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { @@ -639,6 +717,43 @@ } }, "wrappers": { + "activate-labview": [ + { + "name": "serial_number", + "description": "LabVIEW serial number for activation.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "package_id", + "description": "LabVIEW package ID to activate.", + "required": false, + "default": "LabVIEW_COM_PKG 25.0300", + "type": "string" + }, + { + "name": "working_directory", + "description": "Working directory where the action will run.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "log_level", + "description": "Verbosity level (ERROR|WARN|INFO|DEBUG).", + "required": false, + "default": "INFO", + "type": "string" + }, + { + "name": "dry_run", + "description": "If true, simulate the action without side effects.", + "required": false, + "default": false, + "type": "string" + } + ], "add-token-to-labview": [ { "name": "minimum_supported_lv_version", @@ -948,6 +1063,113 @@ "type": "string" } ], + "build-lvlibp-docker": [ + { + "name": "minimum_supported_lv_version", + "description": "LabVIEW version for the build (e.g., \"2021\", \"2026\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "supported_bitness", + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "project_path", + "description": "Path to the LabVIEW project .lvproj file.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "target_name", + "description": "Target that contains the build specification.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build_spec_name", + "description": "Name of the build specification. If empty, builds all specifications in the target.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "major", + "description": "Major version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "minor", + "description": "Minor version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "patch", + "description": "Patch version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build", + "description": "Build number component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "commit", + "description": "Commit hash or identifier recorded in the build.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "docker_image", + "description": "Docker image name.", + "required": false, + "default": "nationalinstruments/labview", + "type": "string" + }, + { + "name": "image_tag", + "description": "Docker image tag. Defaults to \"2026q1-linux\" if not specified.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "working_directory", + "description": "Working directory where the action will run.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "log_level", + "description": "Verbosity level (ERROR|WARN|INFO|DEBUG).", + "required": false, + "default": "INFO", + "type": "string" + }, + { + "name": "dry_run", + "description": "If true, simulate the action without side effects.", + "required": false, + "default": false, + "type": "string" + } + ], "build-vi-package": [ { "name": "minimum_supported_lv_version", diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 729aa768..b91c3cba 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -75,6 +75,29 @@ Builds a LabVIEW Packed Library using a project and build spec. MinimumSupported pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibp -ArgsJson '{}' ``` +#### Invoke-BuildLvlibpDocker +Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-linux"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +| Parameter | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| Build | number | true | | Build number component | +| BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | +| Commit | string | true | | Commit hash or identifier | +| DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | +| DryRun | boolean | false | | If set, prints the command instead of executing it | +| ImageTag | string | false | | Docker image tag (defaults to "2026q1-linux") | +| Major | number | true | | Major version component | +| MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | +| Minor | number | true | | Minor version component | +| Patch | number | true | | Patch version component | +| ProjectPath | string | true | | Path to the LabVIEW project | +| SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | +| TargetName | string | true | | Target that contains the build specification | +| gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | + +```powershell +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDocker -ArgsJson '{}' +``` + #### Invoke-BuildViPackage Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | @@ -336,6 +359,25 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | | dry_run | string | false | false | If true, simulate the action without side effects. | +#### build-lvlibp-docker +| Name | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| minimum_supported_lv_version | string | true | | LabVIEW version for the build (e.g., "2021", "2026"). | +| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | +| project_path | string | true | | Path to the LabVIEW project .lvproj file. | +| target_name | string | true | | Target that contains the build specification. | +| build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | +| major | string | true | | Major version component for the PPL. | +| minor | string | true | | Minor version component for the PPL. | +| patch | string | true | | Patch version component for the PPL. | +| build | string | true | | Build number component for the PPL. | +| commit | string | true | | Commit hash or identifier recorded in the build. | +| docker_image | string | false | nationalinstruments/labview | Docker image name. | +| image_tag | string | false | | Docker image tag. Defaults to "2026q1-linux" if not specified. | +| working_directory | string | false | | Working directory where the action will run. | +| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | +| dry_run | string | false | false | If true, simulate the action without side effects. | + #### build-vi-package | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | diff --git a/build-lvlibp-docker/action.yml b/build-lvlibp-docker/action.yml new file mode 100644 index 00000000..1260ee56 --- /dev/null +++ b/build-lvlibp-docker/action.yml @@ -0,0 +1,86 @@ +name: 'Build LVLIBP Docker' +description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Docker container' +inputs: + minimum_supported_lv_version: + description: 'LabVIEW version for the build (e.g., "2021", "2026").' + required: true + supported_bitness: + description: 'Bitness of the LabVIEW environment ("32" or "64").' + required: true + project_path: + description: 'Path to the LabVIEW project .lvproj file.' + required: true + target_name: + description: 'Target that contains the build specification.' + required: true + build_spec_name: + description: 'Name of the build specification. If empty, builds all specifications in the target.' + required: false + default: '' + major: + description: 'Major version component for the PPL.' + required: true + minor: + description: 'Minor version component for the PPL.' + required: true + patch: + description: 'Patch version component for the PPL.' + required: true + build: + description: 'Build number component for the PPL.' + required: true + commit: + description: 'Commit hash or identifier recorded in the build.' + required: true + docker_image: + description: 'Docker image name.' + required: false + default: 'nationalinstruments/labview' + image_tag: + description: 'Docker image tag. Defaults to "2026q1-linux" if not specified.' + required: false + default: '' + working_directory: + description: 'Working directory where the action will run.' + required: false + log_level: + description: 'Verbosity level (ERROR|WARN|INFO|DEBUG).' + default: 'INFO' + required: false + dry_run: + description: 'If true, simulate the action without side effects.' + default: false + required: false + +runs: + using: 'composite' + steps: + - name: Dispatch build-lvlibp-docker + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $args = @{ + MinimumSupportedLVVersion = '${{ inputs.minimum_supported_lv_version }}' + SupportedBitness = '${{ inputs.supported_bitness }}' + ProjectPath = '${{ inputs.project_path }}' + TargetName = '${{ inputs.target_name }}' + Major = [int]'${{ inputs.major }}' + Minor = [int]'${{ inputs.minor }}' + Patch = [int]'${{ inputs.patch }}' + Build = [int]'${{ inputs.build }}' + Commit = '${{ inputs.commit }}' + } + if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } + if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } + if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } + + $params = @{ + ActionName = 'build-lvlibp-docker' + ArgsJson = ($args | ConvertTo-Json -Compress) + LogLevel = '${{ inputs.log_level }}' + } + if ('${{ inputs.dry_run }}' -eq 'true') { $params['DryRun'] = $true } + if ('${{ inputs.working_directory }}') { $params['WorkingDirectory'] = '${{ inputs.working_directory }}' } + + & '${{ github.action_path }}/../actions/Invoke-OSAction.ps1' @params + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/ci_evidence.txt b/ci_evidence.txt index fc9503da..b67f49a4 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"18acf10f67c1d2e12a76f2b87e62cea85d1e5162","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"b0b84b174b2700771b02d3d4becd1e34d5b5fdb6","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index 1dbf753c..7ef560a5 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -194,6 +194,84 @@ } } }, + "Invoke-BuildLvlibpDocker": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "", + "description": "Docker image tag (defaults to \"2026q1-linux\")" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { diff --git a/docs/actions/build-lvlibp-docker.md b/docs/actions/build-lvlibp-docker.md new file mode 100644 index 00000000..89b958c4 --- /dev/null +++ b/docs/actions/build-lvlibp-docker.md @@ -0,0 +1,144 @@ +# build-lvlibp-docker + +## Purpose + +Builds LabVIEW Packed Project Library (.lvlibp) files using a LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata, then renames the resulting artifact with a standardized naming convention. + +Use this action when you need to build PPL files in containerized environments (CI/CD pipelines) without installing LabVIEW directly on the host system. + +## Parameters + +Common parameters are described in [Common parameters](../common-parameters.md). + +### Required + +- **MinimumSupportedLVVersion** (`string`): LabVIEW version for the build (e.g., `"2021"`, `"2023"`, `"2026"`). +- **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). +- **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. +- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). +- **Major** (`int`): Major version component for the PPL. +- **Minor** (`int`): Minor version component for the PPL. +- **Patch** (`int`): Patch version component for the PPL. +- **Build** (`int`): Build number component for the PPL. +- **Commit** (`string`): Commit hash or identifier recorded in the build. + +### Optional + +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. +- **ImageTag** (`string`): Docker image tag. Defaults to `"2026q1-linux"` if not specified. + +### GitHub Action inputs + +| Input | CLI parameter | Description | +| --- | --- | --- | +| `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | +| `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | +| `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | +| `target_name` | `TargetName` | Target that contains the build specification. | +| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | +| `major` | `Major` | Major version component. | +| `minor` | `Minor` | Minor version component. | +| `patch` | `Patch` | Patch version component. | +| `build` | `Build` | Build number component. | +| `commit` | `Commit` | Commit hash or identifier. | +| `docker_image` | `DockerImage` | Docker image name. | +| `image_tag` | `ImageTag` | Docker image tag. | +| `working_directory` | `WorkingDirectory` | Base directory for the action. | +| `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | +| `dry_run` | `DryRun` | If true, simulate without side effects. | + +## Examples + +### CLI + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker -ArgsJson '{ + "MinimumSupportedLVVersion": "2026", + "SupportedBitness": "64", + "ProjectPath": "lv_icon_editor.lvproj", + "TargetName": "My Computer", + "BuildSpecName": "Editor Packed Library", + "Major": 1, + "Minor": 0, + "Patch": 0, + "Build": 0, + "Commit": "abc1234", + "DockerImage": "nationalinstruments/labview", + "ImageTag": "2026q1-linux" +}' +``` + +### GitHub Action + +```yaml +- name: Build PPL with Docker + uses: owner/repo/build-lvlibp-docker@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: 'Editor Packed Library' + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} + docker_image: 'nationalinstruments/labview' + image_tag: '2026q1-linux' +``` + +### Build All Specifications + +```yaml +- name: Build All PPLs + uses: owner/repo/build-lvlibp-docker@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: '' # Empty - builds all specifications + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} +``` + +## Behavior + +1. Pulls the specified Docker image (e.g., `nationalinstruments/labview:2026q1-linux`) +2. Mounts the workspace directory into the container +3. Constructs the LabVIEWPath based on OS and version (e.g., `/usr/local/natinst/LabVIEW-2026-64/labview` on Linux) +4. Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters inside the container +5. On success, searches for `.lvlibp` files in the `builds` directory and renames them with version and commit metadata (e.g., `lv_icon_x64_v1.0.0.0+gabc1234.lvlibp`) +6. On failure, exits with the build error code + +## Return Codes + +- `0` – success +- non-zero – build failed or Docker operation failed + +## Requirements + +- Docker must be installed and running on the host system +- The specified Docker image must be available (pulled or cached) +- The LabVIEW project file must exist at the specified path +- LabVIEWCLI must be available in the Docker container +- The target and build specification must exist in the project + +## Platform Support + +This action supports both Linux and Windows Docker containers. The script automatically: + +- Detects the host OS using `$IsWindows`/`$IsLinux` +- Constructs appropriate volume mount paths (`C:\workspace` on Windows, `/workspace` on Linux) +- Builds the correct LabVIEWPath based on OS, version, and bitness + +## See also + +- [build-lvlibp](build-lvlibp.md) – Non-Docker PPL build action +- [build](build.md) – General LabVIEW build action +- [Architecture documentation](../architecture.md) diff --git a/docs/scripts/build-lvlibp-docker.md b/docs/scripts/build-lvlibp-docker.md new file mode 100644 index 00000000..40205d95 --- /dev/null +++ b/docs/scripts/build-lvlibp-docker.md @@ -0,0 +1,72 @@ +# Build Packed Library with Docker πŸ³πŸ“¦ + +Call **`BuildLvlibpDocker.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI inside a Docker container. + +## Inputs + +| Name | Required | Example | Description | +|------|----------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version to use. | +| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | +| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | +| `major` | **Yes** | `1` | Major version component. | +| `minor` | **Yes** | `0` | Minor version component. | +| `patch` | **Yes** | `0` | Patch version component. | +| `build` | **Yes** | `1` | Build number component. | +| `commit` | **Yes** | `abcdef` | Commit identifier. | +| `docker_image` | No | `nationalinstruments/labview` | Docker image name. | +| `image_tag` | No | `2026q1-linux` | Docker image tag. Defaults to `{version}q1-linux`. | + +## Quick-start + +The following example builds using LabVIEW 2026 inside a Docker container. + +```yaml +- uses: ./.github/actions/build-lvlibp-docker + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: Editor Packed Library + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} + docker_image: nationalinstruments/labview + image_tag: 2026q1-linux +``` + +## Build All Specifications + +Leave `build_spec_name` empty to build all build specifications under the target: + +```yaml +- uses: ./.github/actions/build-lvlibp-docker + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: '' + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} +``` + +## Requirements + +- Docker must be installed and running on the host system +- The specified Docker image must contain LabVIEWCLI +- The LabVIEW project file must exist at the specified path + +See also: [docs/actions/build-lvlibp-docker.md](../actions/build-lvlibp-docker.md) + +## License + +This directory inherits the root repository's license (MIT, unless otherwise noted). diff --git a/requirements.json b/requirements.json index a25a40cf..9b57e831 100644 --- a/requirements.json +++ b/requirements.json @@ -260,6 +260,13 @@ "SelfHosted.Workflow.Tests" ] }, + { + "id": "REQ-039", + "description": "Build LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata.", + "tests": [ + "BuildLvlibpDocker.Workflow.Tests" + ] + }, { "id": "REQIE-001", "description": "After checking out the LabVIEW icon editor repository, PreSequence: The sequencer shall enumerate and record the build matrix used by the workflow (LabVIEW versions and bitness). Acceptance: a 'matrix.json' file exists listing each tuple {\"lv-version\": \"2021\"|\"2023\", \"bitness\": \"32\"|\"64\"} with at least [ [\"2021\",\"32\"], [\"2021\",\"64\"], [\"2023\",\"64\"] ]. g-cli is expected at 'C:\\Program Files\\G-CLI\\bin\\g-cli.exe'.", diff --git a/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 b/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 new file mode 100644 index 00000000..df96912a --- /dev/null +++ b/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 @@ -0,0 +1,195 @@ +<# +.SYNOPSIS + Builds the LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container. + +.DESCRIPTION + Executes LabVIEW build specification through g-cli inside a Docker container, + embedding the provided version information and commit identifier. + +.PARAMETER MinimumSupportedLVVersion + LabVIEW version used for the build (e.g., "2021", "2023"). + +.PARAMETER SupportedBitness + Bitness of the LabVIEW environment ("32" or "64"). + +.PARAMETER TargetName + Target that contains the build specification. + +.PARAMETER ProjectPath + Path to the LabVIEW project .lvproj file that contains the build specification. + +.PARAMETER BuildSpec + Name of the LabVIEW build specification to execute. If empty, execute all build specifications in the target. + +.PARAMETER Major + Major version component for the PPL. + +.PARAMETER Minor + Minor version component for the PPL. + +.PARAMETER Patch + Patch version component for the PPL. + +.PARAMETER Build + Build number component for the PPL. + +.PARAMETER Commit + Commit hash or identifier recorded in the build. + +.PARAMETER DockerImage + Docker image name (e.g., "nationalinstruments/labview"). + +.PARAMETER ImageTag + Docker image tag. Defaults to MinimumSupportedLVVersion if not specified. + +.EXAMPLE + .\BuildLvlibpDocker.ps1 -MinimumSupportedLVVersion "2026q1-linux" -SupportedBitness "64" -RelativePath "." -BuildSpec "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" -DockerImage "nationalinstruments/labview" + +.NOTES + [REQ-039] Build LabVIEW Packed Project Library using Docker container +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$MinimumSupportedLVVersion, + + [Parameter(Mandatory = $true)] + [string]$SupportedBitness, + + [Parameter(Mandatory = $true)] + [string]$RelativePath, + + [Parameter(Mandatory = $true)] + [string]$BuildSpecName, + + [Parameter(Mandatory = $true)] + [int]$Major, + + [Parameter(Mandatory = $true)] + [int]$Minor, + + [Parameter(Mandatory = $true)] + [int]$Patch, + + [Parameter(Mandatory = $true)] + [int]$Build, + + [Parameter(Mandatory = $true)] + [string]$Commit, + + [Parameter(Mandatory = $false)] + [string]$DockerImage = "nationalinstruments/labview", + + [Parameter(Mandatory = $false)] + [string]$ImageTag = "2026q1-linux" +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +try { + Write-Verbose "Building PPL with Docker container" + Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue + Write-Information "Commit: $Commit" -InformationAction Continue + + $fullImage = "${DockerImage}:${ImageTag}" + Write-Information "Docker Image: $fullImage" -InformationAction Continue + + # Pull Docker image + Write-Information "Pulling Docker image..." -InformationAction Continue + docker pull $fullImage + if ($LASTEXITCODE -ne 0) { + throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" + } + + $labviewPath = if ($IsWindows) { + if ($SupportedBitness -eq '32') { + "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } else { + "C:\Program Files\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } + } else { + "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" + } + + Write-Verbose "LabVIEWPath: $labviewPath" + + # Determine volume mount syntax based on OS + $workspaceMount = if ($IsWindows) { + "${PWD}:C:\workspace" + } else { + "${PWD}:/workspace" + } + + $containerWorkDir = if ($IsWindows) { + "C:\workspace" + } else { + "/workspace" + } + + $containerProjectPath = if ($IsWindows) { + "C:\workspace\$ProjectPath" + } else { + "/workspace/$ProjectPath" + } + + $cliArgs = @( + "-OperationName ExecuteBuildSpec" + "-LabVIEWPath `"$labviewPath`"" + "-ProjectPath `"$containerProjectPath`"" + "-TargetName `"$TargetName`"" + ) + + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + $cliArgs += "-BuildSpecName `"$BuildSpecName`"" + } + $cliArgs += "-Version `"$Major.$Minor.$Patch.$Build`"" + + # Construct LabVIEWCLI command + $labviewCLICommand = "LabVIEWCLI $($cliArgs -join ' ')" + + Write-Information "Executing LabVIEWCLI in Docker container..." -InformationAction Continue + Write-Verbose "Command: $labviewCLICommand" + + # Run build in container + docker run --rm ` + -v $workspaceMount ` + -w $containerWorkDir ` + $fullImage ` + bash -c $labviewCLICommand + + $buildExitCode = $LASTEXITCODE + Write-Information "Build exit code: $buildExitCode" -InformationAction Continue + + if ($buildExitCode -ne 0) { + throw "Build failed with exit code $buildExitCode" + } + + # Rename PPL with version and commit metadata + Write-Information "Renaming PPL artifact..." -InformationAction Continue + Write-Information "Renaming PPL artifact..." -InformationAction Continue + $shortCommit = if ($Commit.Length -ge 7) { $Commit.Substring(0, 7) } else { $Commit } + $bitnessTag = if ($SupportedBitness -eq '32') { 'x86' } else { 'x64' } + $versionTag = "v$Major.$Minor.$Patch.$Build+g$shortCommit" + + $buildOutputs = Get-ChildItem -Path . -Filter "*.lvlibp" -Recurse | Where-Object { $_.Directory.Name -eq 'builds' } + + if ($buildOutputs) { + foreach ($ppl in $buildOutputs) { + $baseName = [System.IO.Path]::GetFileNameWithoutExtension($ppl.Name) + $newName = "${baseName}_${bitnessTag}_$versionTag.lvlibp" + Rename-Item -Path $ppl.FullName -NewName $newName + Write-Information "Renamed LVLIBP to '$newName'" -InformationAction Continue + } + } else { + Write-Warning "No .lvlibp files found in builds directory." + } + + Write-Information "Build succeeded" -InformationAction Continue + exit 0 +} +catch { + Write-Error "BuildLvlibpDocker failed: $_" + exit 1 +} \ No newline at end of file diff --git a/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 new file mode 100644 index 00000000..e2e63af7 --- /dev/null +++ b/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 @@ -0,0 +1,72 @@ +#requires -Version 7.0 +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Describe 'BuildLvlibpDocker.Workflow' { + $meta = @{ + requirement = 'REQ-039' + Owner = 'NI' + Evidence = 'tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1' + } + + BeforeAll { + $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path + Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force + } + + It 'validates build-lvlibp-docker action exists in dispatcher registry [REQ-039]' -Tag 'REQ-039' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $dispatchers.'build-lvlibp-docker' | Should -Not -BeNullOrEmpty + $dispatchers.'build-lvlibp-docker'.function | Should -Be 'Invoke-BuildLvlibpDocker' + } + + It 'validates required parameters are defined [REQ-039]' -Tag 'REQ-039' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-docker' + $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty + $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty + $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.Major | Should -Not -BeNullOrEmpty + $action.parameters.Minor | Should -Not -BeNullOrEmpty + $action.parameters.Patch | Should -Not -BeNullOrEmpty + $action.parameters.Build | Should -Not -BeNullOrEmpty + $action.parameters.Commit | Should -Not -BeNullOrEmpty + } + + It 'executes dry-run without errors [REQ-039]' -Tag 'REQ-039' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates module function throws when required parameters are missing [REQ-039]' -Tag 'REQ-039' { + { Invoke-BuildLvlibpDocker } | Should -Throw + } + + It 'accepts optional parameters in dry-run [REQ-039]' -Tag 'REQ-039' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates action.yml exists [REQ-039]' -Tag 'REQ-039' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-docker' 'action.yml' + Test-Path $actionPath | Should -Be $true + } + + It 'validates implementation script exists [REQ-039]' -Tag 'REQ-039' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker' 'BuildLvlibpDocker.ps1' + Test-Path $scriptPath | Should -Be $true + } +} \ No newline at end of file From bf9f54f3d5b9c6acb22c95388f9b7624697936fb Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Fri, 6 Mar 2026 23:38:30 +0530 Subject: [PATCH 02/49] Add build-lvlibp-docker-linux action [REQ-039] --- actions/OpenSourceActions.psd1 | 2 +- actions/OpenSourceActions.psm1 | 10 +- build-lvlibp-docker-linux/action.yml | 86 +++++++++ dispatchers.json | 6 +- docs/actions/build-lvlibp-docker.md | 144 -------------- docs/scripts/build-lvlibp-docker.md | 72 ------- requirements.json | 4 +- .../BuildLvlibpDockerLinux.ps1 | 180 ++++++++++++++++++ .../build-lvlibp-docker-linux/build-lvlibp.sh | 77 ++++++++ .../BuildLvlibpDockerLinux.Workflow.Tests.ps1 | 72 +++++++ 10 files changed, 426 insertions(+), 227 deletions(-) create mode 100644 build-lvlibp-docker-linux/action.yml delete mode 100644 docs/actions/build-lvlibp-docker.md delete mode 100644 docs/scripts/build-lvlibp-docker.md create mode 100644 scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 create mode 100644 scripts/build-lvlibp-docker-linux/build-lvlibp.sh create mode 100644 tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 diff --git a/actions/OpenSourceActions.psd1 b/actions/OpenSourceActions.psd1 index 475c7141..b51de7e2 100644 --- a/actions/OpenSourceActions.psd1 +++ b/actions/OpenSourceActions.psd1 @@ -14,7 +14,7 @@ 'Invoke-ApplyVIPC' 'Invoke-Build' 'Invoke-BuildLvlibp' - 'Invoke-BuildLvlibpDocker' + 'Invoke-BuildLvlibpDockerLinux' 'Invoke-BuildViPackage' 'Invoke-CloseLabVIEW' 'Invoke-GenerateReleaseNotes' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 7c4fa893..49eb885e 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -228,7 +228,7 @@ function Invoke-BuildLvlibp { return Invoke-OpenSourceActionScript -ScriptSegments @('build-lvlibp','Build_lvlibp.ps1') -Arguments $args -DryRun:$DryRun -gcliPath $gcliPath } -# Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. +# Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. # MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). # SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). # ProjectPath: Path to the LabVIEW project .lvproj file. @@ -243,7 +243,7 @@ function Invoke-BuildLvlibp { # ImageTag: Docker image tag (defaults to "2026q1-linux"). # DryRun: If set, prints the command instead of executing it. # gcliPath: Optional path prepended to PATH for locating the g CLI. -function Invoke-BuildLvlibpDocker { +function Invoke-BuildLvlibpDockerLinux { [CmdletBinding()] param( [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, @@ -257,14 +257,14 @@ function Invoke-BuildLvlibpDocker { [Parameter(Mandatory)] [int] $Build, [Parameter(Mandatory)] [string] $Commit, [Parameter()] [string] $DockerImage = "nationalinstruments/labview", - [Parameter()] [string] $ImageTag = "", + [Parameter()] [string] $ImageTag = "2026q1-linux", [switch] $DryRun, [string] $gcliPath ) - Write-Information "Invoking BuildLvlibpDocker" -InformationAction Continue + Write-Information "Invoking BuildLvlibpDockerLinux" -InformationAction Continue $result = Invoke-OpenSourceActionScript ` - -ScriptSegments @('build-lvlibp-docker', 'BuildLvlibpDocker.ps1') ` + -ScriptSegments @('build-lvlibp-docker-linux', 'BuildLvlibpDockerLinux.ps1') ` -Arguments @{ MinimumSupportedLVVersion = $MinimumSupportedLVVersion SupportedBitness = $SupportedBitness diff --git a/build-lvlibp-docker-linux/action.yml b/build-lvlibp-docker-linux/action.yml new file mode 100644 index 00000000..6b272086 --- /dev/null +++ b/build-lvlibp-docker-linux/action.yml @@ -0,0 +1,86 @@ +name: 'Build LVLIBP Docker Linux' +description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container' +inputs: + minimum_supported_lv_version: + description: 'LabVIEW version year for the build (e.g., "2021", "2026").' + required: true + supported_bitness: + description: 'Bitness of the LabVIEW environment ("32" or "64").' + required: true + project_path: + description: 'Path to the LabVIEW project .lvproj file.' + required: true + target_name: + description: 'Target that contains the build specification.' + required: true + build_spec_name: + description: 'Name of the build specification. If empty, builds all specifications in the target.' + required: false + default: '' + major: + description: 'Major version component for the PPL.' + required: true + minor: + description: 'Minor version component for the PPL.' + required: true + patch: + description: 'Patch version component for the PPL.' + required: true + build: + description: 'Build number component for the PPL.' + required: true + commit: + description: 'Commit hash or identifier recorded in the build.' + required: true + docker_image: + description: 'Docker image name.' + required: false + default: 'nationalinstruments/labview' + image_tag: + description: 'Docker image tag.' + required: false + default: '2026q1-linux' + working_directory: + description: 'Working directory where the action will run.' + required: false + log_level: + description: 'Verbosity level (ERROR|WARN|INFO|DEBUG).' + default: 'INFO' + required: false + dry_run: + description: 'If true, simulate the action without side effects.' + default: false + required: false + +runs: + using: 'composite' + steps: + - name: Dispatch build-lvlibp-docker-linux + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $args = @{ + MinimumSupportedLVVersion = '${{ inputs.minimum_supported_lv_version }}' + SupportedBitness = '${{ inputs.supported_bitness }}' + ProjectPath = '${{ inputs.project_path }}' + TargetName = '${{ inputs.target_name }}' + Major = [int]'${{ inputs.major }}' + Minor = [int]'${{ inputs.minor }}' + Patch = [int]'${{ inputs.patch }}' + Build = [int]'${{ inputs.build }}' + Commit = '${{ inputs.commit }}' + } + if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } + if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } + if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } + + $params = @{ + ActionName = 'build-lvlibp-docker-linux' + ArgsJson = ($args | ConvertTo-Json -Compress) + LogLevel = '${{ inputs.log_level }}' + } + if ('${{ inputs.dry_run }}' -eq 'true') { $params['DryRun'] = $true } + if ('${{ inputs.working_directory }}') { $params['WorkingDirectory'] = '${{ inputs.working_directory }}' } + + & '${{ github.action_path }}/../actions/Invoke-OSAction.ps1' @params + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index 7ef560a5..d3a5b1b0 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -194,8 +194,8 @@ } } }, - "Invoke-BuildLvlibpDocker": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "Invoke-BuildLvlibpDockerLinux": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", @@ -232,7 +232,7 @@ "ImageTag": { "type": "string", "required": false, - "default": "", + "default": "2026q1-linux", "description": "Docker image tag (defaults to \"2026q1-linux\")" }, "Major": { diff --git a/docs/actions/build-lvlibp-docker.md b/docs/actions/build-lvlibp-docker.md deleted file mode 100644 index 89b958c4..00000000 --- a/docs/actions/build-lvlibp-docker.md +++ /dev/null @@ -1,144 +0,0 @@ -# build-lvlibp-docker - -## Purpose - -Builds LabVIEW Packed Project Library (.lvlibp) files using a LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata, then renames the resulting artifact with a standardized naming convention. - -Use this action when you need to build PPL files in containerized environments (CI/CD pipelines) without installing LabVIEW directly on the host system. - -## Parameters - -Common parameters are described in [Common parameters](../common-parameters.md). - -### Required - -- **MinimumSupportedLVVersion** (`string`): LabVIEW version for the build (e.g., `"2021"`, `"2023"`, `"2026"`). -- **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). -- **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. -- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). -- **Major** (`int`): Major version component for the PPL. -- **Minor** (`int`): Minor version component for the PPL. -- **Patch** (`int`): Patch version component for the PPL. -- **Build** (`int`): Build number component for the PPL. -- **Commit** (`string`): Commit hash or identifier recorded in the build. - -### Optional - -- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. -- **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. -- **ImageTag** (`string`): Docker image tag. Defaults to `"2026q1-linux"` if not specified. - -### GitHub Action inputs - -| Input | CLI parameter | Description | -| --- | --- | --- | -| `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | -| `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | -| `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | -| `target_name` | `TargetName` | Target that contains the build specification. | -| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | -| `major` | `Major` | Major version component. | -| `minor` | `Minor` | Minor version component. | -| `patch` | `Patch` | Patch version component. | -| `build` | `Build` | Build number component. | -| `commit` | `Commit` | Commit hash or identifier. | -| `docker_image` | `DockerImage` | Docker image name. | -| `image_tag` | `ImageTag` | Docker image tag. | -| `working_directory` | `WorkingDirectory` | Base directory for the action. | -| `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | -| `dry_run` | `DryRun` | If true, simulate without side effects. | - -## Examples - -### CLI - -```powershell -pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker -ArgsJson '{ - "MinimumSupportedLVVersion": "2026", - "SupportedBitness": "64", - "ProjectPath": "lv_icon_editor.lvproj", - "TargetName": "My Computer", - "BuildSpecName": "Editor Packed Library", - "Major": 1, - "Minor": 0, - "Patch": 0, - "Build": 0, - "Commit": "abc1234", - "DockerImage": "nationalinstruments/labview", - "ImageTag": "2026q1-linux" -}' -``` - -### GitHub Action - -```yaml -- name: Build PPL with Docker - uses: owner/repo/build-lvlibp-docker@v1 - with: - minimum_supported_lv_version: '2026' - supported_bitness: '64' - project_path: 'lv_icon_editor.lvproj' - target_name: 'My Computer' - build_spec_name: 'Editor Packed Library' - major: 1 - minor: 0 - patch: 0 - build: 0 - commit: ${{ github.sha }} - docker_image: 'nationalinstruments/labview' - image_tag: '2026q1-linux' -``` - -### Build All Specifications - -```yaml -- name: Build All PPLs - uses: owner/repo/build-lvlibp-docker@v1 - with: - minimum_supported_lv_version: '2026' - supported_bitness: '64' - project_path: 'lv_icon_editor.lvproj' - target_name: 'My Computer' - build_spec_name: '' # Empty - builds all specifications - major: 1 - minor: 0 - patch: 0 - build: 0 - commit: ${{ github.sha }} -``` - -## Behavior - -1. Pulls the specified Docker image (e.g., `nationalinstruments/labview:2026q1-linux`) -2. Mounts the workspace directory into the container -3. Constructs the LabVIEWPath based on OS and version (e.g., `/usr/local/natinst/LabVIEW-2026-64/labview` on Linux) -4. Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters inside the container -5. On success, searches for `.lvlibp` files in the `builds` directory and renames them with version and commit metadata (e.g., `lv_icon_x64_v1.0.0.0+gabc1234.lvlibp`) -6. On failure, exits with the build error code - -## Return Codes - -- `0` – success -- non-zero – build failed or Docker operation failed - -## Requirements - -- Docker must be installed and running on the host system -- The specified Docker image must be available (pulled or cached) -- The LabVIEW project file must exist at the specified path -- LabVIEWCLI must be available in the Docker container -- The target and build specification must exist in the project - -## Platform Support - -This action supports both Linux and Windows Docker containers. The script automatically: - -- Detects the host OS using `$IsWindows`/`$IsLinux` -- Constructs appropriate volume mount paths (`C:\workspace` on Windows, `/workspace` on Linux) -- Builds the correct LabVIEWPath based on OS, version, and bitness - -## See also - -- [build-lvlibp](build-lvlibp.md) – Non-Docker PPL build action -- [build](build.md) – General LabVIEW build action -- [Architecture documentation](../architecture.md) diff --git a/docs/scripts/build-lvlibp-docker.md b/docs/scripts/build-lvlibp-docker.md deleted file mode 100644 index 40205d95..00000000 --- a/docs/scripts/build-lvlibp-docker.md +++ /dev/null @@ -1,72 +0,0 @@ -# Build Packed Library with Docker πŸ³πŸ“¦ - -Call **`BuildLvlibpDocker.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI inside a Docker container. - -## Inputs - -| Name | Required | Example | Description | -|------|----------|---------|-------------| -| `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version to use. | -| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | -| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | -| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | -| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | -| `major` | **Yes** | `1` | Major version component. | -| `minor` | **Yes** | `0` | Minor version component. | -| `patch` | **Yes** | `0` | Patch version component. | -| `build` | **Yes** | `1` | Build number component. | -| `commit` | **Yes** | `abcdef` | Commit identifier. | -| `docker_image` | No | `nationalinstruments/labview` | Docker image name. | -| `image_tag` | No | `2026q1-linux` | Docker image tag. Defaults to `{version}q1-linux`. | - -## Quick-start - -The following example builds using LabVIEW 2026 inside a Docker container. - -```yaml -- uses: ./.github/actions/build-lvlibp-docker - with: - minimum_supported_lv_version: 2026 - supported_bitness: 64 - project_path: lv_icon_editor.lvproj - target_name: My Computer - build_spec_name: Editor Packed Library - major: 1 - minor: 0 - patch: 0 - build: 1 - commit: ${{ github.sha }} - docker_image: nationalinstruments/labview - image_tag: 2026q1-linux -``` - -## Build All Specifications - -Leave `build_spec_name` empty to build all build specifications under the target: - -```yaml -- uses: ./.github/actions/build-lvlibp-docker - with: - minimum_supported_lv_version: 2026 - supported_bitness: 64 - project_path: lv_icon_editor.lvproj - target_name: My Computer - build_spec_name: '' - major: 1 - minor: 0 - patch: 0 - build: 1 - commit: ${{ github.sha }} -``` - -## Requirements - -- Docker must be installed and running on the host system -- The specified Docker image must contain LabVIEWCLI -- The LabVIEW project file must exist at the specified path - -See also: [docs/actions/build-lvlibp-docker.md](../actions/build-lvlibp-docker.md) - -## License - -This directory inherits the root repository's license (MIT, unless otherwise noted). diff --git a/requirements.json b/requirements.json index 9b57e831..fde71e46 100644 --- a/requirements.json +++ b/requirements.json @@ -262,9 +262,9 @@ }, { "id": "REQ-039", - "description": "Build LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata.", + "description": "Build LabVIEW Packed Project Library (.lvlibp) using Linux LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata.", "tests": [ - "BuildLvlibpDocker.Workflow.Tests" + "BuildLvlibpDockerLinux.Workflow.Tests" ] }, { diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 new file mode 100644 index 00000000..40550d3c --- /dev/null +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -0,0 +1,180 @@ +<# +.SYNOPSIS + Builds the LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container. + +.DESCRIPTION + Executes LabVIEW build specification through g-cli inside a Docker container, + embedding the provided version information and commit identifier. + +.PARAMETER MinimumSupportedLVVersion + LabVIEW version used for the build (e.g., "2021", "2023"). + +.PARAMETER SupportedBitness + Bitness of the LabVIEW environment ("32" or "64"). + +.PARAMETER TargetName + Target that contains the build specification. + +.PARAMETER ProjectPath + Path to the LabVIEW project .lvproj file that contains the build specification. + +.PARAMETER BuildSpec + Name of the LabVIEW build specification to execute. If empty, execute all build specifications in the target. + +.PARAMETER Major + Major version component for the PPL. + +.PARAMETER Minor + Minor version component for the PPL. + +.PARAMETER Patch + Patch version component for the PPL. + +.PARAMETER Build + Build number component for the PPL. + +.PARAMETER Commit + Commit hash or identifier recorded in the build. + +.PARAMETER DockerImage + Docker image name (e.g., "nationalinstruments/labview"). + +.PARAMETER ImageTag + Docker image tag. Defaults to MinimumSupportedLVVersion if not specified. + +.EXAMPLE + .\BuildLvlibpDocker.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -RelativePath "." -BuildSpec "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" -DockerImage "nationalinstruments/labview" + +.NOTES + [REQ-039] Build LabVIEW Packed Project Library using Docker container +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$MinimumSupportedLVVersion, + + [Parameter(Mandatory = $true)] + [string]$SupportedBitness, + + [Parameter(Mandatory = $true)] + [string]$RelativePath, + + [Parameter(Mandatory = $true)] + [string]$BuildSpecName, + + [Parameter(Mandatory = $true)] + [int]$Major, + + [Parameter(Mandatory = $true)] + [int]$Minor, + + [Parameter(Mandatory = $true)] + [int]$Patch, + + [Parameter(Mandatory = $true)] + [int]$Build, + + [Parameter(Mandatory = $true)] + [string]$Commit, + + [Parameter(Mandatory = $false)] + [string]$DockerImage = "nationalinstruments/labview", + + [Parameter(Mandatory = $false)] + [string]$ImageTag = "2026q1-linux" +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +try { + Write-Verbose "Building PPL with Docker container" + Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue + Write-Information "Commit: $Commit" -InformationAction Continue + + $fullImage = "${DockerImage}:${ImageTag}" + Write-Information "Docker Image: $fullImage" -InformationAction Continue + + # Pull Docker image + Write-Information "Pulling Docker image..." -InformationAction Continue + docker pull $fullImage + if ($LASTEXITCODE -ne 0) { + throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" + } + + $scriptDir = $PSScriptRoot + $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' + + if (-not (Test-Path $buildScript)) { + throw "Build script not found: $buildScript" + } + + # Construct LabVIEWPath for Linux container + $labviewPath = "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" + Write-Verbose "LabVIEWPath: $labviewPath" + + $containerProjectPath = "/workspace/$ProjectPath" + $containerScriptPath = "/tmp/build-lvlibp.sh" + + $versionString = "$Major.$Minor.$Patch.$Build" + + # Construct bash command arguments + $bashArgs = @( + "--labview-path", "'$labviewPath'" + "--project-path", "'$containerProjectPath'" + "--target-name", "'$TargetName'" + "--version", "'$versionString'" + ) + + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + $bashArgs += "--build-spec-name", "'$BuildSpecName'" + } + + $bashCommand = "chmod +x $containerScriptPath && $containerScriptPath $($bashArgs -join ' ')" + + Write-Information "Executing build script in Docker container..." -InformationAction Continue + Write-Verbose "Command: bash -c `"$bashCommand`"" + + # Run build in container + docker run --rm ` + -v "${PWD}:/workspace" ` + -v "${buildScript}:${containerScriptPath}" ` + $fullImage ` + bash -c $bashCommand + + $buildExitCode = $LASTEXITCODE + Write-Information "Build exit code: $buildExitCode" -InformationAction Continue + + if ($buildExitCode -ne 0) { + throw "Build failed with exit code $buildExitCode" + } + + # Rename PPL with version and commit metadata + Write-Information "Renaming PPL artifact..." -InformationAction Continue + $shortCommit = if ($Commit.Length -ge 7) { $Commit.Substring(0, 7) } else { $Commit } + $bitnessTag = if ($SupportedBitness -eq '32') { 'x86' } else { 'x64' } + $versionTag = "v$Major.$Minor.$Patch.$Build+g$shortCommit" + + # Search for .lvlibp files in common build output locations + $buildOutputs = Get-ChildItem -Path . -Filter "*.lvlibp" -Recurse -ErrorAction SilentlyContinue | + Where-Object { $_.Directory.Name -eq 'builds' } + + if ($buildOutputs) { + foreach ($ppl in $buildOutputs) { + $baseName = [System.IO.Path]::GetFileNameWithoutExtension($ppl.Name) + $newName = "${baseName}_${bitnessTag}_$versionTag.lvlibp" + Rename-Item -Path $ppl.FullName -NewName $newName + Write-Information "Renamed LVLIBP to '$newName'" -InformationAction Continue + } + } else { + Write-Warning "No .lvlibp files found in builds directory." + } + + Write-Information "Build succeeded" -InformationAction Continue + exit 0 +} +catch { + Write-Error "BuildLvlibpDocker failed: $_" + exit 1 +} \ No newline at end of file diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh new file mode 100644 index 00000000..5aeea0ec --- /dev/null +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# Build LabVIEW Packed Project Library using LabVIEWCLI +# [REQ-039] Build LVLIBP using Docker container + +set -euo pipefail + +# Parse arguments +LABVIEW_PATH="" +PROJECT_PATH="" +TARGET_NAME="" +BUILD_SPEC_NAME="" +VERSION="" + +while [[ $# -gt 0 ]]; do + case $1 in + --labview-path) + LABVIEW_PATH="$2" + shift 2 + ;; + --project-path) + PROJECT_PATH="$2" + shift 2 + ;; + --target-name) + TARGET_NAME="$2" + shift 2 + ;; + --build-spec-name) + BUILD_SPEC_NAME="$2" + shift 2 + ;; + --version) + VERSION="$2" + shift 2 + ;; + *) + echo "Unknown argument: $1" + exit 1 + ;; + esac +done + +# Validate required arguments +if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]] || [[ -z "$VERSION" ]]; then + echo "Error: Missing required arguments" + echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ] --version " + exit 1 +fi + +echo "Building LabVIEW Packed Project Library..." +echo "LabVIEW: $LABVIEW_PATH" +echo "Project: $PROJECT_PATH" +echo "Target: $TARGET_NAME" +echo "Build Spec: ${BUILD_SPEC_NAME:-}" +echo "Version: $VERSION" + +# Construct LabVIEWCLI command +CLI_ARGS=( + "-OperationName" "ExecuteBuildSpec" + "-LabVIEWPath" "$LABVIEW_PATH" + "-ProjectPath" "$PROJECT_PATH" + "-TargetName" "$TARGET_NAME" +) + +if [[ -n "$BUILD_SPEC_NAME" ]]; then + CLI_ARGS+=("-BuildSpecName" "$BUILD_SPEC_NAME") +fi + +CLI_ARGS+=("-Version" "$VERSION") + +# Execute LabVIEWCLI +echo "Executing: LabVIEWCLI ${CLI_ARGS[*]}" +LabVIEWCLI "${CLI_ARGS[@]}" + +EXIT_CODE=$? +echo "Build exit code: $EXIT_CODE" +exit $EXIT_CODE \ No newline at end of file diff --git a/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 new file mode 100644 index 00000000..b4ef4c97 --- /dev/null +++ b/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 @@ -0,0 +1,72 @@ +#requires -Version 7.0 +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Describe 'BuildLvlibpDockerLinux.Workflow' { + $meta = @{ + requirement = 'REQ-039' + Owner = 'NI' + Evidence = 'tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1' + } + + BeforeAll { + $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path + Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force + } + + It 'validates build-lvlibp-docker-linux action exists in dispatcher registry [REQ-039]' -Tag 'REQ-039' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $dispatchers.'build-lvlibp-docker-linux' | Should -Not -BeNullOrEmpty + $dispatchers.'build-lvlibp-docker-linux'.function | Should -Be 'Invoke-BuildLvlibpDockerLinux' + } + + It 'validates required parameters are defined [REQ-039]' -Tag 'REQ-039' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-docker-linux' + $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty + $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty + $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.Major | Should -Not -BeNullOrEmpty + $action.parameters.Minor | Should -Not -BeNullOrEmpty + $action.parameters.Patch | Should -Not -BeNullOrEmpty + $action.parameters.Build | Should -Not -BeNullOrEmpty + $action.parameters.Commit | Should -Not -BeNullOrEmpty + } + + It 'executes dry-run without errors [REQ-039]' -Tag 'REQ-039' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-linux' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates module function throws when required parameters are missing [REQ-039]' -Tag 'REQ-039' { + { Invoke-BuildLvlibpDockerLinux } | Should -Throw + } + + It 'accepts optional parameters in dry-run [REQ-039]' -Tag 'REQ-039' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-linux' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates action.yml exists [REQ-039]' -Tag 'REQ-039' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-linux' 'action.yml' + Test-Path $actionPath | Should -Be $true + } + + It 'validates implementation script exists [REQ-039]' -Tag 'REQ-039' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-linux' 'BuildLvlibpDockerLinux.ps1' + Test-Path $scriptPath | Should -Be $true + } +} \ No newline at end of file From 5f04f0e12a8d7ee41e2e3941bfbab6d886aac8dc Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Fri, 6 Mar 2026 23:41:27 +0530 Subject: [PATCH 03/49] Added docs for build-lvlibp-docker-linux [REQ-039] --- docs/actions/build-lvlibp-docker-linux.md | 137 ++++++++++++++++++++++ docs/scripts/build-lvlibp-docker-linux.md | 72 ++++++++++++ 2 files changed, 209 insertions(+) create mode 100644 docs/actions/build-lvlibp-docker-linux.md create mode 100644 docs/scripts/build-lvlibp-docker-linux.md diff --git a/docs/actions/build-lvlibp-docker-linux.md b/docs/actions/build-lvlibp-docker-linux.md new file mode 100644 index 00000000..0b790029 --- /dev/null +++ b/docs/actions/build-lvlibp-docker-linux.md @@ -0,0 +1,137 @@ +# build-lvlibp-docker-linux + +## Purpose + +Builds LabVIEW Packed Project Library (.lvlibp) files using a Linux LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata, then renames the resulting artifact with a standardized naming convention. + +Use this action when you need to build PPL files in containerized Linux environments (CI/CD pipelines) without installing LabVIEW directly on the host system. + +## Parameters + +Common parameters are described in [Common parameters](../common-parameters.md). + +### Required + +- **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2026"`). +- **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). +- **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. +- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). +- **Major** (`int`): Major version component for the PPL. +- **Minor** (`int`): Minor version component for the PPL. +- **Patch** (`int`): Patch version component for the PPL. +- **Build** (`int`): Build number component for the PPL. +- **Commit** (`string`): Commit hash or identifier recorded in the build. + +### Optional + +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. +- **ImageTag** (`string`): Docker image tag. Default: `"2026q1-linux"`. + +### GitHub Action inputs + +| Input | CLI parameter | Description | +| --- | --- | --- | +| `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | +| `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | +| `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | +| `target_name` | `TargetName` | Target that contains the build specification. | +| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | +| `major` | `Major` | Major version component. | +| `minor` | `Minor` | Minor version component. | +| `patch` | `Patch` | Patch version component. | +| `build` | `Build` | Build number component. | +| `commit` | `Commit` | Commit hash or identifier. | +| `docker_image` | `DockerImage` | Docker image name. | +| `image_tag` | `ImageTag` | Docker image tag. | +| `working_directory` | `WorkingDirectory` | Base directory for the action. | +| `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | +| `dry_run` | `DryRun` | If true, simulate without side effects. | + +## Examples + +### CLI + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-linux -ArgsJson '{ + "MinimumSupportedLVVersion": "2026", + "SupportedBitness": "64", + "ProjectPath": "lv_icon_editor.lvproj", + "TargetName": "My Computer", + "BuildSpecName": "Editor Packed Library", + "Major": 1, + "Minor": 0, + "Patch": 0, + "Build": 0, + "Commit": "abc1234", + "DockerImage": "nationalinstruments/labview", + "ImageTag": "2026q1-linux" +}' +``` + +### GitHub Action + +```yaml +- name: Build PPL with Linux Docker + uses: ni/open-source/build-lvlibp-docker-linux@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: 'Editor Packed Library' + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} + docker_image: 'nationalinstruments/labview' + image_tag: '2026q1-linux' +``` + +### Build All Specifications + +```yaml +- name: Build All PPLs + uses: ni/open-source/build-lvlibp-docker-linux@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: '' # Empty - builds all specifications + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} +``` + +## Behavior + +1. Pulls the specified Linux Docker image (e.g., `nationalinstruments/labview:2026q1-linux`) +2. Mounts the workspace directory into the container at `/workspace` +3. Mounts the bash build script into the container at `/tmp/build-lvlibp.sh` +4. Constructs the LabVIEWPath (`/usr/local/natinst/LabVIEW-{version}-{bitness}/labview`) +5. Executes the bash script which runs `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters +6. On success, searches for `.lvlibp` files in the `builds` directory and renames them with version and commit metadata (e.g., `lv_icon_x64_v1.0.0.0+gabc1234.lvlibp`) +7. On failure, exits with the build error code + +## Return Codes + +- `0` – success +- non-zero – build failed or Docker operation failed + +## Requirements + +- Docker must be installed and running on the host system +- The specified Linux Docker image must be available (pulled or cached) +- The LabVIEW project file must exist at the specified path +- LabVIEWCLI must be available in the Docker container +- The target and build specification must exist in the project + +## See also + +- [build-lvlibp](build-lvlibp.md) – Non-Docker PPL build action +- [build](build.md) – General LabVIEW build action +- [Architecture documentation](../architecture.md) diff --git a/docs/scripts/build-lvlibp-docker-linux.md b/docs/scripts/build-lvlibp-docker-linux.md new file mode 100644 index 00000000..b29c41cf --- /dev/null +++ b/docs/scripts/build-lvlibp-docker-linux.md @@ -0,0 +1,72 @@ +# Build Packed Library with Docker Linux πŸ³πŸ“¦ + +Call **`BuildLvlibpDockerLinux.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI inside a Linux Docker container. + +## Inputs + +| Name | Required | Example | Description | +|------|----------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version year to use. | +| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | +| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | +| `major` | **Yes** | `1` | Major version component. | +| `minor` | **Yes** | `0` | Minor version component. | +| `patch` | **Yes** | `0` | Patch version component. | +| `build` | **Yes** | `1` | Build number component. | +| `commit` | **Yes** | `abcdef` | Commit identifier. | +| `docker_image` | No | `nationalinstruments/labview` | Docker image name. | +| `image_tag` | No | `2026q1-linux` | Docker image tag. | + +## Quick-start + +The following example builds using LabVIEW 2026 inside a Linux Docker container. + +```yaml +- uses: ./.github/actions/build-lvlibp-docker-linux + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: Editor Packed Library + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} + docker_image: nationalinstruments/labview + image_tag: 2026q1-linux +``` + +## Build All Specifications + +Leave `build_spec_name` empty to build all build specifications under the target: + +```yaml +- uses: ./.github/actions/build-lvlibp-docker-linux + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: '' + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} +``` + +## Requirements + +- Docker must be installed and running on the host system +- The specified Linux Docker image must contain LabVIEWCLI +- The LabVIEW project file must exist at the specified path + +See also: [docs/actions/build-lvlibp-docker-linux.md](../actions/build-lvlibp-docker-linux.md) + +## License + +This directory inherits the root repository's license (MIT, unless otherwise noted). From 9116f998638640119a5c24852428181ccafe12ca Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Fri, 6 Mar 2026 23:50:30 +0530 Subject: [PATCH 04/49] Added correct parameters [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 40550d3c..984bce6d 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -1,25 +1,25 @@ <# .SYNOPSIS - Builds the LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container. + Builds the LabVIEW Packed Project Library (.lvlibp) using Linux LabVIEW Docker container. .DESCRIPTION - Executes LabVIEW build specification through g-cli inside a Docker container, + Executes LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding the provided version information and commit identifier. .PARAMETER MinimumSupportedLVVersion - LabVIEW version used for the build (e.g., "2021", "2023"). + LabVIEW version year used for the build (e.g., "2021", "2023", "2026"). .PARAMETER SupportedBitness Bitness of the LabVIEW environment ("32" or "64"). -.PARAMETER TargetName - Target that contains the build specification. - .PARAMETER ProjectPath Path to the LabVIEW project .lvproj file that contains the build specification. -.PARAMETER BuildSpec - Name of the LabVIEW build specification to execute. If empty, execute all build specifications in the target. +.PARAMETER TargetName + Target that contains the build specification. + +.PARAMETER BuildSpecName + Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. .PARAMETER Major Major version component for the PPL. @@ -40,13 +40,13 @@ Docker image name (e.g., "nationalinstruments/labview"). .PARAMETER ImageTag - Docker image tag. Defaults to MinimumSupportedLVVersion if not specified. + Docker image tag (e.g., "2026q1-linux"). .EXAMPLE - .\BuildLvlibpDocker.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -RelativePath "." -BuildSpec "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" -DockerImage "nationalinstruments/labview" + .\BuildLvlibpDockerLinux.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" .NOTES - [REQ-039] Build LabVIEW Packed Project Library using Docker container + [REQ-039] Build LabVIEW Packed Project Library using Linux Docker container #> [CmdletBinding()] @@ -58,10 +58,13 @@ param( [string]$SupportedBitness, [Parameter(Mandatory = $true)] - [string]$RelativePath, + [string]$ProjectPath, [Parameter(Mandatory = $true)] - [string]$BuildSpecName, + [string]$TargetName, + + [Parameter(Mandatory = $false)] + [string]$BuildSpecName = "", [Parameter(Mandatory = $true)] [int]$Major, @@ -89,7 +92,7 @@ Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' try { - Write-Verbose "Building PPL with Docker container" + Write-Verbose "Building PPL with Linux Docker container" Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue Write-Information "Commit: $Commit" -InformationAction Continue @@ -103,6 +106,7 @@ try { throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" } + # Get the path to the bash script $scriptDir = $PSScriptRoot $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' @@ -114,9 +118,11 @@ try { $labviewPath = "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" Write-Verbose "LabVIEWPath: $labviewPath" + # Container paths are always Linux-style $containerProjectPath = "/workspace/$ProjectPath" $containerScriptPath = "/tmp/build-lvlibp.sh" - + + # Version string $versionString = "$Major.$Minor.$Patch.$Build" # Construct bash command arguments @@ -175,6 +181,6 @@ try { exit 0 } catch { - Write-Error "BuildLvlibpDocker failed: $_" + Write-Error "BuildLvlibpDockerLinux failed: $_" exit 1 } \ No newline at end of file From 0519e49ec479cba5d488edc2061004953ead999b Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Fri, 6 Mar 2026 23:58:17 +0530 Subject: [PATCH 05/49] Run in Headless mode [REQ-039] --- scripts/build-lvlibp-docker-linux/build-lvlibp.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index 5aeea0ec..12f7d50d 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -9,7 +9,6 @@ LABVIEW_PATH="" PROJECT_PATH="" TARGET_NAME="" BUILD_SPEC_NAME="" -VERSION="" while [[ $# -gt 0 ]]; do case $1 in @@ -29,10 +28,6 @@ while [[ $# -gt 0 ]]; do BUILD_SPEC_NAME="$2" shift 2 ;; - --version) - VERSION="$2" - shift 2 - ;; *) echo "Unknown argument: $1" exit 1 @@ -41,9 +36,9 @@ while [[ $# -gt 0 ]]; do done # Validate required arguments -if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]] || [[ -z "$VERSION" ]]; then +if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]]; then echo "Error: Missing required arguments" - echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ] --version " + echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ]" exit 1 fi @@ -52,7 +47,6 @@ echo "LabVIEW: $LABVIEW_PATH" echo "Project: $PROJECT_PATH" echo "Target: $TARGET_NAME" echo "Build Spec: ${BUILD_SPEC_NAME:-}" -echo "Version: $VERSION" # Construct LabVIEWCLI command CLI_ARGS=( @@ -66,7 +60,7 @@ if [[ -n "$BUILD_SPEC_NAME" ]]; then CLI_ARGS+=("-BuildSpecName" "$BUILD_SPEC_NAME") fi -CLI_ARGS+=("-Version" "$VERSION") +CLI_ARGS+=("-Headless") # Execute LabVIEWCLI echo "Executing: LabVIEWCLI ${CLI_ARGS[*]}" From ee345a939b28ec4ed003b7b86e764a332d15af07 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Sat, 7 Mar 2026 11:15:45 +0530 Subject: [PATCH 06/49] Redirect outputs to console [REQ-039] --- scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 984bce6d..4234a6eb 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -101,7 +101,7 @@ try { # Pull Docker image Write-Information "Pulling Docker image..." -InformationAction Continue - docker pull $fullImage + docker pull $fullImage *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } if ($LASTEXITCODE -ne 0) { throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" } @@ -147,7 +147,8 @@ try { -v "${PWD}:/workspace" ` -v "${buildScript}:${containerScriptPath}" ` $fullImage ` - bash -c $bashCommand + bash -c $bashCommand ` + *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } $buildExitCode = $LASTEXITCODE Write-Information "Build exit code: $buildExitCode" -InformationAction Continue From c48c01d4c04b58f240f63302d48e572947e0bd35 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Sat, 7 Mar 2026 11:20:03 +0530 Subject: [PATCH 07/49] Remove invalid argument [REQ-039] --- scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 4234a6eb..70453c61 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -130,7 +130,6 @@ try { "--labview-path", "'$labviewPath'" "--project-path", "'$containerProjectPath'" "--target-name", "'$TargetName'" - "--version", "'$versionString'" ) if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { From 7427fb02f4dcebd15b9e43fbd16b6c9c334b29b4 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Sat, 7 Mar 2026 11:37:06 +0530 Subject: [PATCH 08/49] Rename in bash script [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 28 ++------- .../build-lvlibp-docker-linux/build-lvlibp.sh | 62 ++++++++++++++++++- 2 files changed, 64 insertions(+), 26 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 70453c61..c1fa3027 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -130,6 +130,9 @@ try { "--labview-path", "'$labviewPath'" "--project-path", "'$containerProjectPath'" "--target-name", "'$TargetName'" + "--version", "'$versionString'" + "--commit", "'$Commit'" + "--bitness", "'$SupportedBitness'" ) if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { @@ -150,34 +153,13 @@ try { *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } $buildExitCode = $LASTEXITCODE - Write-Information "Build exit code: $buildExitCode" -InformationAction Continue + Write-Information "Build completed with exit code: $buildExitCode" -InformationAction Continue if ($buildExitCode -ne 0) { throw "Build failed with exit code $buildExitCode" } - # Rename PPL with version and commit metadata - Write-Information "Renaming PPL artifact..." -InformationAction Continue - $shortCommit = if ($Commit.Length -ge 7) { $Commit.Substring(0, 7) } else { $Commit } - $bitnessTag = if ($SupportedBitness -eq '32') { 'x86' } else { 'x64' } - $versionTag = "v$Major.$Minor.$Patch.$Build+g$shortCommit" - - # Search for .lvlibp files in common build output locations - $buildOutputs = Get-ChildItem -Path . -Filter "*.lvlibp" -Recurse -ErrorAction SilentlyContinue | - Where-Object { $_.Directory.Name -eq 'builds' } - - if ($buildOutputs) { - foreach ($ppl in $buildOutputs) { - $baseName = [System.IO.Path]::GetFileNameWithoutExtension($ppl.Name) - $newName = "${baseName}_${bitnessTag}_$versionTag.lvlibp" - Rename-Item -Path $ppl.FullName -NewName $newName - Write-Information "Renamed LVLIBP to '$newName'" -InformationAction Continue - } - } else { - Write-Warning "No .lvlibp files found in builds directory." - } - - Write-Information "Build succeeded" -InformationAction Continue + Write-Information "Build and rename succeeded" -InformationAction Continue exit 0 } catch { diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index 12f7d50d..e932a089 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -9,6 +9,9 @@ LABVIEW_PATH="" PROJECT_PATH="" TARGET_NAME="" BUILD_SPEC_NAME="" +VERSION="" +COMMIT="" +BITNESS="" while [[ $# -gt 0 ]]; do case $1 in @@ -28,6 +31,18 @@ while [[ $# -gt 0 ]]; do BUILD_SPEC_NAME="$2" shift 2 ;; + --version) + VERSION="$2" + shift 2 + ;; + --commit) + COMMIT="$2" + shift 2 + ;; + --bitness) + BITNESS="$2" + shift 2 + ;; *) echo "Unknown argument: $1" exit 1 @@ -36,9 +51,9 @@ while [[ $# -gt 0 ]]; do done # Validate required arguments -if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]]; then +if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]] || [[ -z "$VERSION" ]] || [[ -z "$COMMIT" ]] || [[ -z "$BITNESS" ]]; then echo "Error: Missing required arguments" - echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ]" + echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ] --version --commit --bitness " exit 1 fi @@ -47,6 +62,9 @@ echo "LabVIEW: $LABVIEW_PATH" echo "Project: $PROJECT_PATH" echo "Target: $TARGET_NAME" echo "Build Spec: ${BUILD_SPEC_NAME:-}" +echo "Version: $VERSION" +echo "Commit: $COMMIT" +echo "Bitness: $BITNESS" # Construct LabVIEWCLI command CLI_ARGS=( @@ -68,4 +86,42 @@ LabVIEWCLI "${CLI_ARGS[@]}" EXIT_CODE=$? echo "Build exit code: $EXIT_CODE" -exit $EXIT_CODE \ No newline at end of file + +if [[ $EXIT_CODE -ne 0 ]]; then + echo "Build failed" + exit $EXIT_CODE +fi + +# Rename PPL artifacts with version and commit metadata +echo "Renaming PPL artifacts..." + +# Determine bitness tag +if [[ "$BITNESS" == "32" ]]; then + BITNESS_TAG="x86" +else + BITNESS_TAG="x64" +fi + +# Get short commit (first 7 characters) +SHORT_COMMIT="${COMMIT:0:7}" +VERSION_TAG="v${VERSION}+g${SHORT_COMMIT}" + +# Find and rename .lvlibp files in builds directory +FOUND_FILES=false +if [[ -d "/workspace/builds" ]]; then + while IFS= read -r -d '' LVLIBP_FILE; do + FOUND_FILES=true + BASENAME=$(basename "$LVLIBP_FILE" .lvlibp) + DIRNAME=$(dirname "$LVLIBP_FILE") + NEW_NAME="${BASENAME}_${BITNESS_TAG}_${VERSION_TAG}.lvlibp" + echo "Renaming: $LVLIBP_FILE -> $NEW_NAME" + mv "$LVLIBP_FILE" "${DIRNAME}/${NEW_NAME}" + done < <(find /workspace/builds -type f -name "*.lvlibp" -print0) +fi + +if [[ "$FOUND_FILES" == "false" ]]; then + echo "Warning: No .lvlibp files found in /workspace/builds directory" +fi + +echo "Build and rename completed successfully" +exit 0 \ No newline at end of file From c821ab1cf42f747942bcf5dac81eec788b12bd07 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Sat, 7 Mar 2026 11:47:39 +0530 Subject: [PATCH 09/49] Copy the logs to host machine [REQ-039] --- scripts/build-lvlibp-docker-linux/build-lvlibp.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index e932a089..dd74878e 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -87,6 +87,16 @@ LabVIEWCLI "${CLI_ARGS[@]}" EXIT_CODE=$? echo "Build exit code: $EXIT_CODE" +# Copy LabVIEW logs to workspace for artifact collection +echo "Copying LabVIEW logs to workspace..." +mkdir -p /workspace/build-logs +if ls /tmp/lvtemporary_*.log 1> /dev/null 2>&1; then + cp /tmp/lvtemporary_*.log /workspace/build-logs/ 2>/dev/null || true + echo "Logs copied to /workspace/build-logs/" +else + echo "No LabVIEW log files found in /tmp/" +fi + if [[ $EXIT_CODE -ne 0 ]]; then echo "Build failed" exit $EXIT_CODE From c8864bd8195638448e9516cac40820558227d858 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Sat, 7 Mar 2026 12:15:22 +0530 Subject: [PATCH 10/49] Avoid renaming lvlibp [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 8 +-- .../build-lvlibp-docker-linux/build-lvlibp.sh | 55 +------------------ 2 files changed, 4 insertions(+), 59 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index c1fa3027..474f4281 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -121,18 +121,12 @@ try { # Container paths are always Linux-style $containerProjectPath = "/workspace/$ProjectPath" $containerScriptPath = "/tmp/build-lvlibp.sh" - - # Version string - $versionString = "$Major.$Minor.$Patch.$Build" # Construct bash command arguments $bashArgs = @( "--labview-path", "'$labviewPath'" "--project-path", "'$containerProjectPath'" "--target-name", "'$TargetName'" - "--version", "'$versionString'" - "--commit", "'$Commit'" - "--bitness", "'$SupportedBitness'" ) if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { @@ -159,7 +153,7 @@ try { throw "Build failed with exit code $buildExitCode" } - Write-Information "Build and rename succeeded" -InformationAction Continue + Write-Information "Build succeeded" -InformationAction Continue exit 0 } catch { diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index dd74878e..33e357b0 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -9,9 +9,6 @@ LABVIEW_PATH="" PROJECT_PATH="" TARGET_NAME="" BUILD_SPEC_NAME="" -VERSION="" -COMMIT="" -BITNESS="" while [[ $# -gt 0 ]]; do case $1 in @@ -31,18 +28,6 @@ while [[ $# -gt 0 ]]; do BUILD_SPEC_NAME="$2" shift 2 ;; - --version) - VERSION="$2" - shift 2 - ;; - --commit) - COMMIT="$2" - shift 2 - ;; - --bitness) - BITNESS="$2" - shift 2 - ;; *) echo "Unknown argument: $1" exit 1 @@ -51,9 +36,9 @@ while [[ $# -gt 0 ]]; do done # Validate required arguments -if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]] || [[ -z "$VERSION" ]] || [[ -z "$COMMIT" ]] || [[ -z "$BITNESS" ]]; then +if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]]; then echo "Error: Missing required arguments" - echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ] --version --commit --bitness " + echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ]" exit 1 fi @@ -62,9 +47,6 @@ echo "LabVIEW: $LABVIEW_PATH" echo "Project: $PROJECT_PATH" echo "Target: $TARGET_NAME" echo "Build Spec: ${BUILD_SPEC_NAME:-}" -echo "Version: $VERSION" -echo "Commit: $COMMIT" -echo "Bitness: $BITNESS" # Construct LabVIEWCLI command CLI_ARGS=( @@ -102,36 +84,5 @@ if [[ $EXIT_CODE -ne 0 ]]; then exit $EXIT_CODE fi -# Rename PPL artifacts with version and commit metadata -echo "Renaming PPL artifacts..." - -# Determine bitness tag -if [[ "$BITNESS" == "32" ]]; then - BITNESS_TAG="x86" -else - BITNESS_TAG="x64" -fi - -# Get short commit (first 7 characters) -SHORT_COMMIT="${COMMIT:0:7}" -VERSION_TAG="v${VERSION}+g${SHORT_COMMIT}" - -# Find and rename .lvlibp files in builds directory -FOUND_FILES=false -if [[ -d "/workspace/builds" ]]; then - while IFS= read -r -d '' LVLIBP_FILE; do - FOUND_FILES=true - BASENAME=$(basename "$LVLIBP_FILE" .lvlibp) - DIRNAME=$(dirname "$LVLIBP_FILE") - NEW_NAME="${BASENAME}_${BITNESS_TAG}_${VERSION_TAG}.lvlibp" - echo "Renaming: $LVLIBP_FILE -> $NEW_NAME" - mv "$LVLIBP_FILE" "${DIRNAME}/${NEW_NAME}" - done < <(find /workspace/builds -type f -name "*.lvlibp" -print0) -fi - -if [[ "$FOUND_FILES" == "false" ]]; then - echo "Warning: No .lvlibp files found in /workspace/builds directory" -fi - -echo "Build and rename completed successfully" +echo "Build completed successfully" exit 0 \ No newline at end of file From 902c150ed0bf20e8a82329d700be706666a3f4e7 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 9 Mar 2026 17:53:32 +0530 Subject: [PATCH 11/49] Add action to build PPL in windows docker container [REQ-040] --- actions/Invoke-OSAction.ps1 | 34 ++-- actions/OpenSourceActions.psd1 | 1 + actions/OpenSourceActions.psm1 | 57 ++++++ build-lvlibp-docker-windows/action.yml | 86 +++++++++ ci_evidence.txt | 2 +- dispatchers.json | 78 ++++++++ docs/actions/build-lvlibp-docker-windows.md | 151 ++++++++++++++++ docs/scripts/build-lvlibp-docker-windows.md | 82 +++++++++ requirements.json | 7 + .../BuildLvlibpDockerWindows.ps1 | 167 ++++++++++++++++++ .../build-lvlibp.ps1 | 81 +++++++++ ...uildLvlibpDockerWindows.Workflow.Tests.ps1 | 77 ++++++++ 12 files changed, 806 insertions(+), 17 deletions(-) create mode 100644 build-lvlibp-docker-windows/action.yml create mode 100644 docs/actions/build-lvlibp-docker-windows.md create mode 100644 docs/scripts/build-lvlibp-docker-windows.md create mode 100644 scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 create mode 100644 scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 create mode 100644 tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 diff --git a/actions/Invoke-OSAction.ps1 b/actions/Invoke-OSAction.ps1 index 5785670a..34f83ccd 100644 --- a/actions/Invoke-OSAction.ps1 +++ b/actions/Invoke-OSAction.ps1 @@ -20,22 +20,24 @@ Import-Module (Join-Path $PSScriptRoot 'OpenSourceActions.psm1') -Force # Attempt to build registry from generated dispatcher metadata; fall back to # a static map only if loading fails or produces no entries. $FallbackRegistry = [ordered]@{ - 'add-token-to-labview' = 'Invoke-AddTokenToLabVIEW' - 'apply-vipc' = 'Invoke-ApplyVIPC' - 'build' = 'Invoke-Build' - 'build-lvlibp' = 'Invoke-BuildLvlibp' - 'build-vi-package' = 'Invoke-BuildViPackage' - 'close-labview' = 'Invoke-CloseLabVIEW' - 'generate-release-notes' = 'Invoke-GenerateReleaseNotes' - 'missing-in-project' = 'Invoke-MissingInProject' - 'modify-vipb-display-info' = 'Invoke-ModifyVIPBDisplayInfo' - 'prepare-labview-source' = 'Invoke-PrepareLabVIEWSource' - 'rename-file' = 'Invoke-RenameFile' - 'restore-setup-lv-source' = 'Invoke-RestoreSetupLVSource' - 'revert-development-mode' = 'Invoke-RevertDevelopmentMode' - 'run-pester-tests' = 'Invoke-RunPesterTests' - 'run-unit-tests' = 'Invoke-RunUnitTests' - 'set-development-mode' = 'Invoke-SetDevelopmentMode' + 'add-token-to-labview' = 'Invoke-AddTokenToLabVIEW' + 'apply-vipc' = 'Invoke-ApplyVIPC' + 'build' = 'Invoke-Build' + 'build-lvlibp' = 'Invoke-BuildLvlibp' + 'build-lvlibp-docker-linux' = 'Invoke-BuildLvlibpDockerLinux' + 'build-lvlibp-docker-windows' = 'Invoke-BuildLvlibpDockerWindows' + 'build-vi-package' = 'Invoke-BuildViPackage' + 'close-labview' = 'Invoke-CloseLabVIEW' + 'generate-release-notes' = 'Invoke-GenerateReleaseNotes' + 'missing-in-project' = 'Invoke-MissingInProject' + 'modify-vipb-display-info' = 'Invoke-ModifyVIPBDisplayInfo' + 'prepare-labview-source' = 'Invoke-PrepareLabVIEWSource' + 'rename-file' = 'Invoke-RenameFile' + 'restore-setup-lv-source' = 'Invoke-RestoreSetupLVSource' + 'revert-development-mode' = 'Invoke-RevertDevelopmentMode' + 'run-pester-tests' = 'Invoke-RunPesterTests' + 'run-unit-tests' = 'Invoke-RunUnitTests' + 'set-development-mode' = 'Invoke-SetDevelopmentMode' } $Registry = $null diff --git a/actions/OpenSourceActions.psd1 b/actions/OpenSourceActions.psd1 index b51de7e2..5e7cabd9 100644 --- a/actions/OpenSourceActions.psd1 +++ b/actions/OpenSourceActions.psd1 @@ -15,6 +15,7 @@ 'Invoke-Build' 'Invoke-BuildLvlibp' 'Invoke-BuildLvlibpDockerLinux' + 'Invoke-BuildLvlibpDockerWindows' 'Invoke-BuildViPackage' 'Invoke-CloseLabVIEW' 'Invoke-GenerateReleaseNotes' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 49eb885e..1ca6cd83 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -285,6 +285,63 @@ function Invoke-BuildLvlibpDockerLinux { return $result } +# Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. +# MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). +# SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). +# ProjectPath: Path to the LabVIEW project .lvproj file. +# TargetName: Target that contains the build specification. +# BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). +# Major: Major version component. +# Minor: Minor version component. +# Patch: Patch version component. +# Build: Build number component. +# Commit: Commit hash or identifier. +# DockerImage: Docker image name (default: "nationalinstruments/labview"). +# ImageTag: Docker image tag (defaults to "2026-windows"). +# DryRun: If set, prints the command instead of executing it. +# gcliPath: Optional path prepended to PATH for locating the g CLI. +function Invoke-BuildLvlibpDockerWindows { + [CmdletBinding()] + param( + [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, + [Parameter(Mandatory)] [string] $SupportedBitness, + [Parameter(Mandatory)] [string] $ProjectPath, + [Parameter(Mandatory)] [string] $TargetName, + [Parameter()] [string] $BuildSpecName = "", + [Parameter(Mandatory)] [int] $Major, + [Parameter(Mandatory)] [int] $Minor, + [Parameter(Mandatory)] [int] $Patch, + [Parameter(Mandatory)] [int] $Build, + [Parameter(Mandatory)] [string] $Commit, + [Parameter()] [string] $DockerImage = "nationalinstruments/labview", + [Parameter()] [string] $ImageTag = "2026-windows", + [switch] $DryRun, + [string] $gcliPath + ) + Write-Information "Invoking BuildLvlibpDockerWindows" -InformationAction Continue + + $result = Invoke-OpenSourceActionScript ` + -ScriptSegments @('build-lvlibp-docker-windows', 'BuildLvlibpDockerWindows.ps1') ` + -Arguments @{ + MinimumSupportedLVVersion = $MinimumSupportedLVVersion + SupportedBitness = $SupportedBitness + ProjectPath = $ProjectPath + TargetName = $TargetName + BuildSpecName = $BuildSpecName + Major = $Major + Minor = $Minor + Patch = $Patch + Build = $Build + Commit = $Commit + DockerImage = $DockerImage + ImageTag = $ImageTag + } ` + -DryRun:$DryRun ` + -gcliPath $gcliPath + + return $result +} + # Closes any running instance of LabVIEW. # MinimumSupportedLVVersion: Minimum LabVIEW version that the project supports. # SupportedBitness: Target LabVIEW bitness (32- or 64-bit). diff --git a/build-lvlibp-docker-windows/action.yml b/build-lvlibp-docker-windows/action.yml new file mode 100644 index 00000000..2ec13b6e --- /dev/null +++ b/build-lvlibp-docker-windows/action.yml @@ -0,0 +1,86 @@ +name: 'Build LVLIBP Docker Windows' +description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container' +inputs: + minimum_supported_lv_version: + description: 'LabVIEW version year for the build (e.g., "2021", "2026").' + required: true + supported_bitness: + description: 'Bitness of the LabVIEW environment ("32" or "64").' + required: true + project_path: + description: 'Path to the LabVIEW project .lvproj file.' + required: true + target_name: + description: 'Target that contains the build specification.' + required: true + build_spec_name: + description: 'Name of the build specification. If empty, builds all specifications in the target.' + required: false + default: '' + major: + description: 'Major version component for the PPL.' + required: true + minor: + description: 'Minor version component for the PPL.' + required: true + patch: + description: 'Patch version component for the PPL.' + required: true + build: + description: 'Build number component for the PPL.' + required: true + commit: + description: 'Commit hash or identifier recorded in the build.' + required: true + docker_image: + description: 'Docker image name.' + required: false + default: 'nationalinstruments/labview' + image_tag: + description: 'Docker image tag.' + required: false + default: '2026-windows' + working_directory: + description: 'Working directory where the action will run.' + required: false + log_level: + description: 'Verbosity level (ERROR|WARN|INFO|DEBUG).' + default: 'INFO' + required: false + dry_run: + description: 'If true, simulate the action without side effects.' + default: false + required: false + +runs: + using: 'composite' + steps: + - name: Dispatch build-lvlibp-docker-windows + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $args = @{ + MinimumSupportedLVVersion = '${{ inputs.minimum_supported_lv_version }}' + SupportedBitness = '${{ inputs.supported_bitness }}' + ProjectPath = '${{ inputs.project_path }}' + TargetName = '${{ inputs.target_name }}' + Major = [int]'${{ inputs.major }}' + Minor = [int]'${{ inputs.minor }}' + Patch = [int]'${{ inputs.patch }}' + Build = [int]'${{ inputs.build }}' + Commit = '${{ inputs.commit }}' + } + if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } + if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } + if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } + + $params = @{ + ActionName = 'build-lvlibp-docker-windows' + ArgsJson = ($args | ConvertTo-Json -Compress) + LogLevel = '${{ inputs.log_level }}' + } + if ('${{ inputs.dry_run }}' -eq 'true') { $params['DryRun'] = $true } + if ('${{ inputs.working_directory }}') { $params['WorkingDirectory'] = '${{ inputs.working_directory }}' } + + & '${{ github.action_path }}/../actions/Invoke-OSAction.ps1' @params + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/ci_evidence.txt b/ci_evidence.txt index b67f49a4..a08a100a 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"b0b84b174b2700771b02d3d4becd1e34d5b5fdb6","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"c8864bd8195638448e9516cac40820558227d858","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index d3a5b1b0..d980daef 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -272,6 +272,84 @@ } } }, + "Invoke-BuildLvlibpDockerWindows": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "2026-windows", + "description": "Docker image tag (defaults to \"2026-windows\")" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { diff --git a/docs/actions/build-lvlibp-docker-windows.md b/docs/actions/build-lvlibp-docker-windows.md new file mode 100644 index 00000000..a19bbe41 --- /dev/null +++ b/docs/actions/build-lvlibp-docker-windows.md @@ -0,0 +1,151 @@ +# build-lvlibp-docker-windows + +## Purpose + +Builds LabVIEW Packed Project Library (.lvlibp) files using a Windows LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata. + +Use this action when you need to build PPL files in containerized Windows environments (CI/CD pipelines) without installing LabVIEW directly on the host system. + +## Parameters + +Common parameters are described in [Common parameters](../common-parameters.md). + +### Required + +- **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2026"`). +- **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). +- **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. +- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). +- **Major** (`int`): Major version component for the PPL. +- **Minor** (`int`): Minor version component for the PPL. +- **Patch** (`int`): Patch version component for the PPL. +- **Build** (`int`): Build number component for the PPL. +- **Commit** (`string`): Commit hash or identifier recorded in the build. + +### Optional + +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. +- **ImageTag** (`string`): Docker image tag. Default: `"2026-windows"`. + +### GitHub Action inputs + +| Input | CLI parameter | Description | +| --- | --- | --- | +| `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | +| `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | +| `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | +| `target_name` | `TargetName` | Target that contains the build specification. | +| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | +| `major` | `Major` | Major version component. | +| `minor` | `Minor` | Minor version component. | +| `patch` | `Patch` | Patch version component. | +| `build` | `Build` | Build number component. | +| `commit` | `Commit` | Commit hash or identifier. | +| `docker_image` | `DockerImage` | Docker image name. | +| `image_tag` | `ImageTag` | Docker image tag. | +| `working_directory` | `WorkingDirectory` | Base directory for the action. | +| `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | +| `dry_run` | `DryRun` | If true, simulate without side effects. | + +## Examples + +### CLI + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows -ArgsJson '{ + "MinimumSupportedLVVersion": "2026", + "SupportedBitness": "64", + "ProjectPath": "lv_icon_editor.lvproj", + "TargetName": "My Computer", + "BuildSpecName": "Editor Packed Library", + "Major": 1, + "Minor": 0, + "Patch": 0, + "Build": 0, + "Commit": "abc1234", + "DockerImage": "nationalinstruments/labview", + "ImageTag": "2026-windows" +}' +``` + +### GitHub Action + +```yaml +- name: Build PPL with Windows Docker + uses: owner/repo/build-lvlibp-docker-windows@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: 'Editor Packed Library' + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} + docker_image: 'nationalinstruments/labview' + image_tag: '2026-windows' +``` + +### Build All Specifications + +```yaml +- name: Build All PPLs + uses: owner/repo/build-lvlibp-docker-windows@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: '' # Empty - builds all specifications + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} +``` + +## Behavior + +1. Pulls the specified Windows Docker image (e.g., `nationalinstruments/labview:2026-windows`) +2. Mounts the workspace directory into the container at `C:\workspace` +3. Mounts the PowerShell build script into the container at `C:\build-lvlibp.ps1` +4. Constructs the LabVIEWPath based on version and bitness +5. Executes the PowerShell script which runs `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters +6. Copies LabVIEW logs from `%TEMP%` to `C:\workspace\build-logs` for artifact collection +7. On failure, exits with the build error code + +## Return Codes + +- `0` – success +- non-zero – build failed or Docker operation failed + +## Requirements + +- Docker must be installed and running on the host system +- The specified Windows Docker image must be available (pulled or cached) +- The host system must support Windows containers (Windows Server or Windows 10/11 with container support) +- The LabVIEW project file must exist at the specified path +- LabVIEWCLI must be available in the Docker container +- The target and build specification must exist in the project + +## Platform Support + +This action is designed for Windows Docker containers. Key differences from the Linux variant: + +- Uses Windows-style paths (`C:\` drive letters) +- Requires Windows Server or Windows 10/11 with container support +- LabVIEW installation paths differ between 32-bit and 64-bit +- Logs are found in `%TEMP%` instead of `/tmp/` +- Uses PowerShell as the container shell instead of bash + +For Linux containers, see [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md). + +## See also + +- [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) – Linux Docker PPL build action +- [build-lvlibp](build-lvlibp.md) – Non-Docker PPL build action +- [build](build.md) – General LabVIEW build action +- [Architecture documentation](../architecture.md) diff --git a/docs/scripts/build-lvlibp-docker-windows.md b/docs/scripts/build-lvlibp-docker-windows.md new file mode 100644 index 00000000..34adf59c --- /dev/null +++ b/docs/scripts/build-lvlibp-docker-windows.md @@ -0,0 +1,82 @@ +# Build Packed Library with Docker Windows πŸ³πŸ“¦ + +Call **`BuildLvlibpDockerWindows.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI inside a Windows Docker container. + +## Inputs + +| Name | Required | Example | Description | +|------|----------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version year to use. | +| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | +| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | +| `major` | **Yes** | `1` | Major version component. | +| `minor` | **Yes** | `0` | Minor version component. | +| `patch` | **Yes** | `0` | Patch version component. | +| `build` | **Yes** | `1` | Build number component. | +| `commit` | **Yes** | `abcdef` | Commit identifier. | +| `docker_image` | No | `nationalinstruments/labview` | Docker image name. | +| `image_tag` | No | `2026-windows` | Docker image tag. | + +## Quick-start + +The following example builds using LabVIEW 2026 inside a Windows Docker container. + +```yaml +- uses: ./.github/actions/build-lvlibp-docker-windows + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: Editor Packed Library + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} + docker_image: nationalinstruments/labview + image_tag: 2026-windows +``` + +## Build All Specifications + +Leave `build_spec_name` empty to build all build specifications under the target: + +```yaml +- uses: ./.github/actions/build-lvlibp-docker-windows + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: '' + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} +``` + +## Requirements + +- Docker must be installed and running on the host system +- The host must support Windows containers (Windows Server or Windows 10/11 with Docker Desktop) +- The specified Windows Docker image must contain LabVIEWCLI +- The LabVIEW project file must exist at the specified path + +## Platform Notes + +This action requires **Windows containers**, which are only available on: + +- Windows Server 2016 or later +- Windows 10/11 with Docker Desktop configured for Windows containers + +For Linux-based builds, use [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md). + +See also: [docs/actions/build-lvlibp-docker-windows.md](../actions/build-lvlibp-docker-windows.md) + +## License + +This directory inherits the root repository's license (MIT, unless otherwise noted). diff --git a/requirements.json b/requirements.json index fde71e46..ecc44bca 100644 --- a/requirements.json +++ b/requirements.json @@ -267,6 +267,13 @@ "BuildLvlibpDockerLinux.Workflow.Tests" ] }, + { + "id": "REQ-040", + "description": "Build LabVIEW Packed Project Library (.lvlibp) using Windows LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata.", + "tests": [ + "BuildLvlibpDockerWindows.Workflow.Tests" + ] + }, { "id": "REQIE-001", "description": "After checking out the LabVIEW icon editor repository, PreSequence: The sequencer shall enumerate and record the build matrix used by the workflow (LabVIEW versions and bitness). Acceptance: a 'matrix.json' file exists listing each tuple {\"lv-version\": \"2021\"|\"2023\", \"bitness\": \"32\"|\"64\"} with at least [ [\"2021\",\"32\"], [\"2021\",\"64\"], [\"2023\",\"64\"] ]. g-cli is expected at 'C:\\Program Files\\G-CLI\\bin\\g-cli.exe'.", diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 new file mode 100644 index 00000000..f92de202 --- /dev/null +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -0,0 +1,167 @@ +<# +.SYNOPSIS + Builds the LabVIEW Packed Project Library (.lvlibp) using Windows LabVIEW Docker container. + +.DESCRIPTION + Executes LabVIEW build specification through LabVIEWCLI inside a Windows Docker container, + embedding the provided version information and commit identifier. + +.PARAMETER MinimumSupportedLVVersion + LabVIEW version year used for the build (e.g., "2021", "2023", "2026"). + +.PARAMETER SupportedBitness + Bitness of the LabVIEW environment ("32" or "64"). + +.PARAMETER ProjectPath + Path to the LabVIEW project .lvproj file that contains the build specification. + +.PARAMETER TargetName + Target that contains the build specification. + +.PARAMETER BuildSpecName + Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. + +.PARAMETER Major + Major version component for the PPL. + +.PARAMETER Minor + Minor version component for the PPL. + +.PARAMETER Patch + Patch version component for the PPL. + +.PARAMETER Build + Build number component for the PPL. + +.PARAMETER Commit + Commit hash or identifier recorded in the build. + +.PARAMETER DockerImage + Docker image name (e.g., "nationalinstruments/labview"). + +.PARAMETER ImageTag + Docker image tag (e.g., "2026-windows"). + +.EXAMPLE + .\BuildLvlibpDockerWindows.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" + +.NOTES + [REQ-040] Build LabVIEW Packed Project Library using Windows Docker container +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$MinimumSupportedLVVersion, + + [Parameter(Mandatory = $true)] + [string]$SupportedBitness, + + [Parameter(Mandatory = $true)] + [string]$ProjectPath, + + [Parameter(Mandatory = $true)] + [string]$TargetName, + + [Parameter(Mandatory = $false)] + [string]$BuildSpecName = "", + + [Parameter(Mandatory = $true)] + [int]$Major, + + [Parameter(Mandatory = $true)] + [int]$Minor, + + [Parameter(Mandatory = $true)] + [int]$Patch, + + [Parameter(Mandatory = $true)] + [int]$Build, + + [Parameter(Mandatory = $true)] + [string]$Commit, + + [Parameter(Mandatory = $false)] + [string]$DockerImage = "nationalinstruments/labview", + + [Parameter(Mandatory = $false)] + [string]$ImageTag = "2026-windows" +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +try { + Write-Verbose "Building PPL with Windows Docker container" + Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue + Write-Information "Commit: $Commit" -InformationAction Continue + + $fullImage = "${DockerImage}:${ImageTag}" + Write-Information "Docker Image: $fullImage" -InformationAction Continue + + # Pull Docker image + Write-Information "Pulling Docker image..." -InformationAction Continue + docker pull $fullImage *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } + if ($LASTEXITCODE -ne 0) { + throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" + } + + # Get the path to the PowerShell build script + $scriptDir = $PSScriptRoot + $buildScript = Join-Path $scriptDir 'build-lvlibp.ps1' + + if (-not (Test-Path $buildScript)) { + throw "Build script not found: $buildScript" + } + + # Construct LabVIEWPath for Windows container + $labviewPath = if ($SupportedBitness -eq '32') { + "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } else { + "C:\Program Files\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } + + Write-Verbose "LabVIEWPath: $labviewPath" + + # Windows container paths + $containerProjectPath = "C:\workspace\$ProjectPath" + $containerScriptPath = "C:\build-lvlibp.ps1" + + # Construct PowerShell command arguments + $psArgs = @( + "-LabVIEWPath", "'$labviewPath'" + "-ProjectPath", "'$containerProjectPath'" + "-TargetName", "'$TargetName'" + ) + + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + $psArgs += "-BuildSpecName", "'$BuildSpecName'" + } + + $psCommand = "& '$containerScriptPath' $($psArgs -join ' ')" + + Write-Information "Executing build script in Windows Docker container..." -InformationAction Continue + Write-Verbose "Command: powershell -NoProfile -Command `"$psCommand`"" + + # Run build in Windows container + docker run --rm ` + -v "${PWD}:C:\workspace" ` + -v "${buildScript}:${containerScriptPath}" ` + $fullImage ` + powershell -NoProfile -Command $psCommand ` + *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } + + $buildExitCode = $LASTEXITCODE + Write-Information "Build completed with exit code: $buildExitCode" -InformationAction Continue + + if ($buildExitCode -ne 0) { + throw "Build failed with exit code $buildExitCode" + } + + Write-Information "Build succeeded" -InformationAction Continue + exit 0 +} +catch { + Write-Error "BuildLvlibpDockerWindows failed: $_" + exit 1 +} \ No newline at end of file diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 new file mode 100644 index 00000000..61c91890 --- /dev/null +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -0,0 +1,81 @@ +<# +.SYNOPSIS + Build LabVIEW Packed Project Library using LabVIEWCLI + +.DESCRIPTION + [REQ-040] Build LVLIBP using Windows Docker container + +.NOTES + This script is executed inside the Windows Docker container. +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$LabVIEWPath, + + [Parameter(Mandatory = $true)] + [string]$ProjectPath, + + [Parameter(Mandatory = $true)] + [string]$TargetName, + + [Parameter(Mandatory = $false)] + [string]$BuildSpecName = "" +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Write-Host "Building LabVIEW Packed Project Library..." +Write-Host "LabVIEW: $LabVIEWPath" +Write-Host "Project: $ProjectPath" +Write-Host "Target: $TargetName" +Write-Host "Build Spec: $(if ($BuildSpecName) { $BuildSpecName } else { '' })" + +# Construct LabVIEWCLI command +$cliArgs = @( + '-OperationName', 'ExecuteBuildSpec' + '-LabVIEWPath', $LabVIEWPath + '-ProjectPath', $ProjectPath + '-TargetName', $TargetName +) + +if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + $cliArgs += '-BuildSpecName', $BuildSpecName +} + +$cliArgs += '-Headless' + +Write-Host "Executing: LabVIEWCLI $($cliArgs -join ' ')" + +try { + & LabVIEWCLI @cliArgs + $exitCode = $LASTEXITCODE + Write-Host "Build exit code: $exitCode" + + # Copy LabVIEW logs to workspace for artifact collection + Write-Host "Copying LabVIEW logs to workspace..." + $logDir = "C:\workspace\build-logs" + New-Item -Path $logDir -ItemType Directory -Force | Out-Null + + $tempLogs = Get-ChildItem -Path $env:TEMP -Filter "lvtemporary_*.log" -ErrorAction SilentlyContinue + if ($tempLogs) { + Copy-Item -Path $tempLogs.FullName -Destination $logDir -Force -ErrorAction SilentlyContinue + Write-Host "Logs copied to $logDir" + } else { + Write-Host "No LabVIEW log files found in $env:TEMP" + } + + if ($exitCode -ne 0) { + Write-Host "Build failed" + exit $exitCode + } + + Write-Host "Build completed successfully" + exit 0 +} +catch { + Write-Error "Build failed: $_" + exit 1 +} \ No newline at end of file diff --git a/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 new file mode 100644 index 00000000..8ee8ddde --- /dev/null +++ b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 @@ -0,0 +1,77 @@ +#requires -Version 7.0 +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Describe 'BuildLvlibpDockerWindows.Workflow' { + $meta = @{ + requirement = 'REQ-040' + Owner = 'NI' + Evidence = 'tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1' + } + + BeforeAll { + $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path + Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force + } + + It 'validates build-lvlibp-docker-windows action exists in dispatcher registry [REQ-040]' -Tag 'REQ-040' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $dispatchers.'build-lvlibp-docker-windows' | Should -Not -BeNullOrEmpty + $dispatchers.'build-lvlibp-docker-windows'.function | Should -Be 'Invoke-BuildLvlibpDockerWindows' + } + + It 'validates required parameters are defined [REQ-040]' -Tag 'REQ-040' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-docker-windows' + $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty + $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty + $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.Major | Should -Not -BeNullOrEmpty + $action.parameters.Minor | Should -Not -BeNullOrEmpty + $action.parameters.Patch | Should -Not -BeNullOrEmpty + $action.parameters.Build | Should -Not -BeNullOrEmpty + $action.parameters.Commit | Should -Not -BeNullOrEmpty + } + + It 'executes dry-run without errors [REQ-040]' -Tag 'REQ-040' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-windows' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates module function throws when required parameters are missing [REQ-040]' -Tag 'REQ-040' { + { Invoke-BuildLvlibpDockerWindows } | Should -Throw + } + + It 'accepts optional parameters in dry-run [REQ-040]' -Tag 'REQ-040' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-windows' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates action.yml exists [REQ-040]' -Tag 'REQ-040' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-windows' 'action.yml' + Test-Path $actionPath | Should -Be $true + } + + It 'validates implementation script exists [REQ-040]' -Tag 'REQ-040' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'BuildLvlibpDockerWindows.ps1' + Test-Path $scriptPath | Should -Be $true + } + + It 'validates inner build script exists [REQ-040]' -Tag 'REQ-040' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'build-lvlibp.ps1' + Test-Path $scriptPath | Should -Be $true + } +} \ No newline at end of file From 2e83f8d3887cb5c8f3fa5764a84ccd4301050d9c Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 9 Mar 2026 18:10:34 +0530 Subject: [PATCH 12/49] Correct default value of container [REQ-040] --- ci_evidence.txt | 2 +- dispatchers.json | 6 +++--- .../BuildLvlibpDockerWindows.ps1 | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ci_evidence.txt b/ci_evidence.txt index a08a100a..4198b2d1 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"c8864bd8195638448e9516cac40820558227d858","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"902c150ed0bf20e8a82329d700be706666a3f4e7","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index d980daef..d51aded3 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -273,7 +273,7 @@ } }, "Invoke-BuildLvlibpDockerWindows": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", @@ -310,8 +310,8 @@ "ImageTag": { "type": "string", "required": false, - "default": "2026-windows", - "description": "Docker image tag (defaults to \"2026-windows\")" + "default": "2026q1-windows", + "description": "Docker image tag (defaults to \"2026q1-windows\")" }, "Major": { "type": "number", diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 index f92de202..ef528489 100644 --- a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -40,7 +40,7 @@ Docker image name (e.g., "nationalinstruments/labview"). .PARAMETER ImageTag - Docker image tag (e.g., "2026-windows"). + Docker image tag (e.g., "2026q1-windows"). .EXAMPLE .\BuildLvlibpDockerWindows.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" @@ -85,7 +85,7 @@ param( [string]$DockerImage = "nationalinstruments/labview", [Parameter(Mandatory = $false)] - [string]$ImageTag = "2026-windows" + [string]$ImageTag = "2026q1-windows" ) Set-StrictMode -Version Latest From e9a03d746bb8f274e30fc21448fd6a6c6f4eaffb Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 9 Mar 2026 21:26:57 +0530 Subject: [PATCH 13/49] Update command to pass script to container [REQ-040] --- .../BuildLvlibpDockerWindows.ps1 | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 index ef528489..eaf7a57f 100644 --- a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -128,27 +128,25 @@ try { $containerScriptPath = "C:\build-lvlibp.ps1" # Construct PowerShell command arguments - $psArgs = @( - "-LabVIEWPath", "'$labviewPath'" - "-ProjectPath", "'$containerProjectPath'" - "-TargetName", "'$TargetName'" + $scriptArgs = @( + "-LabVIEWPath", "`"$labviewPath`"" + "-ProjectPath", "`"$containerProjectPath`"" + "-TargetName", "`"$TargetName`"" ) if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { - $psArgs += "-BuildSpecName", "'$BuildSpecName'" + $scriptArgs += "-BuildSpecName", "`"$BuildSpecName`"" } - $psCommand = "& '$containerScriptPath' $($psArgs -join ' ')" - Write-Information "Executing build script in Windows Docker container..." -InformationAction Continue - Write-Verbose "Command: powershell -NoProfile -Command `"$psCommand`"" + Write-Verbose "Script: $containerScriptPath $($scriptArgs -join ' ')" - # Run build in Windows container + # Run build in Windows container using -File with mounted script docker run --rm ` -v "${PWD}:C:\workspace" ` -v "${buildScript}:${containerScriptPath}" ` $fullImage ` - powershell -NoProfile -Command $psCommand ` + powershell -NoProfile -File $containerScriptPath @scriptArgs ` *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } $buildExitCode = $LASTEXITCODE From 85e3d4590ecc197400331ec4d4f23a2e3f6a7d60 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 9 Mar 2026 22:02:09 +0530 Subject: [PATCH 14/49] Mount directory instead of file [REQ-040] --- build-lvlibp-docker-windows/action.yml | 2 +- .../BuildLvlibpDockerWindows.ps1 | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/build-lvlibp-docker-windows/action.yml b/build-lvlibp-docker-windows/action.yml index 2ec13b6e..005d42b2 100644 --- a/build-lvlibp-docker-windows/action.yml +++ b/build-lvlibp-docker-windows/action.yml @@ -39,7 +39,7 @@ inputs: image_tag: description: 'Docker image tag.' required: false - default: '2026-windows' + default: '2026q1-windows' working_directory: description: 'Working directory where the action will run.' required: false diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 index eaf7a57f..487724f1 100644 --- a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -114,18 +114,25 @@ try { throw "Build script not found: $buildScript" } + # Create temporary directory for script mounting + $tempDir = Join-Path $env:TEMP "docker-build-$(New-Guid)" + New-Item -Path $tempDir -ItemType Directory -Force | Out-Null + $tempScript = Join-Path $tempDir 'build-lvlibp.ps1' + Copy-Item -Path $buildScript -Destination $tempScript -Force + Write-Verbose "Copied build script to: $tempScript" + # Construct LabVIEWPath for Windows container $labviewPath = if ($SupportedBitness -eq '32') { "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" } else { "C:\Program Files\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" } - + Write-Verbose "LabVIEWPath: $labviewPath" # Windows container paths $containerProjectPath = "C:\workspace\$ProjectPath" - $containerScriptPath = "C:\build-lvlibp.ps1" + $containerScriptPath = "C:\scripts\build-lvlibp.ps1" # Construct PowerShell command arguments $scriptArgs = @( @@ -144,7 +151,7 @@ try { # Run build in Windows container using -File with mounted script docker run --rm ` -v "${PWD}:C:\workspace" ` - -v "${buildScript}:${containerScriptPath}" ` + -v "${tempScript}:${containerScriptPath}" ` $fullImage ` powershell -NoProfile -File $containerScriptPath @scriptArgs ` *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } From 7fe2c40bf9343daac44f38f55fac4d52ddde8f21 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 9 Mar 2026 22:31:16 +0530 Subject: [PATCH 15/49] Mount directory instead of file [REQ-040] --- .../build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 index 487724f1..2a4c1fda 100644 --- a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -151,7 +151,7 @@ try { # Run build in Windows container using -File with mounted script docker run --rm ` -v "${PWD}:C:\workspace" ` - -v "${tempScript}:${containerScriptPath}" ` + -v "${tempDir}:C:\scripts" ` $fullImage ` powershell -NoProfile -File $containerScriptPath @scriptArgs ` *>&1 | ForEach-Object { Write-Information $_ -InformationAction Continue } From 7cb442bdb21c378b9933c584cd7a98ed52c6924b Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 10 Mar 2026 10:22:02 +0530 Subject: [PATCH 16/49] Fix default image tag [REQ-040] --- actions/OpenSourceActions.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 1ca6cd83..aa2c6fdf 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -297,7 +297,7 @@ function Invoke-BuildLvlibpDockerLinux { # Build: Build number component. # Commit: Commit hash or identifier. # DockerImage: Docker image name (default: "nationalinstruments/labview"). -# ImageTag: Docker image tag (defaults to "2026-windows"). +# ImageTag: Docker image tag (defaults to "2026q1-windows"). # DryRun: If set, prints the command instead of executing it. # gcliPath: Optional path prepended to PATH for locating the g CLI. function Invoke-BuildLvlibpDockerWindows { @@ -314,7 +314,7 @@ function Invoke-BuildLvlibpDockerWindows { [Parameter(Mandatory)] [int] $Build, [Parameter(Mandatory)] [string] $Commit, [Parameter()] [string] $DockerImage = "nationalinstruments/labview", - [Parameter()] [string] $ImageTag = "2026-windows", + [Parameter()] [string] $ImageTag = "2026q1-windows", [switch] $DryRun, [string] $gcliPath ) From b4337fbbc72f8962e4cba2e45f475352c81d13f8 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 10 Mar 2026 10:31:09 +0530 Subject: [PATCH 17/49] Added action artifacts [REQ-040] --- artifacts/linux/action-docs.json | 290 ++++++++++++++++++++++++++++++- artifacts/linux/action-docs.md | 73 +++++++- ci_evidence.txt | 2 +- 3 files changed, 351 insertions(+), 14 deletions(-) diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index 118878a8..09a1d4df 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -196,8 +196,8 @@ } } }, - "Invoke-BuildLvlibpDocker": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "Invoke-BuildLvlibpDockerLinux": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", @@ -234,7 +234,7 @@ "ImageTag": { "type": "string", "required": false, - "default": "", + "default": "2026q1-linux", "description": "Docker image tag (defaults to \"2026q1-linux\")" }, "Major": { @@ -274,6 +274,84 @@ } } }, + "Invoke-BuildLvlibpDockerWindows": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "2026q1-windows", + "description": "Docker image tag (defaults to \"2026q1-windows\")" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { @@ -1063,10 +1141,117 @@ "type": "string" } ], - "build-lvlibp-docker": [ + "build-lvlibp-docker-linux": [ + { + "name": "minimum_supported_lv_version", + "description": "LabVIEW version year for the build (e.g., \"2021\", \"2026\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "supported_bitness", + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "project_path", + "description": "Path to the LabVIEW project .lvproj file.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "target_name", + "description": "Target that contains the build specification.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build_spec_name", + "description": "Name of the build specification. If empty, builds all specifications in the target.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "major", + "description": "Major version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "minor", + "description": "Minor version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "patch", + "description": "Patch version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build", + "description": "Build number component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "commit", + "description": "Commit hash or identifier recorded in the build.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "docker_image", + "description": "Docker image name.", + "required": false, + "default": "nationalinstruments/labview", + "type": "string" + }, + { + "name": "image_tag", + "description": "Docker image tag.", + "required": false, + "default": "2026q1-linux", + "type": "string" + }, + { + "name": "working_directory", + "description": "Working directory where the action will run.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "log_level", + "description": "Verbosity level (ERROR|WARN|INFO|DEBUG).", + "required": false, + "default": "INFO", + "type": "string" + }, + { + "name": "dry_run", + "description": "If true, simulate the action without side effects.", + "required": false, + "default": false, + "type": "string" + } + ], + "build-lvlibp-docker-windows": [ { "name": "minimum_supported_lv_version", - "description": "LabVIEW version for the build (e.g., \"2021\", \"2026\").", + "description": "LabVIEW version year for the build (e.g., \"2021\", \"2026\").", "required": true, "default": "", "type": "string" @@ -1143,11 +1328,104 @@ }, { "name": "image_tag", - "description": "Docker image tag. Defaults to \"2026q1-linux\" if not specified.", + "description": "Docker image tag.", + "required": false, + "default": "2026q1-windows", + "type": "string" + }, + { + "name": "working_directory", + "description": "Working directory where the action will run.", + "required": false, + "default": "", + "type": "string" + }, + { + "name": "log_level", + "description": "Verbosity level (ERROR|WARN|INFO|DEBUG).", + "required": false, + "default": "INFO", + "type": "string" + }, + { + "name": "dry_run", + "description": "If true, simulate the action without side effects.", + "required": false, + "default": false, + "type": "string" + } + ], + "build-lvlibp-win32": [ + { + "name": "minimum_supported_lv_version", + "description": "LabVIEW version year for the build (e.g., \"2021\", \"2026\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "supported_bitness", + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\").", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "project_path", + "description": "Path to the LabVIEW project .lvproj file.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "target_name", + "description": "Target that contains the build specification.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build_spec_name", + "description": "Name of the build specification. If empty, builds all specifications in the target.", "required": false, "default": "", "type": "string" }, + { + "name": "major", + "description": "Major version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "minor", + "description": "Minor version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "patch", + "description": "Patch version component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "build", + "description": "Build number component for the PPL.", + "required": true, + "default": "", + "type": "string" + }, + { + "name": "commit", + "description": "Commit hash or identifier recorded in the build.", + "required": true, + "default": "", + "type": "string" + }, { "name": "working_directory", "description": "Working directory where the action will run.", diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index b91c3cba..7e33bc69 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -75,8 +75,8 @@ Builds a LabVIEW Packed Library using a project and build spec. MinimumSupported pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibp -ArgsJson '{}' ``` -#### Invoke-BuildLvlibpDocker -Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-linux"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +#### Invoke-BuildLvlibpDockerLinux +Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-linux"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | Build | number | true | | Build number component | @@ -84,7 +84,7 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumS | Commit | string | true | | Commit hash or identifier | | DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | | DryRun | boolean | false | | If set, prints the command instead of executing it | -| ImageTag | string | false | | Docker image tag (defaults to "2026q1-linux") | +| ImageTag | string | false | 2026q1-linux | Docker image tag (defaults to "2026q1-linux") | | Major | number | true | | Major version component | | MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | | Minor | number | true | | Minor version component | @@ -95,7 +95,30 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Docker container. MinimumS | gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | ```powershell -pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDocker -ArgsJson '{}' +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerLinux -ArgsJson '{}' +``` + +#### Invoke-BuildLvlibpDockerWindows +Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-windows"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +| Parameter | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| Build | number | true | | Build number component | +| BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | +| Commit | string | true | | Commit hash or identifier | +| DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | +| DryRun | boolean | false | | If set, prints the command instead of executing it | +| ImageTag | string | false | 2026q1-windows | Docker image tag (defaults to "2026q1-windows") | +| Major | number | true | | Major version component | +| MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | +| Minor | number | true | | Minor version component | +| Patch | number | true | | Patch version component | +| ProjectPath | string | true | | Path to the LabVIEW project | +| SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | +| TargetName | string | true | | Target that contains the build specification | +| gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | + +```powershell +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows -ArgsJson '{}' ``` #### Invoke-BuildViPackage @@ -359,10 +382,29 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | | dry_run | string | false | false | If true, simulate the action without side effects. | -#### build-lvlibp-docker +#### build-lvlibp-docker-linux +| Name | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | +| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | +| project_path | string | true | | Path to the LabVIEW project .lvproj file. | +| target_name | string | true | | Target that contains the build specification. | +| build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | +| major | string | true | | Major version component for the PPL. | +| minor | string | true | | Minor version component for the PPL. | +| patch | string | true | | Patch version component for the PPL. | +| build | string | true | | Build number component for the PPL. | +| commit | string | true | | Commit hash or identifier recorded in the build. | +| docker_image | string | false | nationalinstruments/labview | Docker image name. | +| image_tag | string | false | 2026q1-linux | Docker image tag. | +| working_directory | string | false | | Working directory where the action will run. | +| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | +| dry_run | string | false | false | If true, simulate the action without side effects. | + +#### build-lvlibp-docker-windows | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | -| minimum_supported_lv_version | string | true | | LabVIEW version for the build (e.g., "2021", "2026"). | +| minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | | supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | | project_path | string | true | | Path to the LabVIEW project .lvproj file. | | target_name | string | true | | Target that contains the build specification. | @@ -373,7 +415,24 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | build | string | true | | Build number component for the PPL. | | commit | string | true | | Commit hash or identifier recorded in the build. | | docker_image | string | false | nationalinstruments/labview | Docker image name. | -| image_tag | string | false | | Docker image tag. Defaults to "2026q1-linux" if not specified. | +| image_tag | string | false | 2026q1-windows | Docker image tag. | +| working_directory | string | false | | Working directory where the action will run. | +| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | +| dry_run | string | false | false | If true, simulate the action without side effects. | + +#### build-lvlibp-win32 +| Name | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | +| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | +| project_path | string | true | | Path to the LabVIEW project .lvproj file. | +| target_name | string | true | | Target that contains the build specification. | +| build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | +| major | string | true | | Major version component for the PPL. | +| minor | string | true | | Minor version component for the PPL. | +| patch | string | true | | Patch version component for the PPL. | +| build | string | true | | Build number component for the PPL. | +| commit | string | true | | Commit hash or identifier recorded in the build. | | working_directory | string | false | | Working directory where the action will run. | | log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | | dry_run | string | false | false | If true, simulate the action without side effects. | diff --git a/ci_evidence.txt b/ci_evidence.txt index 4198b2d1..1d837aaf 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"902c150ed0bf20e8a82329d700be706666a3f4e7","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"7cb442bdb21c378b9933c584cd7a98ed52c6924b","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file From 34555ba981cf9ee46676c134520d2c77a675ae45 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 10 Mar 2026 11:22:33 +0530 Subject: [PATCH 18/49] Added build-lvlibp-win32 action [REQ-041] --- actions/OpenSourceActions.psd1 | 1 + actions/OpenSourceActions.psm1 | 51 +++++ artifacts/linux/action-docs.json | 68 +++++- artifacts/linux/action-docs.md | 23 +- build-lvlibp-win32/action.yml | 76 +++++++ ci_evidence.txt | 2 +- dispatchers.json | 66 ++++++ docs/actions/build-lvlibp-win32.md | 210 ++++++++++++++++++ docs/actions/index.md | 3 + docs/index.md | 3 + docs/scripts/build-lvlibp-win32.md | 129 +++++++++++ requirements.json | 7 + .../build-lvlibp-win32/BuildLvlibpWin32.ps1 | 148 ++++++++++++ .../BuildLvlibpWin32.Workflow.Tests.ps1 | 72 ++++++ 14 files changed, 856 insertions(+), 3 deletions(-) create mode 100644 build-lvlibp-win32/action.yml create mode 100644 docs/actions/build-lvlibp-win32.md create mode 100644 docs/scripts/build-lvlibp-win32.md create mode 100644 scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 create mode 100644 tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 diff --git a/actions/OpenSourceActions.psd1 b/actions/OpenSourceActions.psd1 index 5e7cabd9..d7b66c1b 100644 --- a/actions/OpenSourceActions.psd1 +++ b/actions/OpenSourceActions.psd1 @@ -16,6 +16,7 @@ 'Invoke-BuildLvlibp' 'Invoke-BuildLvlibpDockerLinux' 'Invoke-BuildLvlibpDockerWindows' + 'Invoke-BuildLvlibpWin32' 'Invoke-BuildViPackage' 'Invoke-CloseLabVIEW' 'Invoke-GenerateReleaseNotes' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index aa2c6fdf..0881ce8f 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -342,6 +342,57 @@ function Invoke-BuildLvlibpDockerWindows { return $result } +# Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. +# MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). +# SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). +# ProjectPath: Path to the LabVIEW project .lvproj file. +# TargetName: Target that contains the build specification. +# BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). +# Major: Major version component. +# Minor: Minor version component. +# Patch: Patch version component. +# Build: Build number component. +# Commit: Commit hash or identifier. +# DryRun: If set, prints the command instead of executing it. +# gcliPath: Optional path prepended to PATH for locating the g CLI. +function Invoke-BuildLvlibpWin32 { + [CmdletBinding()] + param( + [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, + [Parameter(Mandatory)] [string] $SupportedBitness, + [Parameter(Mandatory)] [string] $ProjectPath, + [Parameter(Mandatory)] [string] $TargetName, + [Parameter()] [string] $BuildSpecName = "", + [Parameter(Mandatory)] [int] $Major, + [Parameter(Mandatory)] [int] $Minor, + [Parameter(Mandatory)] [int] $Patch, + [Parameter(Mandatory)] [int] $Build, + [Parameter(Mandatory)] [string] $Commit, + [switch] $DryRun, + [string] $gcliPath + ) + Write-Information "Invoking BuildLvlibpWin32" -InformationAction Continue + + $result = Invoke-OpenSourceActionScript ` + -ScriptSegments @('build-lvlibp-win32', 'BuildLvlibpWin32.ps1') ` + -Arguments @{ + MinimumSupportedLVVersion = $MinimumSupportedLVVersion + SupportedBitness = $SupportedBitness + ProjectPath = $ProjectPath + TargetName = $TargetName + BuildSpecName = $BuildSpecName + Major = $Major + Minor = $Minor + Patch = $Patch + Build = $Build + Commit = $Commit + } ` + -DryRun:$DryRun ` + -gcliPath $gcliPath + + return $result +} + # Closes any running instance of LabVIEW. # MinimumSupportedLVVersion: Minimum LabVIEW version that the project supports. # SupportedBitness: Target LabVIEW bitness (32- or 64-bit). diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index 09a1d4df..dc240fa1 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -352,6 +352,72 @@ } } }, + "Invoke-BuildLvlibpWin32": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { @@ -1365,7 +1431,7 @@ }, { "name": "supported_bitness", - "description": "Bitness of the LabVIEW environment (\"32\" or \"64\").", + "description": "Bitness of the LabVIEW environment (\"32\").", "required": true, "default": "", "type": "string" diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 7e33bc69..8189a6c3 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -121,6 +121,27 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows -ArgsJson '{}' ``` +#### Invoke-BuildLvlibpWin32 +Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +| Parameter | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| Build | number | true | | Build number component | +| BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | +| Commit | string | true | | Commit hash or identifier | +| DryRun | boolean | false | | If set, prints the command instead of executing it | +| Major | number | true | | Major version component | +| MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | +| Minor | number | true | | Minor version component | +| Patch | number | true | | Patch version component | +| ProjectPath | string | true | | Path to the LabVIEW project | +| SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | +| TargetName | string | true | | Target that contains the build specification | +| gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | + +```powershell +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpWin32 -ArgsJson '{}' +``` + #### Invoke-BuildViPackage Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | @@ -424,7 +445,7 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | -| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | +| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32"). | | project_path | string | true | | Path to the LabVIEW project .lvproj file. | | target_name | string | true | | Target that contains the build specification. | | build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | diff --git a/build-lvlibp-win32/action.yml b/build-lvlibp-win32/action.yml new file mode 100644 index 00000000..1a329269 --- /dev/null +++ b/build-lvlibp-win32/action.yml @@ -0,0 +1,76 @@ +name: 'Build LVLIBP Win32' +description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner' +inputs: + minimum_supported_lv_version: + description: 'LabVIEW version year for the build (e.g., "2021", "2026").' + required: true + supported_bitness: + description: 'Bitness of the LabVIEW environment ("32").' + required: true + project_path: + description: 'Path to the LabVIEW project .lvproj file.' + required: true + target_name: + description: 'Target that contains the build specification.' + required: true + build_spec_name: + description: 'Name of the build specification. If empty, builds all specifications in the target.' + required: false + default: '' + major: + description: 'Major version component for the PPL.' + required: true + minor: + description: 'Minor version component for the PPL.' + required: true + patch: + description: 'Patch version component for the PPL.' + required: true + build: + description: 'Build number component for the PPL.' + required: true + commit: + description: 'Commit hash or identifier recorded in the build.' + required: true + working_directory: + description: 'Working directory where the action will run.' + required: false + log_level: + description: 'Verbosity level (ERROR|WARN|INFO|DEBUG).' + default: 'INFO' + required: false + dry_run: + description: 'If true, simulate the action without side effects.' + default: false + required: false + +runs: + using: 'composite' + steps: + - name: Dispatch build-lvlibp-win32 + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + $args = @{ + MinimumSupportedLVVersion = '${{ inputs.minimum_supported_lv_version }}' + SupportedBitness = '${{ inputs.supported_bitness }}' + ProjectPath = '${{ inputs.project_path }}' + TargetName = '${{ inputs.target_name }}' + Major = [int]'${{ inputs.major }}' + Minor = [int]'${{ inputs.minor }}' + Patch = [int]'${{ inputs.patch }}' + Build = [int]'${{ inputs.build }}' + Commit = '${{ inputs.commit }}' + } + if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } + + $params = @{ + ActionName = 'build-lvlibp-win32' + ArgsJson = ($args | ConvertTo-Json -Compress) + LogLevel = '${{ inputs.log_level }}' + } + if ('${{ inputs.dry_run }}' -eq 'true') { $params['DryRun'] = $true } + if ('${{ inputs.working_directory }}') { $params['WorkingDirectory'] = '${{ inputs.working_directory }}' } + + & '${{ github.action_path }}/../actions/Invoke-OSAction.ps1' @params + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/ci_evidence.txt b/ci_evidence.txt index 1d837aaf..0ea57d09 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"7cb442bdb21c378b9933c584cd7a98ed52c6924b","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"b4337fbbc72f8962e4cba2e45f475352c81d13f8","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index d51aded3..a2c15670 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -350,6 +350,72 @@ } } }, + "Invoke-BuildLvlibpWin32": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": true, + "description": "Build number component" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": true, + "description": "Commit hash or identifier" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "Major": { + "type": "number", + "required": true, + "description": "Major version component" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": true, + "description": "Minor version component" + }, + "Patch": { + "type": "number", + "required": true, + "description": "Patch version component" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": true, + "description": "Target that contains the build specification" + } + } + }, "Invoke-BuildViPackage": { "description": "Builds a VI Package using the provided VIPB file and version metadata. MinimumSupportedLVVersion: Minimum LabVIEW version that the package supports. SupportedBitness: Target LabVIEW bitness (32- or 64-bit). LabVIEWMinorRevision: Minor revision of LabVIEW used to build the package. RelativePath: Normalized path to the project root relative to the working directory. VIPBPath: Path to the VIPB build specification file. Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit identifier used for the build metadata. DisplayInformationJSON: JSON string containing display information for the package. ReleaseNotesFile: Optional path to a release notes file. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { diff --git a/docs/actions/build-lvlibp-win32.md b/docs/actions/build-lvlibp-win32.md new file mode 100644 index 00000000..187cf280 --- /dev/null +++ b/docs/actions/build-lvlibp-win32.md @@ -0,0 +1,210 @@ +# build-lvlibp-win32 + +## Purpose + +Builds LabVIEW Packed Project Library (.lvlibp) files using LabVIEW installed on a Windows GitHub-hosted runner. This action executes the LabVIEW build specification through LabVIEWCLI, embedding version information and commit metadata. + +Use this action when you need to build PPL files on GitHub-hosted Windows runners with locally installed LabVIEW (no Docker required). + +## Parameters + +Common parameters are described in [Common parameters](../common-parameters.md). + +### Required + +- **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2025"`). +- **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). +- **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. +- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). +- **Major** (`int`): Major version component for the PPL. +- **Minor** (`int`): Minor version component for the PPL. +- **Patch** (`int`): Patch version component for the PPL. +- **Build** (`int`): Build number component for the PPL. +- **Commit** (`string`): Commit hash or identifier recorded in the build. + +### Optional + +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. + +### GitHub Action inputs + +| Input | CLI parameter | Description | +| --- | --- | --- | +| `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | +| `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | +| `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | +| `target_name` | `TargetName` | Target that contains the build specification. | +| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | +| `major` | `Major` | Major version component. | +| `minor` | `Minor` | Minor version component. | +| `patch` | `Patch` | Patch version component. | +| `build` | `Build` | Build number component. | +| `commit` | `Commit` | Commit hash or identifier. | +| `working_directory` | `WorkingDirectory` | Base directory for the action. | +| `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | +| `dry_run` | `DryRun` | If true, simulate without side effects. | + +## Examples + +### CLI + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson '{ + "MinimumSupportedLVVersion": "2025", + "SupportedBitness": "32", + "ProjectPath": "lv_icon_editor.lvproj", + "TargetName": "My Computer", + "BuildSpecName": "Editor Packed Library", + "Major": 1, + "Minor": 0, + "Patch": 0, + "Build": 0, + "Commit": "abc1234" +}' +``` + +### GitHub Action + +```yaml +- name: Build PPL with GitHub-hosted Runner + uses: owner/repo/build-lvlibp-win32@v1 + with: + minimum_supported_lv_version: '2025' + supported_bitness: '32' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: 'Editor Packed Library' + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} +``` + +### Complete Workflow with LabVIEW Setup + +```yaml +name: Build LVLIBP + +on: + push: + branches: [main] + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup NI Package Manager + uses: owner/repo/setup-nipm@v1 + with: + log_level: 'INFO' + + - name: Setup LabVIEW + uses: ni/open-source/setup-labview@v1 + with: + labview_iso_url: 'https://download.ni.com/.../ni-labview-2025-community-x86_25.3.3_offline.iso' + timeout_seconds: 1800 + serial_number: ${{ secrets.LABVIEW_SERIAL_NUMBER }} + package_id: 'LabVIEW_COM_PKG 25.0300' + + - name: Extract version + id: version + shell: pwsh + run: | + $pkg = Get-Content package.json | ConvertFrom-Json + $parts = $pkg.version -split '\.' + "major=$($parts[0])" >> $env:GITHUB_OUTPUT + "minor=$($parts[1])" >> $env:GITHUB_OUTPUT + "patch=$($parts[2])" >> $env:GITHUB_OUTPUT + + - name: Build PPL + uses: ni/open-source/build-lvlibp-win32@v1 + with: + minimum_supported_lv_version: '2025' + supported_bitness: '32' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: 'Editor Packed Library' + major: ${{ steps.version.outputs.major }} + minor: ${{ steps.version.outputs.minor }} + patch: ${{ steps.version.outputs.patch }} + build: ${{ github.run_number }} + commit: ${{ github.sha }} + + - name: Upload Built PPL + uses: actions/upload-artifact@v4 + if: success() + with: + name: lv_icon_x86_v${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }}.${{ github.run_number }}+g${{ github.sha }} + path: builds/*.lvlibp + retention-days: 7 + + - name: Upload Build Logs + uses: actions/upload-artifact@v4 + if: always() + with: + name: build-logs + path: build-logs/*.log + retention-days: 3 + if-no-files-found: ignore +``` + +### Build All Specifications + +```yaml +- name: Build All PPLs + uses: ni/open-source/build-lvlibp-win32@v1 + with: + minimum_supported_lv_version: '2025' + supported_bitness: '32' + project_path: 'lv_icon_editor.lvproj' + target_name: 'My Computer' + build_spec_name: '' # Empty - builds all specifications + major: 1 + minor: 0 + patch: 0 + build: 0 + commit: ${{ github.sha }} +``` + +## Behavior + +1. Uses the LabVIEWPath: `C:\Program Files (x86)\National Instruments\LabVIEW {version}\LabVIEW.exe` +2. Verifies that LabVIEW exists at the expected path +3. Verifies that the project file exists +4. Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters +5. Copies LabVIEW logs from `%TEMP%` to `build-logs\` directory for artifact collection +6. On failure, exits with the build error code + +## Return Codes + +- `0` – success +- non-zero – build failed or LabVIEW not found + +## Requirements + +- LabVIEW must be installed at the expected path (use `setup-labview` action) +- LabVIEWCLI must be available in the PATH +- The LabVIEW project file must exist at the specified path +- The target and build specification must exist in the project +- Windows runner (Windows Server 2019, 2022, or Windows 10/11) + +## Platform Support + +This action is designed for Windows GitHub-hosted runners with locally installed LabVIEW. + +For containerized builds, see: + +- [build-lvlibp-docker-windows](build-lvlibp-docker-windows.md) – Windows Docker PPL build action +- [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) – Linux Docker PPL build action + +## See also + +- [build-lvlibp-docker-windows](build-lvlibp-docker-windows.md) – Windows Docker PPL build action +- [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) – Linux Docker PPL build action +- [setup-labview](setup-labview.md) – LabVIEW installation action +- [setup-nipm](setup-nipm.md) – NI Package Manager setup action +- [Architecture documentation](../architecture.md) diff --git a/docs/actions/index.md b/docs/actions/index.md index 990b95da..3366b1b0 100644 --- a/docs/actions/index.md +++ b/docs/actions/index.md @@ -5,6 +5,9 @@ List of available GitHub Actions. - [add-token-to-labview](./add-token-to-labview.md): Add a custom library path token to the LabVIEW INI file so LabVIEW can locate project libraries. - [apply-vipc](./apply-vipc.md): Apply a VI Package Configuration (.vipc) file to a specific LabVIEW installation using g-cli. - [build-lvlibp](./build-lvlibp.md): Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp) +- [build-lvlibp-docker-linux](./build-lvlibp-docker-linux.md) – Build LVLIBP using Linux Docker container +- [build-lvlibp-docker-windows](./build-lvlibp-docker-windows.md) – Build LVLIBP using Windows Docker container +- [build-lvlibp-win32](./build-lvlibp-win32.md) – Build LVLIBP using Windows GitHub-hosted runner - [build-vi-package](./build-vi-package.md): Update VIPB display information and build a VI package using g-cli. - [build](./build.md): Automate building the LabVIEW Icon Editor project, including cleaning, building libraries, and packaging. - [close-labview](./close-labview.md): Gracefully close a running LabVIEW instance via g-cli. diff --git a/docs/index.md b/docs/index.md index cbd664aa..081288ac 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,6 +24,9 @@ Open Source LabVIEW Actions unifies LabVIEW [CI/CD](glossary.md#ci-cd) scripts b | [apply-vipc](actions/apply-vipc.md) | Apply a VI Package Configuration (.vipc) file to a specific LabVIEW installation using g-cli. | | [build](actions/build.md) | Automate building the LabVIEW Icon Editor project, including cleaning, building libraries, and packaging. | | [build-lvlibp](actions/build-lvlibp.md) | Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp). | +| [build-lvlibp-docker-linux](actions/build-lvlibp-docker-linux.md) | Build LVLIBP with Linux Docker. | +| [build-lvlibp-docker-windows](actions/build-lvlibp-docker-windows.md) | Build LVLIBP with Windows Docker. | +| [build-lvlibp-win32](actions/build-lvlibp-win32.md) | Build LVLIBP with Windows runner. | | [build-vi-package](actions/build-vi-package.md) | Update VIPB display information and build a VI package using g-cli. | | [close-labview](actions/close-labview.md) | Gracefully close a running LabVIEW instance via g-cli. | | [generate-release-notes](actions/generate-release-notes.md) | Generate release notes from the git history and write them to a markdown file. | diff --git a/docs/scripts/build-lvlibp-win32.md b/docs/scripts/build-lvlibp-win32.md new file mode 100644 index 00000000..ced21b73 --- /dev/null +++ b/docs/scripts/build-lvlibp-win32.md @@ -0,0 +1,129 @@ +# Build Packed Library with Windows Runner πŸ–₯οΈπŸ“¦ + +Call **`BuildLvlibpWin32.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI on a Windows GitHub-hosted runner. + +## Inputs + +| Name | Required | Example | Description | +|------|----------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | `2025` | LabVIEW version year to use. | +| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | +| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | +| `major` | **Yes** | `1` | Major version component. | +| `minor` | **Yes** | `0` | Minor version component. | +| `patch` | **Yes** | `0` | Patch version component. | +| `build` | **Yes** | `1` | Build number component. | +| `commit` | **Yes** | `abcdef` | Commit identifier. | + +## Quick-start + +The following example builds using LabVIEW 2025 (32-bit) on a Windows runner. + +```yaml +- uses: ./.github/actions/build-lvlibp-win32 + with: + minimum_supported_lv_version: 2025 + supported_bitness: 32 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: Editor Packed Library + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} +``` + +## Complete Example with LabVIEW Setup + +This example shows the full workflow including LabVIEW installation: + +```yaml +name: Build LVLIBP + +on: + push: + branches: [main] + +jobs: + build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup NI Package Manager + uses: ./.github/actions/setup-nipm + with: + log_level: 'INFO' + + - name: Setup LabVIEW + uses: ./.github/actions/setup-labview + with: + labview_iso_url: 'https://download.ni.com/.../ni-labview-2025-community-x86_25.3.3_offline.iso' + timeout_seconds: 1800 + serial_number: ${{ secrets.LABVIEW_SERIAL_NUMBER }} + package_id: 'LabVIEW_COM_PKG 25.0300' + + - name: Build PPL + uses: ./.github/actions/build-lvlibp-win32 + with: + minimum_supported_lv_version: 2025 + supported_bitness: 32 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: Editor Packed Library + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} + + - name: Upload Built PPL + uses: actions/upload-artifact@v4 + with: + name: lv_icon_x86_v1.0.0.1 + path: builds/*.lvlibp +``` + +## Build All Specifications + +Leave `build_spec_name` empty to build all build specifications under the target: + +```yaml +- uses: ./.github/actions/build-lvlibp-win32 + with: + minimum_supported_lv_version: 2025 + supported_bitness: 32 + project_path: lv_icon_editor.lvproj + target_name: My Computer + build_spec_name: '' + major: 1 + minor: 0 + patch: 0 + build: 1 + commit: ${{ github.sha }} +``` + +## Requirements + +- LabVIEW must be installed on the runner (use `setup-labview` action) +- LabVIEWCLI must be available in the PATH +- Windows runner (Windows Server 2019, 2022, or Windows 10/11) + +## Platform Notes + +This action requires **Windows runners** with locally installed LabVIEW. + +For containerized builds: + +- Windows containers: [build-lvlibp-docker-windows](build-lvlibp-docker-windows.md) +- Linux containers: [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) + +See also: [docs/actions/build-lvlibp-win32.md](../actions/build-lvlibp-win32.md) + +## License + +This directory inherits the root repository's license (MIT, unless otherwise noted). diff --git a/requirements.json b/requirements.json index ecc44bca..61e2c705 100644 --- a/requirements.json +++ b/requirements.json @@ -274,6 +274,13 @@ "BuildLvlibpDockerWindows.Workflow.Tests" ] }, + { + "id": "REQ-041", + "description": "Build LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner with locally installed LabVIEW.", + "tests": [ + "BuildLvlibpWin32.Workflow.Tests" + ] + }, { "id": "REQIE-001", "description": "After checking out the LabVIEW icon editor repository, PreSequence: The sequencer shall enumerate and record the build matrix used by the workflow (LabVIEW versions and bitness). Acceptance: a 'matrix.json' file exists listing each tuple {\"lv-version\": \"2021\"|\"2023\", \"bitness\": \"32\"|\"64\"} with at least [ [\"2021\",\"32\"], [\"2021\",\"64\"], [\"2023\",\"64\"] ]. g-cli is expected at 'C:\\Program Files\\G-CLI\\bin\\g-cli.exe'.", diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 new file mode 100644 index 00000000..99457276 --- /dev/null +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -0,0 +1,148 @@ +<# +.SYNOPSIS + Builds the LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. + +.DESCRIPTION + Executes LabVIEW build specification through LabVIEWCLI on a Windows GitHub-hosted runner, + embedding the provided version information and commit identifier. + +.PARAMETER MinimumSupportedLVVersion + LabVIEW version year used for the build (e.g., "2021", "2023", "2026"). + +.PARAMETER SupportedBitness + Bitness of the LabVIEW environment ("32"). + +.PARAMETER ProjectPath + Path to the LabVIEW project .lvproj file that contains the build specification. + +.PARAMETER TargetName + Target that contains the build specification. + +.PARAMETER BuildSpecName + Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. + +.PARAMETER Major + Major version component for the PPL. + +.PARAMETER Minor + Minor version component for the PPL. + +.PARAMETER Patch + Patch version component for the PPL. + +.PARAMETER Build + Build number component for the PPL. + +.PARAMETER Commit + Commit hash or identifier recorded in the build. + +.EXAMPLE + .\BuildLvlibpWin32.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" + +.NOTES + [REQ-041] Build LabVIEW Packed Project Library using Windows GitHub-hosted runner +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)] + [string]$MinimumSupportedLVVersion, + + [Parameter(Mandatory = $true)] + [string]$SupportedBitness, + + [Parameter(Mandatory = $true)] + [string]$ProjectPath, + + [Parameter(Mandatory = $true)] + [string]$TargetName, + + [Parameter(Mandatory = $false)] + [string]$BuildSpecName = "", + + [Parameter(Mandatory = $true)] + [int]$Major, + + [Parameter(Mandatory = $true)] + [int]$Minor, + + [Parameter(Mandatory = $true)] + [int]$Patch, + + [Parameter(Mandatory = $true)] + [int]$Build, + + [Parameter(Mandatory = $true)] + [string]$Commit +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +try { + Write-Verbose "Building PPL with Windows GitHub-hosted runner" + Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue + Write-Information "Commit: $Commit" -InformationAction Continue + + # Construct LabVIEWPath for Windows + $labviewPath = "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + + if (-not (Test-Path $labviewPath)) { + throw "LabVIEW not found at: $labviewPath" + } + + Write-Verbose "LabVIEWPath: $labviewPath" + Write-Information "Project: $ProjectPath" -InformationAction Continue + Write-Information "Target: $TargetName" -InformationAction Continue + Write-Information "Build Spec: $(if ($BuildSpecName) { $BuildSpecName } else { '' })" -InformationAction Continue + + # Verify project file exists + if (-not (Test-Path $ProjectPath)) { + throw "Project file not found: $ProjectPath" + } + + # Construct LabVIEWCLI command + $cliArgs = @( + '-OperationName', 'ExecuteBuildSpec' + '-LabVIEWPath', $labviewPath + '-ProjectPath', (Resolve-Path $ProjectPath).Path + '-TargetName', $TargetName + ) + + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + $cliArgs += '-BuildSpecName', $BuildSpecName + } + + $cliArgs += '-Headless' + + Write-Information "Executing: LabVIEWCLI $($cliArgs -join ' ')" -InformationAction Continue + + # Execute LabVIEWCLI + & LabVIEWCLI @cliArgs + $buildExitCode = $LASTEXITCODE + Write-Information "Build exit code: $buildExitCode" -InformationAction Continue + + # Copy LabVIEW logs to workspace for artifact collection + Write-Information "Copying LabVIEW logs to workspace..." -InformationAction Continue + $logDir = "build-logs" + New-Item -Path $logDir -ItemType Directory -Force | Out-Null + + $tempLogs = Get-ChildItem -Path $env:TEMP -Filter "lvtemporary_*.log" -ErrorAction SilentlyContinue + if ($tempLogs) { + Copy-Item -Path $tempLogs.FullName -Destination $logDir -Force -ErrorAction SilentlyContinue + Write-Information "Logs copied to $logDir" -InformationAction Continue + } else { + Write-Warning "No LabVIEW log files found in $env:TEMP" + } + + if ($buildExitCode -ne 0) { + throw "Build failed with exit code $buildExitCode" + } + + Write-Information "Build succeeded" -InformationAction Continue + exit 0 +} +catch { + Write-Error "BuildLvlibpWin32 failed: $_" + exit 1 +} \ No newline at end of file diff --git a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 new file mode 100644 index 00000000..92647858 --- /dev/null +++ b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 @@ -0,0 +1,72 @@ +#requires -Version 7.0 +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +Describe 'BuildLvlibpWin32.Workflow' { + $meta = @{ + requirement = 'REQ-041' + Owner = 'NI' + Evidence = 'tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1' + } + + BeforeAll { + $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path + Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force + } + + It 'validates build-lvlibp-win32 action exists in dispatcher registry [REQ-041]' -Tag 'REQ-041' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $dispatchers.'build-lvlibp-win32' | Should -Not -BeNullOrEmpty + $dispatchers.'build-lvlibp-win32'.function | Should -Be 'Invoke-BuildLvlibpWin32' + } + + It 'validates required parameters are defined [REQ-041]' -Tag 'REQ-041' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-win32' + $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty + $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty + $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.Major | Should -Not -BeNullOrEmpty + $action.parameters.Minor | Should -Not -BeNullOrEmpty + $action.parameters.Patch | Should -Not -BeNullOrEmpty + $action.parameters.Build | Should -Not -BeNullOrEmpty + $action.parameters.Commit | Should -Not -BeNullOrEmpty + } + + It 'executes dry-run without errors [REQ-041]' -Tag 'REQ-041' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-win32' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates module function throws when required parameters are missing [REQ-041]' -Tag 'REQ-041' { + { Invoke-BuildLvlibpWin32 } | Should -Throw + } + + It 'accepts optional parameters in dry-run [REQ-041]' -Tag 'REQ-041' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-win32' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + + It 'validates action.yml exists [REQ-041]' -Tag 'REQ-041' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-win32' 'action.yml' + Test-Path $actionPath | Should -Be $true + } + + It 'validates implementation script exists [REQ-041]' -Tag 'REQ-041' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-win32' 'BuildLvlibpWin32.ps1' + Test-Path $scriptPath | Should -Be $true + } +} \ No newline at end of file From 74c14874a6c2b6dd98880511aa01fdc78452f998 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 10 Mar 2026 12:07:50 +0530 Subject: [PATCH 19/49] Added entries in docs [REQ-040] --- docs/actions/build-lvlibp-docker-windows.md | 2 +- docs/actions/index.md | 2 ++ docs/index.md | 2 ++ docs/scripts/build-lvlibp-docker-windows.md | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/actions/build-lvlibp-docker-windows.md b/docs/actions/build-lvlibp-docker-windows.md index a19bbe41..9baf3a8c 100644 --- a/docs/actions/build-lvlibp-docker-windows.md +++ b/docs/actions/build-lvlibp-docker-windows.md @@ -26,7 +26,7 @@ Common parameters are described in [Common parameters](../common-parameters.md). - **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. - **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. -- **ImageTag** (`string`): Docker image tag. Default: `"2026-windows"`. +- **ImageTag** (`string`): Docker image tag. Default: `"2026q1-windows"`. ### GitHub Action inputs diff --git a/docs/actions/index.md b/docs/actions/index.md index 990b95da..d90d2b9a 100644 --- a/docs/actions/index.md +++ b/docs/actions/index.md @@ -5,6 +5,8 @@ List of available GitHub Actions. - [add-token-to-labview](./add-token-to-labview.md): Add a custom library path token to the LabVIEW INI file so LabVIEW can locate project libraries. - [apply-vipc](./apply-vipc.md): Apply a VI Package Configuration (.vipc) file to a specific LabVIEW installation using g-cli. - [build-lvlibp](./build-lvlibp.md): Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp) +- [build-lvlibp-docker-linux](./build-lvlibp-docker-linux.md) – Build LVLIBP with Linux Docker +- [build-lvlibp-docker-windows](./build-lvlibp-docker-windows.md) – Build LVLIBP with Windows Docker - [build-vi-package](./build-vi-package.md): Update VIPB display information and build a VI package using g-cli. - [build](./build.md): Automate building the LabVIEW Icon Editor project, including cleaning, building libraries, and packaging. - [close-labview](./close-labview.md): Gracefully close a running LabVIEW instance via g-cli. diff --git a/docs/index.md b/docs/index.md index cbd664aa..40ed670d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,6 +24,8 @@ Open Source LabVIEW Actions unifies LabVIEW [CI/CD](glossary.md#ci-cd) scripts b | [apply-vipc](actions/apply-vipc.md) | Apply a VI Package Configuration (.vipc) file to a specific LabVIEW installation using g-cli. | | [build](actions/build.md) | Automate building the LabVIEW Icon Editor project, including cleaning, building libraries, and packaging. | | [build-lvlibp](actions/build-lvlibp.md) | Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp). | +| [build-lvlibp-docker-linux](actions/build-lvlibp-docker-linux.md) | Build LVLIBP with Linux Docker | +| [build-lvlibp-docker-windows](actions/build-lvlibp-docker-windows.md) | Build LVLIBP with Windows Docker | | [build-vi-package](actions/build-vi-package.md) | Update VIPB display information and build a VI package using g-cli. | | [close-labview](actions/close-labview.md) | Gracefully close a running LabVIEW instance via g-cli. | | [generate-release-notes](actions/generate-release-notes.md) | Generate release notes from the git history and write them to a markdown file. | diff --git a/docs/scripts/build-lvlibp-docker-windows.md b/docs/scripts/build-lvlibp-docker-windows.md index 34adf59c..0d4503b9 100644 --- a/docs/scripts/build-lvlibp-docker-windows.md +++ b/docs/scripts/build-lvlibp-docker-windows.md @@ -17,7 +17,7 @@ Call **`BuildLvlibpDockerWindows.ps1`** to compile LabVIEW packed libraries usin | `build` | **Yes** | `1` | Build number component. | | `commit` | **Yes** | `abcdef` | Commit identifier. | | `docker_image` | No | `nationalinstruments/labview` | Docker image name. | -| `image_tag` | No | `2026-windows` | Docker image tag. | +| `image_tag` | No | `2026q1-windows` | Docker image tag. | ## Quick-start @@ -37,7 +37,7 @@ The following example builds using LabVIEW 2026 inside a Windows Docker containe build: 1 commit: ${{ github.sha }} docker_image: nationalinstruments/labview - image_tag: 2026-windows + image_tag: 2026q1-windows ``` ## Build All Specifications From 24d996b494c6561f73566f8746ecb61270869610 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 10 Mar 2026 12:20:17 +0530 Subject: [PATCH 20/49] Provided explicit LabVIEWCLI path and also minor doc updates [REQ-041] --- docs/actions/build-lvlibp-win32.md | 4 ++-- scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/actions/build-lvlibp-win32.md b/docs/actions/build-lvlibp-win32.md index 187cf280..14147f49 100644 --- a/docs/actions/build-lvlibp-win32.md +++ b/docs/actions/build-lvlibp-win32.md @@ -67,7 +67,7 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson ```yaml - name: Build PPL with GitHub-hosted Runner - uses: owner/repo/build-lvlibp-win32@v1 + uses: ni/open-source/build-lvlibp-win32@v1 with: minimum_supported_lv_version: '2025' supported_bitness: '32' @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@v4 - name: Setup NI Package Manager - uses: owner/repo/setup-nipm@v1 + uses: ni/open-source/setup-nipm@v1 with: log_level: 'INFO' diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index 99457276..81c01b54 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -86,6 +86,7 @@ try { # Construct LabVIEWPath for Windows $labviewPath = "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + $labviewCLI = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" if (-not (Test-Path $labviewPath)) { throw "LabVIEW not found at: $labviewPath" @@ -118,7 +119,7 @@ try { Write-Information "Executing: LabVIEWCLI $($cliArgs -join ' ')" -InformationAction Continue # Execute LabVIEWCLI - & LabVIEWCLI @cliArgs + & $labviewCLI @cliArgs $buildExitCode = $LASTEXITCODE Write-Information "Build exit code: $buildExitCode" -InformationAction Continue From fa5a4a3dd912a85d79f1f08e3a7d94de59cb711a Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 16:53:41 +0530 Subject: [PATCH 21/49] Updated Version setting logic [REQ-039] --- ci_evidence.txt | 2 +- docs/actions/build-lvlibp-docker-linux.md | 74 ++++++++++++------- docs/scripts/build-lvlibp-docker-linux.md | 44 ++++++----- .../BuildLvlibpDockerLinux.ps1 | 62 ++++++++++------ .../build-lvlibp-docker-linux/build-lvlibp.sh | 61 ++++++++++++++- 5 files changed, 172 insertions(+), 71 deletions(-) diff --git a/ci_evidence.txt b/ci_evidence.txt index 0ea57d09..35175759 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"b4337fbbc72f8962e4cba2e45f475352c81d13f8","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"3d17593846ab3dde8444de662ffc6c52f75dc930","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/docs/actions/build-lvlibp-docker-linux.md b/docs/actions/build-lvlibp-docker-linux.md index 0b790029..18ba0dea 100644 --- a/docs/actions/build-lvlibp-docker-linux.md +++ b/docs/actions/build-lvlibp-docker-linux.md @@ -2,9 +2,9 @@ ## Purpose -Builds LabVIEW Packed Project Library (.lvlibp) files using a Linux LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata, then renames the resulting artifact with a standardized naming convention. +Builds LabVIEW Packed Project Library (.lvlibp) files using a Linux LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a containerized Linux environment, optionally embedding version information and commit metadata. -Use this action when you need to build PPL files in containerized Linux environments (CI/CD pipelines) without installing LabVIEW directly on the host system. +Use this action when you need to build PPL files in a Linux Docker container, ensuring a consistent and isolated build environment. ## Parameters @@ -15,16 +15,16 @@ Common parameters are described in [Common parameters](../common-parameters.md). - **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2026"`). - **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). - **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. -- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). -- **Major** (`int`): Major version component for the PPL. -- **Minor** (`int`): Minor version component for the PPL. -- **Patch** (`int`): Patch version component for the PPL. -- **Build** (`int`): Build number component for the PPL. -- **Commit** (`string`): Commit hash or identifier recorded in the build. ### Optional -- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **TargetName** (`string`): Target that contains the build specification. Defaults to `"My Computer"` in helper VI if not provided. +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications in the project. +- **Major** (`int`): Major version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Minor** (`int`): Minor version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Patch** (`int`): Patch version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Build** (`int`): Build number component for the PPL. If not provided (or < 0), version setting is skipped. +- **Commit** (`string`): Commit hash or identifier recorded in the build (for documentation purposes). - **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. - **ImageTag** (`string`): Docker image tag. Default: `"2026q1-linux"`. @@ -35,15 +35,15 @@ Common parameters are described in [Common parameters](../common-parameters.md). | `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | | `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | | `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | -| `target_name` | `TargetName` | Target that contains the build specification. | +| `target_name` | `TargetName` | Target that contains the build specification (optional). | | `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | -| `major` | `Major` | Major version component. | -| `minor` | `Minor` | Minor version component. | -| `patch` | `Patch` | Patch version component. | -| `build` | `Build` | Build number component. | -| `commit` | `Commit` | Commit hash or identifier. | -| `docker_image` | `DockerImage` | Docker image name. | -| `image_tag` | `ImageTag` | Docker image tag. | +| `major` | `Major` | Major version component (optional). | +| `minor` | `Minor` | Minor version component (optional). | +| `patch` | `Patch` | Patch version component (optional). | +| `build` | `Build` | Build number component (optional). | +| `commit` | `Commit` | Commit hash or identifier (optional). | +| `docker_image` | `DockerImage` | Docker image name (optional). | +| `image_tag` | `ImageTag` | Docker image tag (optional). | | `working_directory` | `WorkingDirectory` | Base directory for the action. | | `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | | `dry_run` | `DryRun` | If true, simulate without side effects. | @@ -99,7 +99,6 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-linux -Ar supported_bitness: '64' project_path: 'lv_icon_editor.lvproj' target_name: 'My Computer' - build_spec_name: '' # Empty - builds all specifications major: 1 minor: 0 patch: 0 @@ -109,13 +108,38 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-linux -Ar ## Behavior -1. Pulls the specified Linux Docker image (e.g., `nationalinstruments/labview:2026q1-linux`) -2. Mounts the workspace directory into the container at `/workspace` -3. Mounts the bash build script into the container at `/tmp/build-lvlibp.sh` -4. Constructs the LabVIEWPath (`/usr/local/natinst/LabVIEW-{version}-{bitness}/labview`) -5. Executes the bash script which runs `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters -6. On success, searches for `.lvlibp` files in the `builds` directory and renames them with version and commit metadata (e.g., `lv_icon_x64_v1.0.0.0+gabc1234.lvlibp`) -7. On failure, exits with the build error code +1. **Version Setting**: + + - If all version components (`Major`, `Minor`, `Patch`, `Build`) are provided (β‰₯ 0), the helper VI is called to set the version + - If any version component is missing or < 0, version setting is skipped and build specs use their own versions + - When version is provided: + - If `BuildSpecName` is specified: version is set on that build spec only + - If `BuildSpecName` is omitted: version is set on **all** build specs in the project + +2. **Docker Image Pull**: + + - Pulls the specified Docker image (or default `nationalinstruments/labview:2026q1-linux`) + - Verifies the pull was successful + +3. **LabVIEW Path Construction**: + + - Container path: `/usr/local/natinst/LabVIEW-{version}-{bitness}/labview` + - Example: `/usr/local/natinst/LabVIEW-2026-64/labview` + +4. **Build Execution**: + + - Mounts current directory to `/workspace` in container + - Mounts build script to `/tmp/build-lvlibp.sh` in container + - Calls helper VI to set version (if version parameters provided) + - Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` inside container + +5. **Log Collection**: + + - Copies LabVIEW logs from `/tmp` to `/workspace/build-logs` for artifact collection + +6. **Error Handling**: + + - On failure, exits with the build error code ## Return Codes diff --git a/docs/scripts/build-lvlibp-docker-linux.md b/docs/scripts/build-lvlibp-docker-linux.md index b29c41cf..5bb1b0da 100644 --- a/docs/scripts/build-lvlibp-docker-linux.md +++ b/docs/scripts/build-lvlibp-docker-linux.md @@ -4,20 +4,20 @@ Call **`BuildLvlibpDockerLinux.ps1`** to compile LabVIEW packed libraries using ## Inputs -| Name | Required | Example | Description | -|------|----------|---------|-------------| -| `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version year to use. | -| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | -| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | -| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | -| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | -| `major` | **Yes** | `1` | Major version component. | -| `minor` | **Yes** | `0` | Minor version component. | -| `patch` | **Yes** | `0` | Patch version component. | -| `build` | **Yes** | `1` | Build number component. | -| `commit` | **Yes** | `abcdef` | Commit identifier. | -| `docker_image` | No | `nationalinstruments/labview` | Docker image name. | -| `image_tag` | No | `2026q1-linux` | Docker image tag. | +| Name | Required | Default | Example | Description | +|------|----------|---------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | - | `2026` | LabVIEW version year to use. | +| `supported_bitness` | **Yes** | - | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | - | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | No | `""` | `My Computer` | Target containing the build spec. Defaults to "My Computer" in helper VI. | +| `build_spec_name` | No | `""` | `Editor Packed Library` | Build spec name. If empty, builds all specs. | +| `major` | No | `-1` | `1` | Major version component. If < 0, version setting is skipped. | +| `minor` | No | `-1` | `0` | Minor version component. If < 0, version setting is skipped. | +| `patch` | No | `-1` | `0` | Patch version component. If < 0, version setting is skipped. | +| `build` | No | `-1` | `1` | Build number component. If < 0, version setting is skipped. | +| `commit` | No | `""` | `abcdef` | Commit identifier. | +| `docker_image` | No | `nationalinstruments/labview` | Custom image name | Docker image to use. | +| `image_tag` | No | `2026q1-linux` | Custom tag | Docker image tag. | ## Quick-start @@ -40,9 +40,9 @@ The following example builds using LabVIEW 2026 inside a Linux Docker container. image_tag: 2026q1-linux ``` -## Build All Specifications +## Build All Specifications with Version Override -Leave `build_spec_name` empty to build all build specifications under the target: +Leave `build_spec_name` empty and provide version to set the same version on all build specs: ```yaml - uses: ./.github/actions/build-lvlibp-docker-linux @@ -50,8 +50,6 @@ Leave `build_spec_name` empty to build all build specifications under the target minimum_supported_lv_version: 2026 supported_bitness: 64 project_path: lv_icon_editor.lvproj - target_name: My Computer - build_spec_name: '' major: 1 minor: 0 patch: 0 @@ -59,6 +57,16 @@ Leave `build_spec_name` empty to build all build specifications under the target commit: ${{ github.sha }} ``` +## Version Behavior + +- **All version components provided** (`major`, `minor`, `patch`, `build` all β‰₯ 0): + - Helper VI is called to set the version + - If `build_spec_name` is provided: version is set on that build spec only + - If `build_spec_name` is omitted: version is set on **all** build specs in the project + +- **Any version component omitted** (< 0 or not provided): + - Version setting is skipped + ## Requirements - Docker must be installed and running on the host system diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 474f4281..be580a85 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -3,8 +3,7 @@ Builds the LabVIEW Packed Project Library (.lvlibp) using Linux LabVIEW Docker container. .DESCRIPTION - Executes LabVIEW build specification through LabVIEWCLI inside a Docker container, - embedding the provided version information and commit identifier. + Executes LabVIEW build specification through LabVIEWCLI inside a Docker container. .PARAMETER MinimumSupportedLVVersion LabVIEW version year used for the build (e.g., "2021", "2023", "2026"). @@ -15,23 +14,23 @@ .PARAMETER ProjectPath Path to the LabVIEW project .lvproj file that contains the build specification. -.PARAMETER TargetName - Target that contains the build specification. +PARAMETER TargetName + Target that contains the build specification. Defaults to "My Computer". .PARAMETER BuildSpecName Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. .PARAMETER Major - Major version component for the PPL. + Major version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Minor - Minor version component for the PPL. + Minor version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Patch - Patch version component for the PPL. + Patch version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Build - Build number component for the PPL. + Build number component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Commit Commit hash or identifier recorded in the build. @@ -60,26 +59,26 @@ param( [Parameter(Mandatory = $true)] [string]$ProjectPath, - [Parameter(Mandatory = $true)] - [string]$TargetName, + [Parameter(Mandatory = $false)] + [string]$TargetName = "", [Parameter(Mandatory = $false)] [string]$BuildSpecName = "", - [Parameter(Mandatory = $true)] - [int]$Major, + [Parameter(Mandatory = $false)] + [int]$Major = -1, - [Parameter(Mandatory = $true)] - [int]$Minor, + [Parameter(Mandatory = $false)] + [int]$Minor = -1, - [Parameter(Mandatory = $true)] - [int]$Patch, + [Parameter(Mandatory = $false)] + [int]$Patch = -1, - [Parameter(Mandatory = $true)] - [int]$Build, + [Parameter(Mandatory = $false)] + [int]$Build = -1, - [Parameter(Mandatory = $true)] - [string]$Commit, + [Parameter(Mandatory = $false)] + [string]$Commit = "", [Parameter(Mandatory = $false)] [string]$DockerImage = "nationalinstruments/labview", @@ -93,8 +92,18 @@ $ErrorActionPreference = 'Stop' try { Write-Verbose "Building PPL with Linux Docker container" - Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue - Write-Information "Commit: $Commit" -InformationAction Continue + $hasVersion = ($Major -ge 0) -and ($Minor -ge 0) -and ($Patch -ge 0) -and ($Build -ge 0) + + if ($hasVersion) { + $versionString = "$Major.$Minor.$Patch.$Build" + Write-Information "PPL Version: $versionString" -InformationAction Continue + } else { + Write-Information "PPL Version setting skipped." -InformationAction Continue + } + + if ($Commit) { + Write-Information "Commit: $Commit" -InformationAction Continue + } $fullImage = "${DockerImage}:${ImageTag}" Write-Information "Docker Image: $fullImage" -InformationAction Continue @@ -126,12 +135,19 @@ try { $bashArgs = @( "--labview-path", "'$labviewPath'" "--project-path", "'$containerProjectPath'" - "--target-name", "'$TargetName'" ) + if (-not [string]::IsNullOrWhiteSpace($TargetName)) { + $bashArgs += "--target-name", "'$TargetName'" + } + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { $bashArgs += "--build-spec-name", "'$BuildSpecName'" } + + if ($hasVersion) { + $bashArgs += "--version", "'$versionString'" + } $bashCommand = "chmod +x $containerScriptPath && $containerScriptPath $($bashArgs -join ' ')" diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index 33e357b0..deeb7263 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -9,6 +9,7 @@ LABVIEW_PATH="" PROJECT_PATH="" TARGET_NAME="" BUILD_SPEC_NAME="" +VERSION="" while [[ $# -gt 0 ]]; do case $1 in @@ -28,6 +29,10 @@ while [[ $# -gt 0 ]]; do BUILD_SPEC_NAME="$2" shift 2 ;; + --version) + VERSION="$2" + shift 2 + ;; *) echo "Unknown argument: $1" exit 1 @@ -36,26 +41,74 @@ while [[ $# -gt 0 ]]; do done # Validate required arguments -if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]] || [[ -z "$TARGET_NAME" ]]; then +if [[ -z "$LABVIEW_PATH" ]] || [[ -z "$PROJECT_PATH" ]]; then echo "Error: Missing required arguments" - echo "Usage: $0 --labview-path --project-path --target-name [--build-spec-name ]" + echo "Usage: $0 --labview-path --project-path [--target-name ] [--build-spec-name ] [--version ]" exit 1 fi echo "Building LabVIEW Packed Project Library..." echo "LabVIEW: $LABVIEW_PATH" echo "Project: $PROJECT_PATH" -echo "Target: $TARGET_NAME" +echo "Target: ${TARGET_NAME:-}" echo "Build Spec: ${BUILD_SPEC_NAME:-}" +echo "Version: ${VERSION:-}" + +if [[ -n "$VERSION" ]]; then + echo "Setting build version..." + HELPER_VI="/workspace/scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi" + + if [[ ! -f "$HELPER_VI" ]]; then + echo "Error: Helper VI not found at $HELPER_VI" + exit 1 + fi + + # Build VI arguments: ProjectPath and Version are required + # TargetName defaults to "My Computer" if not provided + # BuildSpecName: if not provided, applies version to all build specs + VI_ARGS="ProjectPath:$PROJECT_PATH;Version:$VERSION" + + if [[ -n "$TARGET_NAME" ]]; then + VI_ARGS="${VI_ARGS};TargetName:$TARGET_NAME" + fi + + if [[ -n "$BUILD_SPEC_NAME" ]]; then + VI_ARGS="${VI_ARGS};BuildSpecName:$BUILD_SPEC_NAME" + fi + + SET_VERSION_ARGS=( + "-OperationName" "RunVI" + "-LabVIEWPath" "$LABVIEW_PATH" + "-VIPath" "$HELPER_VI" + "-ViArgs" "$VI_ARGS" + "-Headless" + ) + + echo "Executing: LabVIEWCLI ${SET_VERSION_ARGS[*]}" + LabVIEWCLI "${SET_VERSION_ARGS[@]}" + SET_VERSION_EXIT=$? + + if [[ $SET_VERSION_EXIT -ne 0 ]]; then + echo "Failed to set build version (exit code: $SET_VERSION_EXIT)" + exit $SET_VERSION_EXIT + fi + + echo "Build version set successfully" +else + echo "Skipping version set" +fi # Construct LabVIEWCLI command CLI_ARGS=( "-OperationName" "ExecuteBuildSpec" "-LabVIEWPath" "$LABVIEW_PATH" "-ProjectPath" "$PROJECT_PATH" - "-TargetName" "$TARGET_NAME" ) +if [[ -n "$TARGET_NAME" ]]; then + CLI_ARGS+=("-TargetName" "$TARGET_NAME") +fi + if [[ -n "$BUILD_SPEC_NAME" ]]; then CLI_ARGS+=("-BuildSpecName" "$BUILD_SPEC_NAME") fi From cbcc37a924497cb3431bd994ec442855faadeb5b Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 17:14:10 +0530 Subject: [PATCH 22/49] Mount the folder with helper VIs [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 19 +++++++++++++++++-- .../build-lvlibp-docker-linux/build-lvlibp.sh | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index be580a85..ce2330cb 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -14,7 +14,7 @@ .PARAMETER ProjectPath Path to the LabVIEW project .lvproj file that contains the build specification. -PARAMETER TargetName +.PARAMETER TargetName Target that contains the build specification. Defaults to "My Computer". .PARAMETER BuildSpecName @@ -115,7 +115,7 @@ try { throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" } - # Get the path to the bash script + # Get the path to the bash script and helper VI directory $scriptDir = $PSScriptRoot $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' @@ -123,6 +123,17 @@ try { throw "Build script not found: $buildScript" } + # Get the action repository root + $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent + $helperDir = Join-Path $actionRoot 'scripts' 'build-lvlibp-helpers' + + if (-not (Test-Path $helperDir)) { + throw "Helper VI directory not found: $helperDir" + } + + Write-Verbose "Action root: $actionRoot" + Write-Verbose "Helper directory: $helperDir" + # Construct LabVIEWPath for Linux container $labviewPath = "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" Write-Verbose "LabVIEWPath: $labviewPath" @@ -155,8 +166,12 @@ try { Write-Verbose "Command: bash -c `"$bashCommand`"" # Run build in container + # Mount user workspace to /workspace + # Mount folder with helper VIs to /helpers + # Mount build script to /tmp docker run --rm ` -v "${PWD}:/workspace" ` + -v "${actionRoot}:/helpers" ` -v "${buildScript}:${containerScriptPath}" ` $fullImage ` bash -c $bashCommand ` diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index deeb7263..be79730c 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -56,7 +56,7 @@ echo "Version: ${VERSION:-}" if [[ -n "$VERSION" ]]; then echo "Setting build version..." - HELPER_VI="/workspace/scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi" + HELPER_VI="/helpers/scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi" if [[ ! -f "$HELPER_VI" ]]; then echo "Error: Helper VI not found at $HELPER_VI" From 64eec12aad39cb938c2565a532dfec9a4dcb5bfe Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 17:24:58 +0530 Subject: [PATCH 23/49] Mount the folder with helper VIs [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index ce2330cb..4f42a8ed 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -115,7 +115,7 @@ try { throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" } - # Get the path to the bash script and helper VI directory + # Get the path to the bash script $scriptDir = $PSScriptRoot $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' @@ -123,8 +123,17 @@ try { throw "Build script not found: $buildScript" } - # Get the action repository root - $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent + # Determine action root + # In GitHub Actions, use GITHUB_ACTION_PATH + # Otherwise, calculate from script directory + if ($env:GITHUB_ACTION_PATH) { + $actionRoot = $env:GITHUB_ACTION_PATH + Write-Verbose "Using GITHUB_ACTION_PATH: $actionRoot" + } else { + $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent + Write-Verbose "Calculated action root from script path: $actionRoot" + } + $helperDir = Join-Path $actionRoot 'scripts' 'build-lvlibp-helpers' if (-not (Test-Path $helperDir)) { @@ -133,6 +142,7 @@ try { Write-Verbose "Action root: $actionRoot" Write-Verbose "Helper directory: $helperDir" + Write-Verbose "Build script: $buildScript" # Construct LabVIEWPath for Linux container $labviewPath = "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" From 9617610523dfe950bef8a9eb474f66494030cfeb Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 17:34:48 +0530 Subject: [PATCH 24/49] Corrected action root path [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 4f42a8ed..66c5058d 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -124,15 +124,8 @@ try { } # Determine action root - # In GitHub Actions, use GITHUB_ACTION_PATH - # Otherwise, calculate from script directory - if ($env:GITHUB_ACTION_PATH) { - $actionRoot = $env:GITHUB_ACTION_PATH - Write-Verbose "Using GITHUB_ACTION_PATH: $actionRoot" - } else { - $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent - Write-Verbose "Calculated action root from script path: $actionRoot" - } + $actionRoot = Split-Path $scriptDir -Parent + Write-Verbose "Calculated action root from script path: $actionRoot" $helperDir = Join-Path $actionRoot 'scripts' 'build-lvlibp-helpers' From 377f980d9861ca47dc06cec17aff5f9040374b4a Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 17:44:24 +0530 Subject: [PATCH 25/49] Print line for debugging [REQ-039] --- scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 66c5058d..42431dda 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -118,6 +118,7 @@ try { # Get the path to the bash script $scriptDir = $PSScriptRoot $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' + Write-Information "Build script path: $buildScript" -InformationAction Continue if (-not (Test-Path $buildScript)) { throw "Build script not found: $buildScript" From ee13be16aa4926976b0a91802a37c81861e9108d Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 17:54:49 +0530 Subject: [PATCH 26/49] Added helper VIs [REQ-039] --- .../BuildLvlibpDockerLinux.ps1 | 4 +- scripts/build-lvlibp-helpers/README.md | 76 ++++++++++++++++++ .../build-lvlibp-helpers/SetBuildVersion.vi | Bin 0 -> 21055 bytes .../SetBuildVersionCaller.vi | Bin 0 -> 25405 bytes 4 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 scripts/build-lvlibp-helpers/README.md create mode 100644 scripts/build-lvlibp-helpers/SetBuildVersion.vi create mode 100644 scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi diff --git a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 index 42431dda..de191508 100644 --- a/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 +++ b/scripts/build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1 @@ -118,14 +118,12 @@ try { # Get the path to the bash script $scriptDir = $PSScriptRoot $buildScript = Join-Path $scriptDir 'build-lvlibp.sh' - Write-Information "Build script path: $buildScript" -InformationAction Continue if (-not (Test-Path $buildScript)) { throw "Build script not found: $buildScript" } - # Determine action root - $actionRoot = Split-Path $scriptDir -Parent + $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent Write-Verbose "Calculated action root from script path: $actionRoot" $helperDir = Join-Path $actionRoot 'scripts' 'build-lvlibp-helpers' diff --git a/scripts/build-lvlibp-helpers/README.md b/scripts/build-lvlibp-helpers/README.md new file mode 100644 index 00000000..506c3042 --- /dev/null +++ b/scripts/build-lvlibp-helpers/README.md @@ -0,0 +1,76 @@ +# Build LVLIBP Common Scripts + +This directory contains shared utilities used by all LVLIBP build actions. + +## SetBuildVersion.vi + +Helper VI that sets the build version for LabVIEW build specification(s). + +### VI Parameters + +| Parameter | Type | Required | Default | Description | +|-----------|------|----------|---------|-------------| +| `ProjectPath` | String | **Yes** | - | Path to the LabVIEW project file | +| `BuildSpecName` | String | No | *all build specs* | Build specification name | +| `TargetName` | String | No | `"My Computer"` | Target containing the build spec(s) | +| `Version` | String | **Yes** | - | Version string in format `M.m.p.b` | + +### Behavior + +- **ProjectPath** and **Version** are mandatory +- **TargetName** defaults to `"My Computer"` if not provided +- **BuildSpecName**: + + - If **not provided**, the VI sets the version on **all build specifications** in the project + - If **provided**, the VI sets the version on only the specified build specification + +### Usage with LabVIEWCLI + +**Set version on specific build spec:** + +```bash +LabVIEWCLI \ + -OperationName RunVI \ + -LabVIEWPath "/usr/local/natinst/LabVIEW-2025-64/labview" \ + -VIPath "/workspace/scripts/build-lvlibp-common/SetBuildVersion.vi" \ + "/workspace/project.lvproj" "My PPL" "My Computer" "1.0.0.4"\ + -Headless +``` + +**Set version on all build specs:** + +```bash +LabVIEWCLI \ + -OperationName RunVI \ + -LabVIEWPath "/usr/local/natinst/LabVIEW-2025-64/labview" \ + -VIPath "/workspace/scripts/build-lvlibp-common/SetBuildVersion.vi" \ + "/workspace/project.lvproj" "" "My Computer" "2.0.0.4"\ + -Headless +``` + +### Used By + +- [`build-lvlibp-docker-linux`](../build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1) – When version parameters are provided +- [`build-lvlibp-docker-windows`](../build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1) – When version parameters are provided +- [`build-lvlibp-win32`](../build-lvlibp-win32/BuildLvlibpWin32.ps1) – When version parameters are provided + +### When is the Helper VI Called? + +The helper VI is **only called** when: + +1. All version components (`Major`, `Minor`, `Patch`, `Build`) are provided **and** β‰₯ 0 + +The helper VI is **not called** when: + +1. Any version component is missing or < 0 (build specs use their own versions) + +### Notes + +- When **no version is provided** to the build scripts, the helper VI is **not called** +- Each build specification will use its own version settings from the project file +- When version is provided but BuildSpecName is omitted, **all build specs get the same version** + +## See Also + +- [Architecture documentation](../../docs/architecture.md) +- [CREATE-NEW-ACTION.md](../../CREATE-NEW-ACTION.md) diff --git a/scripts/build-lvlibp-helpers/SetBuildVersion.vi b/scripts/build-lvlibp-helpers/SetBuildVersion.vi new file mode 100644 index 0000000000000000000000000000000000000000..d884784d183be05627a84dd89dcab12f55fb417d GIT binary patch literal 21055 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 WSMI_Gc)--?Vp?>0?ilcD*Z%=j97v!5 literal 0 HcmV?d00001 diff --git a/scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi b/scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi new file mode 100644 index 0000000000000000000000000000000000000000..5d621ebac40a121927a635012d23ca355eb1a2a2 GIT binary patch literal 25405 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 Date: Wed, 11 Mar 2026 18:08:46 +0530 Subject: [PATCH 27/49] Fix LabVIEWCLI command [REQ-039] --- .../build-lvlibp-docker-linux/build-lvlibp.sh | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index be79730c..d312782d 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -63,26 +63,28 @@ if [[ -n "$VERSION" ]]; then exit 1 fi - # Build VI arguments: ProjectPath and Version are required - # TargetName defaults to "My Computer" if not provided - # BuildSpecName: if not provided, applies version to all build specs - VI_ARGS="ProjectPath:$PROJECT_PATH;Version:$VERSION" + # SetBuildVersionCaller.vi expects positional arguments: + # 1. ProjectPath (required) + # 2. BuildSpecName (optional, empty string to apply to all) + # 3. TargetName (optional, defaults to "My Computer" in VI) + # 4. Version (optional, empty string to skip version setting) - if [[ -n "$TARGET_NAME" ]]; then - VI_ARGS="${VI_ARGS};TargetName:$TARGET_NAME" - fi - - if [[ -n "$BUILD_SPEC_NAME" ]]; then - VI_ARGS="${VI_ARGS};BuildSpecName:$BUILD_SPEC_NAME" - fi - SET_VERSION_ARGS=( "-OperationName" "RunVI" "-LabVIEWPath" "$LABVIEW_PATH" "-VIPath" "$HELPER_VI" - "-ViArgs" "$VI_ARGS" - "-Headless" + "$PROJECT_PATH" ) + + SET_VERSION_ARGS+=("${BUILD_SPEC_NAME:-}") + + # Add TargetName (empty string to use VI default) + SET_VERSION_ARGS+=("${TARGET_NAME:-}") + + # Add Version + SET_VERSION_ARGS+=("$VERSION") + + SET_VERSION_ARGS+=("-Headless") echo "Executing: LabVIEWCLI ${SET_VERSION_ARGS[*]}" LabVIEWCLI "${SET_VERSION_ARGS[@]}" From f0aa3b95740c0e6ba34bf73dc40d4a31947420af Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 18:28:13 +0530 Subject: [PATCH 28/49] Updated OpenSourceActions with the optional arguments [REQ-039] --- actions/OpenSourceActions.psm1 | 36 +++++------ artifacts/linux/action-docs.json | 106 +++++-------------------------- artifacts/linux/action-docs.md | 46 +++++--------- ci_evidence.txt | 2 +- dispatchers.json | 106 +++++-------------------------- 5 files changed, 69 insertions(+), 227 deletions(-) diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 0881ce8f..65ba91da 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -285,43 +285,43 @@ function Invoke-BuildLvlibpDockerLinux { return $result } -# Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. +# Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. # MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). # SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). # ProjectPath: Path to the LabVIEW project .lvproj file. -# TargetName: Target that contains the build specification. +# TargetName: Target that contains the build specification (optional, defaults to "My Computer"). # BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). -# Major: Major version component. -# Minor: Minor version component. -# Patch: Patch version component. -# Build: Build number component. -# Commit: Commit hash or identifier. +# Major: Major version component (optional, skips version setting if < 0). +# Minor: Minor version component (optional, skips version setting if < 0). +# Patch: Patch version component (optional, skips version setting if < 0). +# Build: Build number component (optional, skips version setting if < 0). +# Commit: Commit hash or identifier (optional). # DockerImage: Docker image name (default: "nationalinstruments/labview"). -# ImageTag: Docker image tag (defaults to "2026q1-windows"). +# ImageTag: Docker image tag (defaults to "2026q1-linux"). # DryRun: If set, prints the command instead of executing it. # gcliPath: Optional path prepended to PATH for locating the g CLI. -function Invoke-BuildLvlibpDockerWindows { +function Invoke-BuildLvlibpDockerLinux { [CmdletBinding()] param( [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, [Parameter(Mandatory)] [string] $SupportedBitness, [Parameter(Mandatory)] [string] $ProjectPath, - [Parameter(Mandatory)] [string] $TargetName, + [Parameter()] [string] $TargetName = "", [Parameter()] [string] $BuildSpecName = "", - [Parameter(Mandatory)] [int] $Major, - [Parameter(Mandatory)] [int] $Minor, - [Parameter(Mandatory)] [int] $Patch, - [Parameter(Mandatory)] [int] $Build, - [Parameter(Mandatory)] [string] $Commit, + [Parameter()] [int] $Major = -1, + [Parameter()] [int] $Minor = -1, + [Parameter()] [int] $Patch = -1, + [Parameter()] [int] $Build = -1, + [Parameter()] [string] $Commit = "", [Parameter()] [string] $DockerImage = "nationalinstruments/labview", - [Parameter()] [string] $ImageTag = "2026q1-windows", + [Parameter()] [string] $ImageTag = "2026q1-linux", [switch] $DryRun, [string] $gcliPath ) - Write-Information "Invoking BuildLvlibpDockerWindows" -InformationAction Continue + Write-Information "Invoking BuildLvlibpDockerLinux" -InformationAction Continue $result = Invoke-OpenSourceActionScript ` - -ScriptSegments @('build-lvlibp-docker-windows', 'BuildLvlibpDockerWindows.ps1') ` + -ScriptSegments @('build-lvlibp-docker-linux', 'BuildLvlibpDockerLinux.ps1') ` -Arguments @{ MinimumSupportedLVVersion = $MinimumSupportedLVVersion SupportedBitness = $SupportedBitness diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index dc240fa1..c1a0a7e7 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -197,12 +197,13 @@ } }, "Invoke-BuildLvlibpDockerLinux": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", - "required": true, - "description": "Build number component" + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" }, "BuildSpecName": { "type": "string", @@ -212,8 +213,9 @@ }, "Commit": { "type": "string", - "required": true, - "description": "Commit hash or identifier" + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" }, "DockerImage": { "type": "string", @@ -239,8 +241,9 @@ }, "Major": { "type": "number", - "required": true, - "description": "Major version component" + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" }, "MinimumSupportedLVVersion": { "type": "string", @@ -249,13 +252,15 @@ }, "Minor": { "type": "number", - "required": true, - "description": "Minor version component" + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" }, "Patch": { "type": "number", - "required": true, - "description": "Patch version component" + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" }, "ProjectPath": { "type": "string", @@ -268,87 +273,10 @@ "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" }, "TargetName": { - "type": "string", - "required": true, - "description": "Target that contains the build specification" - } - } - }, - "Invoke-BuildLvlibpDockerWindows": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", - "parameters": { - "Build": { - "type": "number", - "required": true, - "description": "Build number component" - }, - "BuildSpecName": { "type": "string", "required": false, "default": "", - "description": "Name of the LabVIEW build specification (optional, builds all if empty)" - }, - "Commit": { - "type": "string", - "required": true, - "description": "Commit hash or identifier" - }, - "DockerImage": { - "type": "string", - "required": false, - "default": "nationalinstruments/labview", - "description": "Docker image name (default: \"nationalinstruments/labview\")" - }, - "DryRun": { - "type": "boolean", - "required": false, - "description": "If set, prints the command instead of executing it" - }, - "gcliPath": { - "type": "string", - "required": false, - "description": "Optional path prepended to PATH for locating the g CLI" - }, - "ImageTag": { - "type": "string", - "required": false, - "default": "2026q1-windows", - "description": "Docker image tag (defaults to \"2026q1-windows\")" - }, - "Major": { - "type": "number", - "required": true, - "description": "Major version component" - }, - "MinimumSupportedLVVersion": { - "type": "string", - "required": true, - "description": "LabVIEW version for the build (e" - }, - "Minor": { - "type": "number", - "required": true, - "description": "Minor version component" - }, - "Patch": { - "type": "number", - "required": true, - "description": "Patch version component" - }, - "ProjectPath": { - "type": "string", - "required": true, - "description": "Path to the LabVIEW project" - }, - "SupportedBitness": { - "type": "string", - "required": true, - "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" - }, - "TargetName": { - "type": "string", - "required": true, - "description": "Target that contains the build specification" + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" } } }, diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 8189a6c3..1a4f21f8 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -76,51 +76,28 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibp -ArgsJson '{}' ``` #### Invoke-BuildLvlibpDockerLinux -Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-linux"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to "My Computer"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-linux"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | | --- | --- | --- | --- | --- | -| Build | number | true | | Build number component | +| Build | number | false | -1 | Build number component (optional, skips version setting if < 0) | | BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | -| Commit | string | true | | Commit hash or identifier | +| Commit | string | false | | Commit hash or identifier (optional) | | DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | | DryRun | boolean | false | | If set, prints the command instead of executing it | | ImageTag | string | false | 2026q1-linux | Docker image tag (defaults to "2026q1-linux") | -| Major | number | true | | Major version component | +| Major | number | false | -1 | Major version component (optional, skips version setting if < 0) | | MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | -| Minor | number | true | | Minor version component | -| Patch | number | true | | Patch version component | +| Minor | number | false | -1 | Minor version component (optional, skips version setting if < 0) | +| Patch | number | false | -1 | Patch version component (optional, skips version setting if < 0) | | ProjectPath | string | true | | Path to the LabVIEW project | | SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | -| TargetName | string | true | | Target that contains the build specification | +| TargetName | string | false | | Target that contains the build specification (optional, defaults to "My Computer") | | gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | ```powershell pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerLinux -ArgsJson '{}' ``` -#### Invoke-BuildLvlibpDockerWindows -Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-windows"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. -| Parameter | Type | Required | Default | Description | -| --- | --- | --- | --- | --- | -| Build | number | true | | Build number component | -| BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | -| Commit | string | true | | Commit hash or identifier | -| DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | -| DryRun | boolean | false | | If set, prints the command instead of executing it | -| ImageTag | string | false | 2026q1-windows | Docker image tag (defaults to "2026q1-windows") | -| Major | number | true | | Major version component | -| MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | -| Minor | number | true | | Minor version component | -| Patch | number | true | | Patch version component | -| ProjectPath | string | true | | Path to the LabVIEW project | -| SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | -| TargetName | string | true | | Target that contains the build specification | -| gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | - -```powershell -pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows -ArgsJson '{}' -``` - #### Invoke-BuildLvlibpWin32 Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | @@ -344,6 +321,15 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' ### Wrapper Actions +#### activate-labview +| Name | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| serial_number | string | true | | LabVIEW serial number for activation. | +| package_id | string | false | LabVIEW_COM_PKG 25.0300 | LabVIEW package ID to activate. | +| working_directory | string | false | | Working directory where the action will run. | +| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | +| dry_run | string | false | false | If true, simulate the action without side effects. | + #### add-token-to-labview | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | diff --git a/ci_evidence.txt b/ci_evidence.txt index 35175759..893edcd3 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"3d17593846ab3dde8444de662ffc6c52f75dc930","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"e2ebad80ea3ef0485e6d262649db9772ab070c76","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index a2c15670..742813b5 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -195,12 +195,13 @@ } }, "Invoke-BuildLvlibpDockerLinux": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-linux\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", - "required": true, - "description": "Build number component" + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" }, "BuildSpecName": { "type": "string", @@ -210,8 +211,9 @@ }, "Commit": { "type": "string", - "required": true, - "description": "Commit hash or identifier" + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" }, "DockerImage": { "type": "string", @@ -237,8 +239,9 @@ }, "Major": { "type": "number", - "required": true, - "description": "Major version component" + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" }, "MinimumSupportedLVVersion": { "type": "string", @@ -247,13 +250,15 @@ }, "Minor": { "type": "number", - "required": true, - "description": "Minor version component" + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" }, "Patch": { "type": "number", - "required": true, - "description": "Patch version component" + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" }, "ProjectPath": { "type": "string", @@ -266,87 +271,10 @@ "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" }, "TargetName": { - "type": "string", - "required": true, - "description": "Target that contains the build specification" - } - } - }, - "Invoke-BuildLvlibpDockerWindows": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", - "parameters": { - "Build": { - "type": "number", - "required": true, - "description": "Build number component" - }, - "BuildSpecName": { "type": "string", "required": false, "default": "", - "description": "Name of the LabVIEW build specification (optional, builds all if empty)" - }, - "Commit": { - "type": "string", - "required": true, - "description": "Commit hash or identifier" - }, - "DockerImage": { - "type": "string", - "required": false, - "default": "nationalinstruments/labview", - "description": "Docker image name (default: \"nationalinstruments/labview\")" - }, - "DryRun": { - "type": "boolean", - "required": false, - "description": "If set, prints the command instead of executing it" - }, - "gcliPath": { - "type": "string", - "required": false, - "description": "Optional path prepended to PATH for locating the g CLI" - }, - "ImageTag": { - "type": "string", - "required": false, - "default": "2026q1-windows", - "description": "Docker image tag (defaults to \"2026q1-windows\")" - }, - "Major": { - "type": "number", - "required": true, - "description": "Major version component" - }, - "MinimumSupportedLVVersion": { - "type": "string", - "required": true, - "description": "LabVIEW version for the build (e" - }, - "Minor": { - "type": "number", - "required": true, - "description": "Minor version component" - }, - "Patch": { - "type": "number", - "required": true, - "description": "Patch version component" - }, - "ProjectPath": { - "type": "string", - "required": true, - "description": "Path to the LabVIEW project" - }, - "SupportedBitness": { - "type": "string", - "required": true, - "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" - }, - "TargetName": { - "type": "string", - "required": true, - "description": "Target that contains the build specification" + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" } } }, From 0b63c1c0514f7aa8700181d5cb5cf2b80d6f216d Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 22:58:53 +0530 Subject: [PATCH 29/49] Avoid defult value for version [REQ-039] --- build-lvlibp-docker-linux/action.yml | 42 +++++++++++++++------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/build-lvlibp-docker-linux/action.yml b/build-lvlibp-docker-linux/action.yml index 6b272086..355fa64e 100644 --- a/build-lvlibp-docker-linux/action.yml +++ b/build-lvlibp-docker-linux/action.yml @@ -11,27 +11,29 @@ inputs: description: 'Path to the LabVIEW project .lvproj file.' required: true target_name: - description: 'Target that contains the build specification.' - required: true + description: 'Target that contains the build specification. Defaults to "My Computer" in helper VI.' + required: false + default: '' build_spec_name: description: 'Name of the build specification. If empty, builds all specifications in the target.' required: false default: '' major: - description: 'Major version component for the PPL.' - required: true + description: 'Major version component for the PPL. Omit to skip version setting.' + required: false minor: - description: 'Minor version component for the PPL.' - required: true + description: 'Minor version component for the PPL. Omit to skip version setting.' + required: false patch: - description: 'Patch version component for the PPL.' - required: true + description: 'Patch version component for the PPL. Omit to skip version setting.' + required: false build: - description: 'Build number component for the PPL.' - required: true + description: 'Build number component for the PPL. Omit to skip version setting.' + required: false commit: description: 'Commit hash or identifier recorded in the build.' - required: true + required: false + default: '' docker_image: description: 'Docker image name.' required: false @@ -49,7 +51,7 @@ inputs: required: false dry_run: description: 'If true, simulate the action without side effects.' - default: false + default: 'false' required: false runs: @@ -64,15 +66,17 @@ runs: SupportedBitness = '${{ inputs.supported_bitness }}' ProjectPath = '${{ inputs.project_path }}' TargetName = '${{ inputs.target_name }}' - Major = [int]'${{ inputs.major }}' - Minor = [int]'${{ inputs.minor }}' - Patch = [int]'${{ inputs.patch }}' - Build = [int]'${{ inputs.build }}' + BuildSpecName = '${{ inputs.build_spec_name }}' Commit = '${{ inputs.commit }}' + DockerImage = '${{ inputs.docker_image }}' + ImageTag = '${{ inputs.image_tag }}' } - if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } - if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } - if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } + + # Only add version parameters if they are provided + if ('${{ inputs.major }}') { $args['Major'] = [int]'${{ inputs.major }}' } + if ('${{ inputs.minor }}') { $args['Minor'] = [int]'${{ inputs.minor }}' } + if ('${{ inputs.patch }}') { $args['Patch'] = [int]'${{ inputs.patch }}' } + if ('${{ inputs.build }}') { $args['Build'] = [int]'${{ inputs.build }}' } $params = @{ ActionName = 'build-lvlibp-docker-linux' From f76edce1f9190ca0f7234890cac5935d2e1236be Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 11 Mar 2026 23:29:45 +0530 Subject: [PATCH 30/49] Removed redundant entry [REQ-039] --- actions/OpenSourceActions.psm1 | 57 -------------------------------- artifacts/linux/action-docs.json | 46 +++++++++++++------------- artifacts/linux/action-docs.md | 33 +++++++----------- ci_evidence.txt | 2 +- 4 files changed, 36 insertions(+), 102 deletions(-) diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 65ba91da..324117f8 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -228,63 +228,6 @@ function Invoke-BuildLvlibp { return Invoke-OpenSourceActionScript -ScriptSegments @('build-lvlibp','Build_lvlibp.ps1') -Arguments $args -DryRun:$DryRun -gcliPath $gcliPath } -# Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. -# MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). -# SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). -# ProjectPath: Path to the LabVIEW project .lvproj file. -# TargetName: Target that contains the build specification. -# BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). -# Major: Major version component. -# Minor: Minor version component. -# Patch: Patch version component. -# Build: Build number component. -# Commit: Commit hash or identifier. -# DockerImage: Docker image name (default: "nationalinstruments/labview"). -# ImageTag: Docker image tag (defaults to "2026q1-linux"). -# DryRun: If set, prints the command instead of executing it. -# gcliPath: Optional path prepended to PATH for locating the g CLI. -function Invoke-BuildLvlibpDockerLinux { - [CmdletBinding()] - param( - [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, - [Parameter(Mandatory)] [string] $SupportedBitness, - [Parameter(Mandatory)] [string] $ProjectPath, - [Parameter(Mandatory)] [string] $TargetName, - [Parameter()] [string] $BuildSpecName = "", - [Parameter(Mandatory)] [int] $Major, - [Parameter(Mandatory)] [int] $Minor, - [Parameter(Mandatory)] [int] $Patch, - [Parameter(Mandatory)] [int] $Build, - [Parameter(Mandatory)] [string] $Commit, - [Parameter()] [string] $DockerImage = "nationalinstruments/labview", - [Parameter()] [string] $ImageTag = "2026q1-linux", - [switch] $DryRun, - [string] $gcliPath - ) - Write-Information "Invoking BuildLvlibpDockerLinux" -InformationAction Continue - - $result = Invoke-OpenSourceActionScript ` - -ScriptSegments @('build-lvlibp-docker-linux', 'BuildLvlibpDockerLinux.ps1') ` - -Arguments @{ - MinimumSupportedLVVersion = $MinimumSupportedLVVersion - SupportedBitness = $SupportedBitness - ProjectPath = $ProjectPath - TargetName = $TargetName - BuildSpecName = $BuildSpecName - Major = $Major - Minor = $Minor - Patch = $Patch - Build = $Build - Commit = $Commit - DockerImage = $DockerImage - ImageTag = $ImageTag - } ` - -DryRun:$DryRun ` - -gcliPath $gcliPath - - return $result -} - # Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. # MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). # SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index c1a0a7e7..bab94cce 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -1159,8 +1159,8 @@ }, { "name": "target_name", - "description": "Target that contains the build specification.", - "required": true, + "description": "Target that contains the build specification. Defaults to \"My Computer\" in helper VI.", + "required": false, "default": "", "type": "string" }, @@ -1173,36 +1173,36 @@ }, { "name": "major", - "description": "Major version component for the PPL.", - "required": true, + "description": "Major version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "minor", - "description": "Minor version component for the PPL.", - "required": true, + "description": "Minor version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "patch", - "description": "Patch version component for the PPL.", - "required": true, + "description": "Patch version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "build", - "description": "Build number component for the PPL.", - "required": true, + "description": "Build number component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "commit", "description": "Commit hash or identifier recorded in the build.", - "required": true, + "required": false, "default": "", "type": "string" }, @@ -1238,7 +1238,7 @@ "name": "dry_run", "description": "If true, simulate the action without side effects.", "required": false, - "default": false, + "default": "false", "type": "string" } ], @@ -1266,8 +1266,8 @@ }, { "name": "target_name", - "description": "Target that contains the build specification.", - "required": true, + "description": "Target that contains the build specification. Defaults to \"My Computer\" in helper VI.", + "required": false, "default": "", "type": "string" }, @@ -1280,36 +1280,36 @@ }, { "name": "major", - "description": "Major version component for the PPL.", - "required": true, + "description": "Major version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "minor", - "description": "Minor version component for the PPL.", - "required": true, + "description": "Minor version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "patch", - "description": "Patch version component for the PPL.", - "required": true, + "description": "Patch version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "build", - "description": "Build number component for the PPL.", - "required": true, + "description": "Build number component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "commit", "description": "Commit hash or identifier recorded in the build.", - "required": true, + "required": false, "default": "", "type": "string" }, diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 1a4f21f8..c1989c1c 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -321,15 +321,6 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' ### Wrapper Actions -#### activate-labview -| Name | Type | Required | Default | Description | -| --- | --- | --- | --- | --- | -| serial_number | string | true | | LabVIEW serial number for activation. | -| package_id | string | false | LabVIEW_COM_PKG 25.0300 | LabVIEW package ID to activate. | -| working_directory | string | false | | Working directory where the action will run. | -| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | -| dry_run | string | false | false | If true, simulate the action without side effects. | - #### add-token-to-labview | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | @@ -395,13 +386,13 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | | supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | | project_path | string | true | | Path to the LabVIEW project .lvproj file. | -| target_name | string | true | | Target that contains the build specification. | +| target_name | string | false | | Target that contains the build specification. Defaults to "My Computer" in helper VI. | | build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | -| major | string | true | | Major version component for the PPL. | -| minor | string | true | | Minor version component for the PPL. | -| patch | string | true | | Patch version component for the PPL. | -| build | string | true | | Build number component for the PPL. | -| commit | string | true | | Commit hash or identifier recorded in the build. | +| major | string | false | | Major version component for the PPL. Omit to skip version setting. | +| minor | string | false | | Minor version component for the PPL. Omit to skip version setting. | +| patch | string | false | | Patch version component for the PPL. Omit to skip version setting. | +| build | string | false | | Build number component for the PPL. Omit to skip version setting. | +| commit | string | false | | Commit hash or identifier recorded in the build. | | docker_image | string | false | nationalinstruments/labview | Docker image name. | | image_tag | string | false | 2026q1-linux | Docker image tag. | | working_directory | string | false | | Working directory where the action will run. | @@ -414,13 +405,13 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | | supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | | project_path | string | true | | Path to the LabVIEW project .lvproj file. | -| target_name | string | true | | Target that contains the build specification. | +| target_name | string | false | | Target that contains the build specification. Defaults to "My Computer" in helper VI. | | build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | -| major | string | true | | Major version component for the PPL. | -| minor | string | true | | Minor version component for the PPL. | -| patch | string | true | | Patch version component for the PPL. | -| build | string | true | | Build number component for the PPL. | -| commit | string | true | | Commit hash or identifier recorded in the build. | +| major | string | false | | Major version component for the PPL. Omit to skip version setting. | +| minor | string | false | | Minor version component for the PPL. Omit to skip version setting. | +| patch | string | false | | Patch version component for the PPL. Omit to skip version setting. | +| build | string | false | | Build number component for the PPL. Omit to skip version setting. | +| commit | string | false | | Commit hash or identifier recorded in the build. | | docker_image | string | false | nationalinstruments/labview | Docker image name. | | image_tag | string | false | 2026q1-windows | Docker image tag. | | working_directory | string | false | | Working directory where the action will run. | diff --git a/ci_evidence.txt b/ci_evidence.txt index 893edcd3..0cff8843 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"e2ebad80ea3ef0485e6d262649db9772ab070c76","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"0b63c1c0514f7aa8700181d5cb5cf2b80d6f216d","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file From a3249249d4752872615691846bc59ac24f68a767 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 09:29:25 +0530 Subject: [PATCH 31/49] Updated action to use helper VIs [REQ-040] --- actions/OpenSourceActions.psm1 | 95 +++++++++++++++++++ artifacts/linux/action-docs.json | 84 ++++++++++++++++ artifacts/linux/action-docs.md | 23 +++++ build-lvlibp-docker-windows/action.yml | 40 ++++---- ci_evidence.txt | 2 +- dispatchers.json | 84 ++++++++++++++++ docs/actions/build-lvlibp-docker-windows.md | 83 +++++++++++----- docs/scripts/build-lvlibp-docker-windows.md | 26 +++-- .../BuildLvlibpDockerWindows.ps1 | 79 +++++++++++---- ...uildLvlibpDockerWindows.Workflow.Tests.ps1 | 52 +++++++++- 10 files changed, 497 insertions(+), 71 deletions(-) diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 324117f8..9523dc08 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -285,6 +285,101 @@ function Invoke-BuildLvlibpDockerLinux { return $result } +# Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. +# MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). +# SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). +# ProjectPath: Path to the LabVIEW project .lvproj file. +# TargetName: Target that contains the build specification (optional, defaults to "My Computer"). +# BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). +# Major: Major version component (optional, skips version setting if < 0). +# Minor: Minor version component (optional, skips version setting if < 0). +# Patch: Patch version component (optional, skips version setting if < 0). +# Build: Build number component (optional, skips version setting if < 0). +# Commit: Commit hash or identifier (optional). +# DockerImage: Docker image name (default: "nationalinstruments/labview"). +# ImageTag: Docker image tag (defaults to "2026q1-windows"). +# DryRun: If set, prints the command instead of executing it. +# gcliPath: Optional path prepended to PATH for locating the g CLI. +function Invoke-BuildLvlibpDockerWindows { + [CmdletBinding()] + param( + [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, + [Parameter(Mandatory)] [string] $SupportedBitness, + [Parameter(Mandatory)] [string] $ProjectPath, + [Parameter()] [string] $TargetName = "", + [Parameter()] [string] $BuildSpecName = "", + [Parameter()] [int] $Major = -1, + [Parameter()] [int] $Minor = -1, + [Parameter()] [int] $Patch = -1, + [Parameter()] [int] $Build = -1, + [Parameter()] [string] $Commit = "", + [Parameter()] [string] $DockerImage = "nationalinstruments/labview", + [Parameter()] [string] $ImageTag = "2026q1-windows", + [switch] $DryRun, + [string] $gcliPath + ) + Write-Information "Invoking BuildLvlibpDockerWindows" -InformationAction Continue + + $result = Invoke-OpenSourceActionScript ` + -ScriptSegments @('build-lvlibp-docker-windows', 'BuildLvlibpDockerWindows.ps1') ` + -Arguments @{ + MinimumSupportedLVVersion = $MinimumSupportedLVVersion + SupportedBitness = $SupportedBitness + ProjectPath = $ProjectPath + TargetName = $TargetName + BuildSpecName = $BuildSpecName + Major = $Major + Minor = $Minor + Patch = $Patch + Build = $Build + Commit = $Commit + DockerImage = $DockerImage + ImageTag = $ImageTag + } ` + -DryRun:$DryRun ` + -gcliPath $gcliPath + + return $result +} + +function Invoke-BuildLvlibpWin32 { + [CmdletBinding()] + param( + [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, + [Parameter(Mandatory)] [string] $SupportedBitness, + [Parameter(Mandatory)] [string] $ProjectPath, + [Parameter()] [string] $TargetName = "", + [Parameter()] [string] $BuildSpecName = "", + [Parameter()] [int] $Major = -1, + [Parameter()] [int] $Minor = -1, + [Parameter()] [int] $Patch = -1, + [Parameter()] [int] $Build = -1, + [Parameter()] [string] $Commit = "", + [switch] $DryRun, + [string] $gcliPath + ) + Write-Information "Invoking BuildLvlibpWin32" -InformationAction Continue + + $result = Invoke-OpenSourceActionScript ` + -ScriptSegments @('build-lvlibp-win32', 'BuildLvlibpWin32.ps1') ` + -Arguments @{ + MinimumSupportedLVVersion = $MinimumSupportedLVVersion + SupportedBitness = $SupportedBitness + ProjectPath = $ProjectPath + TargetName = $TargetName + BuildSpecName = $BuildSpecName + Major = $Major + Minor = $Minor + Patch = $Patch + Build = $Build + Commit = $Commit + } ` + -DryRun:$DryRun ` + -gcliPath $gcliPath + + return $result +} + # Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. # MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). # SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index bab94cce..63a9e22a 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -280,6 +280,90 @@ } } }, + "Invoke-BuildLvlibpDockerWindows": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "2026q1-windows", + "description": "Docker image tag (defaults to \"2026q1-windows\")" + }, + "Major": { + "type": "number", + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" + }, + "Patch": { + "type": "number", + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": false, + "default": "", + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" + } + } + }, "Invoke-BuildLvlibpWin32": { "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index c1989c1c..c5a457c2 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -98,6 +98,29 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Linux Docker container. Mi pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerLinux -ArgsJson '{}' ``` +#### Invoke-BuildLvlibpDockerWindows +Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to "My Computer"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: "nationalinstruments/labview"). ImageTag: Docker image tag (defaults to "2026q1-windows"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +| Parameter | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| Build | number | false | -1 | Build number component (optional, skips version setting if < 0) | +| BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | +| Commit | string | false | | Commit hash or identifier (optional) | +| DockerImage | string | false | nationalinstruments/labview | Docker image name (default: "nationalinstruments/labview") | +| DryRun | boolean | false | | If set, prints the command instead of executing it | +| ImageTag | string | false | 2026q1-windows | Docker image tag (defaults to "2026q1-windows") | +| Major | number | false | -1 | Major version component (optional, skips version setting if < 0) | +| MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | +| Minor | number | false | -1 | Minor version component (optional, skips version setting if < 0) | +| Patch | number | false | -1 | Patch version component (optional, skips version setting if < 0) | +| ProjectPath | string | true | | Path to the LabVIEW project | +| SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | +| TargetName | string | false | | Target that contains the build specification (optional, defaults to "My Computer") | +| gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | + +```powershell +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows -ArgsJson '{}' +``` + #### Invoke-BuildLvlibpWin32 Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | diff --git a/build-lvlibp-docker-windows/action.yml b/build-lvlibp-docker-windows/action.yml index 005d42b2..c5bcd308 100644 --- a/build-lvlibp-docker-windows/action.yml +++ b/build-lvlibp-docker-windows/action.yml @@ -11,27 +11,29 @@ inputs: description: 'Path to the LabVIEW project .lvproj file.' required: true target_name: - description: 'Target that contains the build specification.' - required: true + description: 'Target that contains the build specification. Defaults to "My Computer" in helper VI.' + required: false + default: '' build_spec_name: description: 'Name of the build specification. If empty, builds all specifications in the target.' required: false default: '' major: - description: 'Major version component for the PPL.' - required: true + description: 'Major version component for the PPL. Omit to skip version setting.' + required: false minor: - description: 'Minor version component for the PPL.' - required: true + description: 'Minor version component for the PPL. Omit to skip version setting.' + required: false patch: - description: 'Patch version component for the PPL.' - required: true + description: 'Patch version component for the PPL. Omit to skip version setting.' + required: false build: - description: 'Build number component for the PPL.' - required: true + description: 'Build number component for the PPL. Omit to skip version setting.' + required: false commit: description: 'Commit hash or identifier recorded in the build.' - required: true + required: false + default: '' docker_image: description: 'Docker image name.' required: false @@ -64,15 +66,17 @@ runs: SupportedBitness = '${{ inputs.supported_bitness }}' ProjectPath = '${{ inputs.project_path }}' TargetName = '${{ inputs.target_name }}' - Major = [int]'${{ inputs.major }}' - Minor = [int]'${{ inputs.minor }}' - Patch = [int]'${{ inputs.patch }}' - Build = [int]'${{ inputs.build }}' + BuildSpecName = '${{ inputs.build_spec_name }}' Commit = '${{ inputs.commit }}' + DockerImage = '${{ inputs.docker_image }}' + ImageTag = '${{ inputs.image_tag }}' } - if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } - if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } - if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } + + # Only add version parameters if they are provided + if ('${{ inputs.major }}') { $args['Major'] = [int]'${{ inputs.major }}' } + if ('${{ inputs.minor }}') { $args['Minor'] = [int]'${{ inputs.minor }}' } + if ('${{ inputs.patch }}') { $args['Patch'] = [int]'${{ inputs.patch }}' } + if ('${{ inputs.build }}') { $args['Build'] = [int]'${{ inputs.build }}' } $params = @{ ActionName = 'build-lvlibp-docker-windows' diff --git a/ci_evidence.txt b/ci_evidence.txt index 0cff8843..736f4bd9 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"0b63c1c0514f7aa8700181d5cb5cf2b80d6f216d","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"f76edce1f9190ca0f7234890cac5935d2e1236be","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index 742813b5..ad901d98 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -278,6 +278,90 @@ } } }, + "Invoke-BuildLvlibpDockerWindows": { + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DockerImage: Docker image name (default: \"nationalinstruments/labview\"). ImageTag: Docker image tag (defaults to \"2026q1-windows\"). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "parameters": { + "Build": { + "type": "number", + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" + }, + "BuildSpecName": { + "type": "string", + "required": false, + "default": "", + "description": "Name of the LabVIEW build specification (optional, builds all if empty)" + }, + "Commit": { + "type": "string", + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" + }, + "DockerImage": { + "type": "string", + "required": false, + "default": "nationalinstruments/labview", + "description": "Docker image name (default: \"nationalinstruments/labview\")" + }, + "DryRun": { + "type": "boolean", + "required": false, + "description": "If set, prints the command instead of executing it" + }, + "gcliPath": { + "type": "string", + "required": false, + "description": "Optional path prepended to PATH for locating the g CLI" + }, + "ImageTag": { + "type": "string", + "required": false, + "default": "2026q1-windows", + "description": "Docker image tag (defaults to \"2026q1-windows\")" + }, + "Major": { + "type": "number", + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" + }, + "MinimumSupportedLVVersion": { + "type": "string", + "required": true, + "description": "LabVIEW version for the build (e" + }, + "Minor": { + "type": "number", + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" + }, + "Patch": { + "type": "number", + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" + }, + "ProjectPath": { + "type": "string", + "required": true, + "description": "Path to the LabVIEW project" + }, + "SupportedBitness": { + "type": "string", + "required": true, + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\")" + }, + "TargetName": { + "type": "string", + "required": false, + "default": "", + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" + } + } + }, "Invoke-BuildLvlibpWin32": { "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { diff --git a/docs/actions/build-lvlibp-docker-windows.md b/docs/actions/build-lvlibp-docker-windows.md index 9baf3a8c..0bad65d6 100644 --- a/docs/actions/build-lvlibp-docker-windows.md +++ b/docs/actions/build-lvlibp-docker-windows.md @@ -2,7 +2,7 @@ ## Purpose -Builds LabVIEW Packed Project Library (.lvlibp) files using a Windows LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, embedding version information and commit metadata. +Builds LabVIEW Packed Project Library (.lvlibp) files using a Windows LabVIEW Docker container. This action executes the LabVIEW build specification through LabVIEWCLI inside a Docker container, optionally embedding version information and commit metadata. Use this action when you need to build PPL files in containerized Windows environments (CI/CD pipelines) without installing LabVIEW directly on the host system. @@ -15,16 +15,16 @@ Common parameters are described in [Common parameters](../common-parameters.md). - **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2026"`). - **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). - **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. -- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). -- **Major** (`int`): Major version component for the PPL. -- **Minor** (`int`): Minor version component for the PPL. -- **Patch** (`int`): Patch version component for the PPL. -- **Build** (`int`): Build number component for the PPL. -- **Commit** (`string`): Commit hash or identifier recorded in the build. ### Optional +- **TargetName** (`string`): Target that contains the build specification. Defaults to `"My Computer"` in helper VI. Default: `""`. - **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **Major** (`int`): Major version component for the PPL. Omit to skip version setting. Default: `-1`. +- **Minor** (`int`): Minor version component for the PPL. Omit to skip version setting. Default: `-1`. +- **Patch** (`int`): Patch version component for the PPL. Omit to skip version setting. Default: `-1`. +- **Build** (`int`): Build number component for the PPL. Omit to skip version setting. Default: `-1`. +- **Commit** (`string`): Commit hash or identifier recorded in the build. Default: `""`. - **DockerImage** (`string`): Docker image name. Default: `"nationalinstruments/labview"`. - **ImageTag** (`string`): Docker image tag. Default: `"2026q1-windows"`. @@ -35,13 +35,13 @@ Common parameters are described in [Common parameters](../common-parameters.md). | `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | | `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | | `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | -| `target_name` | `TargetName` | Target that contains the build specification. | +| `target_name` | `TargetName` | Target that contains the build specification (optional). | | `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | -| `major` | `Major` | Major version component. | -| `minor` | `Minor` | Minor version component. | -| `patch` | `Patch` | Patch version component. | -| `build` | `Build` | Build number component. | -| `commit` | `Commit` | Commit hash or identifier. | +| `major` | `Major` | Major version component (optional). | +| `minor` | `Minor` | Minor version component (optional). | +| `patch` | `Patch` | Patch version component (optional). | +| `build` | `Build` | Build number component (optional). | +| `commit` | `Commit` | Commit hash or identifier (optional). | | `docker_image` | `DockerImage` | Docker image name. | | `image_tag` | `ImageTag` | Docker image tag. | | `working_directory` | `WorkingDirectory` | Base directory for the action. | @@ -50,7 +50,19 @@ Common parameters are described in [Common parameters](../common-parameters.md). ## Examples -### CLI +### Minimal CLI Example + +Build with only required parameters (uses version from build specification): + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows -ArgsJson '{ + "MinimumSupportedLVVersion": "2026", + "SupportedBitness": "64", + "ProjectPath": "lv_icon_editor.lvproj" +}' +``` + +### CLI with Custom Version ```powershell pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows -ArgsJson '{ @@ -69,7 +81,20 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows - }' ``` -### GitHub Action +### Minimal GitHub Action + +Build with only required parameters: + +```yaml +- name: Build PPL with Windows Docker + uses: owner/repo/build-lvlibp-docker-windows@v1 + with: + minimum_supported_lv_version: '2026' + supported_bitness: '64' + project_path: 'lv_icon_editor.lvproj' +``` + +### GitHub Action with Custom Version ```yaml - name: Build PPL with Windows Docker @@ -111,16 +136,20 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows - 1. Pulls the specified Windows Docker image (e.g., `nationalinstruments/labview:2026-windows`) 2. Mounts the workspace directory into the container at `C:\workspace` -3. Mounts the PowerShell build script into the container at `C:\build-lvlibp.ps1` -4. Constructs the LabVIEWPath based on version and bitness -5. Executes the PowerShell script which runs `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters -6. Copies LabVIEW logs from `%TEMP%` to `C:\workspace\build-logs` for artifact collection -7. On failure, exits with the build error code +3. Mounts the action repository root (containing helper VIs) into the container at `C:\action` +4. Mounts the PowerShell build script into the container at `C:\scripts\build-lvlibp.ps1` +5. Constructs the LabVIEWPath based on version and bitness +6. If version parameters are provided (all four must be specified): + - Executes helper VI to set build specification version + - Helper VI uses positional arguments: ProjectPath, BuildSpecName, TargetName, Version +7. Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters +8. Copies LabVIEW logs from `%TEMP%` to `C:\workspace\build-logs` for artifact collection +9. On failure, exits with the build error code ## Return Codes - `0` – success -- non-zero – build failed or Docker operation failed +- non-zero – build failed, version setting failed, or Docker operation failed ## Requirements @@ -130,6 +159,7 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-docker-windows - - The LabVIEW project file must exist at the specified path - LabVIEWCLI must be available in the Docker container - The target and build specification must exist in the project +- If setting version: all four version parameters (Major, Minor, Patch, Build) must be provided or all must be omitted ## Platform Support @@ -143,9 +173,18 @@ This action is designed for Windows Docker containers. Key differences from the For Linux containers, see [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md). +## Version Setting + +The action can optionally set the build version before building: + +- **With version**: Provide all four version parameters (`major`, `minor`, `patch`, `build`) to set a custom version +- **Without version**: Omit all version parameters to use the version configured in the build specification + +You cannot partially specify version components - either provide all four or none. + ## See also - [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) – Linux Docker PPL build action -- [build-lvlibp](build-lvlibp.md) – Non-Docker PPL build action +- [build-lvlibp-win32](build-lvlibp-win32.md) – Windows native PPL build action - [build](build.md) – General LabVIEW build action - [Architecture documentation](../architecture.md) diff --git a/docs/scripts/build-lvlibp-docker-windows.md b/docs/scripts/build-lvlibp-docker-windows.md index 0d4503b9..41fea865 100644 --- a/docs/scripts/build-lvlibp-docker-windows.md +++ b/docs/scripts/build-lvlibp-docker-windows.md @@ -9,19 +9,19 @@ Call **`BuildLvlibpDockerWindows.ps1`** to compile LabVIEW packed libraries usin | `minimum_supported_lv_version` | **Yes** | `2026` | LabVIEW version year to use. | | `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | | `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | -| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | +| `target_name` | No | `My Computer` | Target that contains the build specification. Defaults to "My Computer" in helper VI. | | `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | -| `major` | **Yes** | `1` | Major version component. | -| `minor` | **Yes** | `0` | Minor version component. | -| `patch` | **Yes** | `0` | Patch version component. | -| `build` | **Yes** | `1` | Build number component. | -| `commit` | **Yes** | `abcdef` | Commit identifier. | +| `major` | No | `1` | Major version component. Omit to skip version setting. | +| `minor` | No | `0` | Minor version component. Omit to skip version setting. | +| `patch` | No | `0` | Patch version component. Omit to skip version setting. | +| `build` | No | `1` | Build number component. Omit to skip version setting. | +| `commit` | No | `abcdef` | Commit identifier. | | `docker_image` | No | `nationalinstruments/labview` | Docker image name. | | `image_tag` | No | `2026q1-windows` | Docker image tag. | ## Quick-start -The following example builds using LabVIEW 2026 inside a Windows Docker container. +The following example builds using LabVIEW 2026 inside a Windows Docker container with custom version: ```yaml - uses: ./.github/actions/build-lvlibp-docker-windows @@ -40,6 +40,18 @@ The following example builds using LabVIEW 2026 inside a Windows Docker containe image_tag: 2026q1-windows ``` +## Minimal Example + +Build with only required parameters (skips version setting, builds all specifications in "My Computer"): + +```yaml +- uses: ./.github/actions/build-lvlibp-docker-windows + with: + minimum_supported_lv_version: 2026 + supported_bitness: 64 + project_path: lv_icon_editor.lvproj +``` + ## Build All Specifications Leave `build_spec_name` empty to build all build specifications under the target: diff --git a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 index 2a4c1fda..e20ee8d0 100644 --- a/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 +++ b/scripts/build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1 @@ -15,23 +15,23 @@ .PARAMETER ProjectPath Path to the LabVIEW project .lvproj file that contains the build specification. -.PARAMETER TargetName - Target that contains the build specification. +PARAMETER TargetName + Target that contains the build specification. Defaults to "My Computer". .PARAMETER BuildSpecName Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. .PARAMETER Major - Major version component for the PPL. + Major version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Minor - Minor version component for the PPL. + Minor version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Patch - Patch version component for the PPL. + Patch version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Build - Build number component for the PPL. + Build number component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Commit Commit hash or identifier recorded in the build. @@ -60,26 +60,26 @@ param( [Parameter(Mandatory = $true)] [string]$ProjectPath, - [Parameter(Mandatory = $true)] - [string]$TargetName, + [Parameter(Mandatory = $false)] + [string]$TargetName = "", [Parameter(Mandatory = $false)] [string]$BuildSpecName = "", - [Parameter(Mandatory = $true)] - [int]$Major, + [Parameter(Mandatory = $false)] + [int]$Major = -1, - [Parameter(Mandatory = $true)] - [int]$Minor, + [Parameter(Mandatory = $false)] + [int]$Minor = -1, - [Parameter(Mandatory = $true)] - [int]$Patch, + [Parameter(Mandatory = $false)] + [int]$Patch = -1, - [Parameter(Mandatory = $true)] - [int]$Build, + [Parameter(Mandatory = $false)] + [int]$Build = -1, - [Parameter(Mandatory = $true)] - [string]$Commit, + [Parameter(Mandatory = $false)] + [string]$Commit = "", [Parameter(Mandatory = $false)] [string]$DockerImage = "nationalinstruments/labview", @@ -93,8 +93,18 @@ $ErrorActionPreference = 'Stop' try { Write-Verbose "Building PPL with Windows Docker container" - Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue - Write-Information "Commit: $Commit" -InformationAction Continue + $hasVersion = ($Major -ge 0) -and ($Minor -ge 0) -and ($Patch -ge 0) -and ($Build -ge 0) + + if ($hasVersion) { + $versionString = "$Major.$Minor.$Patch.$Build" + Write-Information "PPL Version: $versionString" -InformationAction Continue + } else { + Write-Information "PPL Version setting skipped." -InformationAction Continue + } + + if ($Commit) { + Write-Information "Commit: $Commit" -InformationAction Continue + } $fullImage = "${DockerImage}:${ImageTag}" Write-Information "Docker Image: $fullImage" -InformationAction Continue @@ -114,6 +124,19 @@ try { throw "Build script not found: $buildScript" } + $actionRoot = Split-Path (Split-Path $scriptDir -Parent) -Parent + Write-Verbose "Calculated action root from script path: $actionRoot" + + $helperDir = Join-Path $actionRoot 'scripts' 'build-lvlibp-helpers' + + if (-not (Test-Path $helperDir)) { + throw "Helper VI directory not found: $helperDir" + } + + Write-Verbose "Action root: $actionRoot" + Write-Verbose "Helper directory: $helperDir" + Write-Verbose "Build script path: $buildScript" + # Create temporary directory for script mounting $tempDir = Join-Path $env:TEMP "docker-build-$(New-Guid)" New-Item -Path $tempDir -ItemType Directory -Force | Out-Null @@ -138,19 +161,27 @@ try { $scriptArgs = @( "-LabVIEWPath", "`"$labviewPath`"" "-ProjectPath", "`"$containerProjectPath`"" - "-TargetName", "`"$TargetName`"" ) + + if (-not [string]::IsNullOrWhiteSpace($TargetName)) { + $scriptArgs += "-TargetName", "`"$TargetName`"" + } if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { $scriptArgs += "-BuildSpecName", "`"$BuildSpecName`"" } + if ($hasVersion) { + $scriptArgs += "-Version", "`"$versionString`"" + } + Write-Information "Executing build script in Windows Docker container..." -InformationAction Continue Write-Verbose "Script: $containerScriptPath $($scriptArgs -join ' ')" # Run build in Windows container using -File with mounted script docker run --rm ` -v "${PWD}:C:\workspace" ` + -v "${actionRoot}:C:\actions" ` -v "${tempDir}:C:\scripts" ` $fullImage ` powershell -NoProfile -File $containerScriptPath @scriptArgs ` @@ -169,4 +200,10 @@ try { catch { Write-Error "BuildLvlibpDockerWindows failed: $_" exit 1 +} +finally { + if ($tempDir -and (Test-Path $tempDir)) { + Remove-Item -Path $tempDir -Recurse -Force -ErrorAction SilentlyContinue + Write-Verbose "Cleaned up temporary directory: $tempDir" + } } \ No newline at end of file diff --git a/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 index 8ee8ddde..e4dc4767 100644 --- a/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 @@ -27,21 +27,42 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json $action = $dispatchers.'build-lvlibp-docker-windows' + # Only 3 parameters are required $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + } + + It 'validates optional parameters are defined [REQ-040]' -Tag 'REQ-040' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-docker-windows' + # Optional parameters $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.BuildSpecName | Should -Not -BeNullOrEmpty $action.parameters.Major | Should -Not -BeNullOrEmpty $action.parameters.Minor | Should -Not -BeNullOrEmpty $action.parameters.Patch | Should -Not -BeNullOrEmpty $action.parameters.Build | Should -Not -BeNullOrEmpty $action.parameters.Commit | Should -Not -BeNullOrEmpty + $action.parameters.DockerImage | Should -Not -BeNullOrEmpty + $action.parameters.ImageTag | Should -Not -BeNullOrEmpty + } + + It 'executes dry-run with only required parameters [REQ-040]' -Tag 'REQ-040' { + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-windows' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 } - It 'executes dry-run without errors [REQ-040]' -Tag 'REQ-040' { + It 'executes dry-run with all parameters [REQ-040]' -Tag 'REQ-040' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` -ActionName 'build-lvlibp-docker-windows' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234","DockerImage":"nationalinstruments/labview","ImageTag":"2026q1-windows"}' ` -DryRun $LASTEXITCODE | Should -Be 0 @@ -49,6 +70,18 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { It 'validates module function throws when required parameters are missing [REQ-040]' -Tag 'REQ-040' { { Invoke-BuildLvlibpDockerWindows } | Should -Throw + { Invoke-BuildLvlibpDockerWindows -MinimumSupportedLVVersion '2026' } | Should -Throw + { Invoke-BuildLvlibpDockerWindows -MinimumSupportedLVVersion '2026' -SupportedBitness '64' } | Should -Throw + } + + It 'validates module function accepts minimal required parameters [REQ-040]' -Tag 'REQ-040' { + { + Invoke-BuildLvlibpDockerWindows ` + -MinimumSupportedLVVersion '2026' ` + -SupportedBitness '64' ` + -ProjectPath 'test.lvproj' ` + -DryRun + } | Should -Not -Throw } It 'accepts optional parameters in dry-run [REQ-040]' -Tag 'REQ-040' { @@ -60,6 +93,16 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { $LASTEXITCODE | Should -Be 0 } + It 'accepts partial version parameters in dry-run (should skip version setting) [REQ-040]' -Tag 'REQ-040' { + # Omitting version parameters should skip version setting + $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` + -ActionName 'build-lvlibp-docker-windows' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild"}' ` + -DryRun + + $LASTEXITCODE | Should -Be 0 + } + It 'validates action.yml exists [REQ-040]' -Tag 'REQ-040' { $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-windows' 'action.yml' Test-Path $actionPath | Should -Be $true @@ -74,4 +117,9 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'build-lvlibp.ps1' Test-Path $scriptPath | Should -Be $true } + + It 'validates helper VI directory exists [REQ-040]' -Tag 'REQ-040' { + $helperPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-helpers' + Test-Path $helperPath | Should -Be $true + } } \ No newline at end of file From 440cadd4a17c09823300eac73b801f0f87d152ad Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 09:58:55 +0530 Subject: [PATCH 32/49] Updated helper function [REQ-040] --- .../build-lvlibp.ps1 | 63 +++++++++++++++++-- 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index 61c91890..d53256f4 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -17,11 +17,14 @@ param( [Parameter(Mandatory = $true)] [string]$ProjectPath, - [Parameter(Mandatory = $true)] - [string]$TargetName, + [Parameter(Mandatory = $false)] + [string]$TargetName = "", [Parameter(Mandatory = $false)] - [string]$BuildSpecName = "" + [string]$BuildSpecName = "", + + [Parameter(Mandatory = $false)] + [string]$Version = "" ) Set-StrictMode -Version Latest @@ -30,17 +33,67 @@ $ErrorActionPreference = 'Stop' Write-Host "Building LabVIEW Packed Project Library..." Write-Host "LabVIEW: $LabVIEWPath" Write-Host "Project: $ProjectPath" -Write-Host "Target: $TargetName" +Write-Host "Target: $(if ($TargetName) { $TargetName } else { '' })" Write-Host "Build Spec: $(if ($BuildSpecName) { $BuildSpecName } else { '' })" +Write-Host "Version: $(if ($Version) { $Version } else { '' })" + +# Set build version using helper VI if Version is provided +if ($Version) { + Write-Host "Setting build version to: $Version..." + $helperVI = "C:\actions\scripts\build-lvlibp-helpers\SetBuildVersionCaller.vi" + + if (-not (Test-Path $helperVI)) { + throw "Helper VI not found at: $helperVI" + } + + # SetBuildVersionCaller.vi expects positional arguments: + # 1. ProjectPath (required) + # 2. BuildSpecName (optional, empty string to apply to all) + # 3. TargetName (optional, defaults to "My Computer" in VI) + # 4. Version (optional, empty string to skip version setting) + $setVersionArgs = @( + '-OperationName', 'RunVI' + '-LabVIEWPath', $LabVIEWPath + '-VIPath', $helperVI + $ProjectPath + ) + + # Add BuildSpecName (empty string if not provided) + $setVersionArgs += if ($BuildSpecName) { $BuildSpecName } else { "" } + + # Add TargetName (empty string to use VI default) + $setVersionArgs += if ($TargetName) { $TargetName } else { "" } + + # Add Version + $setVersionArgs += $Version + + $setVersionArgs += '-Headless' + + Write-Host "Executing: LabVIEWCLI $($setVersionArgs -join ' ')" + + & LabVIEWCLI @setVersionArgs + $setVersionExit = $LASTEXITCODE + + if ($setVersionExit -ne 0) { + throw "Failed to set build version (exit code: $setVersionExit)" + } + + Write-Host "Build version set successfully" +} else { + Write-Host "Skipping version set - using version from build spec(s)" +} # Construct LabVIEWCLI command $cliArgs = @( '-OperationName', 'ExecuteBuildSpec' '-LabVIEWPath', $LabVIEWPath '-ProjectPath', $ProjectPath - '-TargetName', $TargetName ) +if (-not [string]::IsNullOrWhiteSpace($TargetName)) { + $cliArgs += '-TargetName', $TargetName +} + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { $cliArgs += '-BuildSpecName', $BuildSpecName } From c5dfd9723539fd15ce26b0645a8db441b97e5023 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 12:05:39 +0530 Subject: [PATCH 33/49] Fixed logic to buuild command [REQ-040] --- .../build-lvlibp.ps1 | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index d53256f4..26a187cd 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -56,23 +56,26 @@ if ($Version) { '-LabVIEWPath', $LabVIEWPath '-VIPath', $helperVI $ProjectPath + $BuildSpecName + $TargetName + $Version ) - # Add BuildSpecName (empty string if not provided) - $setVersionArgs += if ($BuildSpecName) { $BuildSpecName } else { "" } - - # Add TargetName (empty string to use VI default) - $setVersionArgs += if ($TargetName) { $TargetName } else { "" } - - # Add Version - $setVersionArgs += $Version - - $setVersionArgs += '-Headless' - - Write-Host "Executing: LabVIEWCLI $($setVersionArgs -join ' ')" + Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath $helperVI `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$Version`"" + + # Use Start-Process to preserve empty string arguments + $argumentList = @( + '-OperationName', 'RunVI', + '-LabVIEWPath', "`"$LabVIEWPath`"", + '-VIPath', $helperVI, + "`"$ProjectPath`"", + "`"$BuildSpecName`"", + "`"$TargetName`"", + "`"$Version`"" + ) - & LabVIEWCLI @setVersionArgs - $setVersionExit = $LASTEXITCODE + $processInfo = Start-Process -FilePath 'LabVIEWCLI' -ArgumentList ($argumentList -join ' ') -NoNewWindow -Wait -PassThru + $setVersionExit = $processInfo.ExitCode if ($setVersionExit -ne 0) { throw "Failed to set build version (exit code: $setVersionExit)" From 0167ea4637f38eaebea34ff7fa5b936acf1d82bf Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 12:08:42 +0530 Subject: [PATCH 34/49] Run in Headless mode [REQ-040] --- scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index 26a187cd..cc2d2950 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -71,7 +71,8 @@ if ($Version) { "`"$ProjectPath`"", "`"$BuildSpecName`"", "`"$TargetName`"", - "`"$Version`"" + "`"$Version`"", + '-Headless' ) $processInfo = Start-Process -FilePath 'LabVIEWCLI' -ArgumentList ($argumentList -join ' ') -NoNewWindow -Wait -PassThru From 4e533da17a1a21c4228ce9a459d0af783f74a758 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 12:13:16 +0530 Subject: [PATCH 35/49] Updated versioning logic [REQ-039] --- .../build-lvlibp-docker-linux/build-lvlibp.sh | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh index d312782d..2a9ef8e7 100644 --- a/scripts/build-lvlibp-docker-linux/build-lvlibp.sh +++ b/scripts/build-lvlibp-docker-linux/build-lvlibp.sh @@ -69,25 +69,19 @@ if [[ -n "$VERSION" ]]; then # 3. TargetName (optional, defaults to "My Computer" in VI) # 4. Version (optional, empty string to skip version setting) - SET_VERSION_ARGS=( - "-OperationName" "RunVI" - "-LabVIEWPath" "$LABVIEW_PATH" - "-VIPath" "$HELPER_VI" - "$PROJECT_PATH" - ) + echo "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath \"$LABVIEW_PATH\" -VIPath $HELPER_VI \"$PROJECT_PATH\" \"$BUILD_SPEC_NAME\" \"$TARGET_NAME\" \"$VERSION\"" - SET_VERSION_ARGS+=("${BUILD_SPEC_NAME:-}") - - # Add TargetName (empty string to use VI default) - SET_VERSION_ARGS+=("${TARGET_NAME:-}") - - # Add Version - SET_VERSION_ARGS+=("$VERSION") - - SET_VERSION_ARGS+=("-Headless") + # Pass all positional arguments, preserving empty strings + LabVIEWCLI \ + -OperationName RunVI \ + -LabVIEWPath "$LABVIEW_PATH" \ + -VIPath "$HELPER_VI" \ + "$PROJECT_PATH" \ + "$BUILD_SPEC_NAME" \ + "$TARGET_NAME" \ + "$VERSION" \ + -Headless - echo "Executing: LabVIEWCLI ${SET_VERSION_ARGS[*]}" - LabVIEWCLI "${SET_VERSION_ARGS[@]}" SET_VERSION_EXIT=$? if [[ $SET_VERSION_EXIT -ne 0 ]]; then From 436349c8f876ccfd60bc78940e8d76748f36ce8e Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 12:47:31 +0530 Subject: [PATCH 36/49] Fix versioning args [REQ-040] --- .../build-lvlibp.ps1 | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index cc2d2950..92deb868 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -59,24 +59,11 @@ if ($Version) { $BuildSpecName $TargetName $Version - ) - - Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath $helperVI `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$Version`"" - - # Use Start-Process to preserve empty string arguments - $argumentList = @( - '-OperationName', 'RunVI', - '-LabVIEWPath', "`"$LabVIEWPath`"", - '-VIPath', $helperVI, - "`"$ProjectPath`"", - "`"$BuildSpecName`"", - "`"$TargetName`"", - "`"$Version`"", '-Headless' ) - $processInfo = Start-Process -FilePath 'LabVIEWCLI' -ArgumentList ($argumentList -join ' ') -NoNewWindow -Wait -PassThru - $setVersionExit = $processInfo.ExitCode + & LabVIEWCLI @setVersionArgs + $setVersionExit = $LASTEXITCODE if ($setVersionExit -ne 0) { throw "Failed to set build version (exit code: $setVersionExit)" From a4e23b2793f3f6c2e96ce16600059a4587a46d9c Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 13:36:30 +0530 Subject: [PATCH 37/49] Added line for debugging [REQ-040] --- scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index 92deb868..973dbe3d 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -62,6 +62,7 @@ if ($Version) { '-Headless' ) + Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$Version`" -Headless" & LabVIEWCLI @setVersionArgs $setVersionExit = $LASTEXITCODE From 3049dd7cb01d805ab4cbd2060381ac2728070856 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 13:45:19 +0530 Subject: [PATCH 38/49] Use helper VI to set version [REQ-041] --- actions/Invoke-OSAction.ps1 | 1 + actions/OpenSourceActions.psm1 | 62 ++---- artifacts/linux/action-docs.json | 58 +++--- artifacts/linux/action-docs.md | 28 +-- build-lvlibp-docker/action.yml | 86 -------- build-lvlibp-win32/action.yml | 40 ++-- ci_evidence.txt | 2 +- dispatchers.json | 32 +-- docs/actions/build-lvlibp-win32.md | 77 +++++-- docs/scripts/build-lvlibp-win32.md | 54 +++-- .../build-lvlibp-docker/BuildLvlibpDocker.ps1 | 195 ------------------ .../build-lvlibp-win32/BuildLvlibpWin32.ps1 | 99 ++++++--- .../BuildLvlibpDocker.Workflow.Tests.ps1 | 72 ------- .../BuildLvlibpWin32.Workflow.Tests.ps1 | 20 ++ 14 files changed, 289 insertions(+), 537 deletions(-) delete mode 100644 build-lvlibp-docker/action.yml delete mode 100644 scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 delete mode 100644 tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 diff --git a/actions/Invoke-OSAction.ps1 b/actions/Invoke-OSAction.ps1 index 34f83ccd..a837936f 100644 --- a/actions/Invoke-OSAction.ps1 +++ b/actions/Invoke-OSAction.ps1 @@ -26,6 +26,7 @@ $FallbackRegistry = [ordered]@{ 'build-lvlibp' = 'Invoke-BuildLvlibp' 'build-lvlibp-docker-linux' = 'Invoke-BuildLvlibpDockerLinux' 'build-lvlibp-docker-windows' = 'Invoke-BuildLvlibpDockerWindows' + 'build-lvlibp-win32' = 'Invoke-BuildLvlibpWin32' 'build-vi-package' = 'Invoke-BuildViPackage' 'close-labview' = 'Invoke-CloseLabVIEW' 'generate-release-notes' = 'Invoke-GenerateReleaseNotes' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index 9523dc08..e50a1f89 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -342,55 +342,17 @@ function Invoke-BuildLvlibpDockerWindows { return $result } -function Invoke-BuildLvlibpWin32 { - [CmdletBinding()] - param( - [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, - [Parameter(Mandatory)] [string] $SupportedBitness, - [Parameter(Mandatory)] [string] $ProjectPath, - [Parameter()] [string] $TargetName = "", - [Parameter()] [string] $BuildSpecName = "", - [Parameter()] [int] $Major = -1, - [Parameter()] [int] $Minor = -1, - [Parameter()] [int] $Patch = -1, - [Parameter()] [int] $Build = -1, - [Parameter()] [string] $Commit = "", - [switch] $DryRun, - [string] $gcliPath - ) - Write-Information "Invoking BuildLvlibpWin32" -InformationAction Continue - - $result = Invoke-OpenSourceActionScript ` - -ScriptSegments @('build-lvlibp-win32', 'BuildLvlibpWin32.ps1') ` - -Arguments @{ - MinimumSupportedLVVersion = $MinimumSupportedLVVersion - SupportedBitness = $SupportedBitness - ProjectPath = $ProjectPath - TargetName = $TargetName - BuildSpecName = $BuildSpecName - Major = $Major - Minor = $Minor - Patch = $Patch - Build = $Build - Commit = $Commit - } ` - -DryRun:$DryRun ` - -gcliPath $gcliPath - - return $result -} - # Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. # MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). # SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). # ProjectPath: Path to the LabVIEW project .lvproj file. -# TargetName: Target that contains the build specification. +# TargetName: Target that contains the build specification (optional, defaults to "My Computer"). # BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). -# Major: Major version component. -# Minor: Minor version component. -# Patch: Patch version component. -# Build: Build number component. -# Commit: Commit hash or identifier. +# Major: Major version component (optional, skips version setting if < 0). +# Minor: Minor version component (optional, skips version setting if < 0). +# Patch: Patch version component (optional, skips version setting if < 0). +# Build: Build number component (optional, skips version setting if < 0). +# Commit: Commit hash or identifier (optional). # DryRun: If set, prints the command instead of executing it. # gcliPath: Optional path prepended to PATH for locating the g CLI. function Invoke-BuildLvlibpWin32 { @@ -399,13 +361,13 @@ function Invoke-BuildLvlibpWin32 { [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, [Parameter(Mandatory)] [string] $SupportedBitness, [Parameter(Mandatory)] [string] $ProjectPath, - [Parameter(Mandatory)] [string] $TargetName, + [Parameter()] [string] $TargetName = "", [Parameter()] [string] $BuildSpecName = "", - [Parameter(Mandatory)] [int] $Major, - [Parameter(Mandatory)] [int] $Minor, - [Parameter(Mandatory)] [int] $Patch, - [Parameter(Mandatory)] [int] $Build, - [Parameter(Mandatory)] [string] $Commit, + [Parameter()] [int] $Major = -1, + [Parameter()] [int] $Minor = -1, + [Parameter()] [int] $Patch = -1, + [Parameter()] [int] $Build = -1, + [Parameter()] [string] $Commit = "", [switch] $DryRun, [string] $gcliPath ) diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index 63a9e22a..b56ac1bf 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -365,12 +365,13 @@ } }, "Invoke-BuildLvlibpWin32": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", - "required": true, - "description": "Build number component" + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" }, "BuildSpecName": { "type": "string", @@ -380,8 +381,9 @@ }, "Commit": { "type": "string", - "required": true, - "description": "Commit hash or identifier" + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" }, "DryRun": { "type": "boolean", @@ -395,8 +397,9 @@ }, "Major": { "type": "number", - "required": true, - "description": "Major version component" + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" }, "MinimumSupportedLVVersion": { "type": "string", @@ -405,13 +408,15 @@ }, "Minor": { "type": "number", - "required": true, - "description": "Minor version component" + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" }, "Patch": { "type": "number", - "required": true, - "description": "Patch version component" + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" }, "ProjectPath": { "type": "string", @@ -425,8 +430,9 @@ }, "TargetName": { "type": "string", - "required": true, - "description": "Target that contains the build specification" + "required": false, + "default": "", + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" } } }, @@ -1443,7 +1449,7 @@ }, { "name": "supported_bitness", - "description": "Bitness of the LabVIEW environment (\"32\").", + "description": "Bitness of the LabVIEW environment (\"32\" or \"64\").", "required": true, "default": "", "type": "string" @@ -1457,8 +1463,8 @@ }, { "name": "target_name", - "description": "Target that contains the build specification.", - "required": true, + "description": "Target that contains the build specification. Defaults to \"My Computer\" in helper VI.", + "required": false, "default": "", "type": "string" }, @@ -1471,36 +1477,36 @@ }, { "name": "major", - "description": "Major version component for the PPL.", - "required": true, + "description": "Major version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "minor", - "description": "Minor version component for the PPL.", - "required": true, + "description": "Minor version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "patch", - "description": "Patch version component for the PPL.", - "required": true, + "description": "Patch version component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "build", - "description": "Build number component for the PPL.", - "required": true, + "description": "Build number component for the PPL. Omit to skip version setting.", + "required": false, "default": "", "type": "string" }, { "name": "commit", "description": "Commit hash or identifier recorded in the build.", - "required": true, + "required": false, "default": "", "type": "string" }, @@ -1522,7 +1528,7 @@ "name": "dry_run", "description": "If true, simulate the action without side effects.", "required": false, - "default": false, + "default": "false", "type": "string" } ], diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index c5a457c2..97deb384 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -122,20 +122,20 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows - ``` #### Invoke-BuildLvlibpWin32 -Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. +Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to "My Computer"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | | --- | --- | --- | --- | --- | -| Build | number | true | | Build number component | +| Build | number | false | -1 | Build number component (optional, skips version setting if < 0) | | BuildSpecName | string | false | | Name of the LabVIEW build specification (optional, builds all if empty) | -| Commit | string | true | | Commit hash or identifier | +| Commit | string | false | | Commit hash or identifier (optional) | | DryRun | boolean | false | | If set, prints the command instead of executing it | -| Major | number | true | | Major version component | +| Major | number | false | -1 | Major version component (optional, skips version setting if < 0) | | MinimumSupportedLVVersion | string | true | | LabVIEW version for the build (e | -| Minor | number | true | | Minor version component | -| Patch | number | true | | Patch version component | +| Minor | number | false | -1 | Minor version component (optional, skips version setting if < 0) | +| Patch | number | false | -1 | Patch version component (optional, skips version setting if < 0) | | ProjectPath | string | true | | Path to the LabVIEW project | | SupportedBitness | string | true | | Bitness of the LabVIEW environment ("32" or "64") | -| TargetName | string | true | | Target that contains the build specification | +| TargetName | string | false | | Target that contains the build specification (optional, defaults to "My Computer") | | gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | ```powershell @@ -445,15 +445,15 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | -| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32"). | +| supported_bitness | string | true | | Bitness of the LabVIEW environment ("32" or "64"). | | project_path | string | true | | Path to the LabVIEW project .lvproj file. | -| target_name | string | true | | Target that contains the build specification. | +| target_name | string | false | | Target that contains the build specification. Defaults to "My Computer" in helper VI. | | build_spec_name | string | false | | Name of the build specification. If empty, builds all specifications in the target. | -| major | string | true | | Major version component for the PPL. | -| minor | string | true | | Minor version component for the PPL. | -| patch | string | true | | Patch version component for the PPL. | -| build | string | true | | Build number component for the PPL. | -| commit | string | true | | Commit hash or identifier recorded in the build. | +| major | string | false | | Major version component for the PPL. Omit to skip version setting. | +| minor | string | false | | Minor version component for the PPL. Omit to skip version setting. | +| patch | string | false | | Patch version component for the PPL. Omit to skip version setting. | +| build | string | false | | Build number component for the PPL. Omit to skip version setting. | +| commit | string | false | | Commit hash or identifier recorded in the build. | | working_directory | string | false | | Working directory where the action will run. | | log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | | dry_run | string | false | false | If true, simulate the action without side effects. | diff --git a/build-lvlibp-docker/action.yml b/build-lvlibp-docker/action.yml deleted file mode 100644 index 1260ee56..00000000 --- a/build-lvlibp-docker/action.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: 'Build LVLIBP Docker' -description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Docker container' -inputs: - minimum_supported_lv_version: - description: 'LabVIEW version for the build (e.g., "2021", "2026").' - required: true - supported_bitness: - description: 'Bitness of the LabVIEW environment ("32" or "64").' - required: true - project_path: - description: 'Path to the LabVIEW project .lvproj file.' - required: true - target_name: - description: 'Target that contains the build specification.' - required: true - build_spec_name: - description: 'Name of the build specification. If empty, builds all specifications in the target.' - required: false - default: '' - major: - description: 'Major version component for the PPL.' - required: true - minor: - description: 'Minor version component for the PPL.' - required: true - patch: - description: 'Patch version component for the PPL.' - required: true - build: - description: 'Build number component for the PPL.' - required: true - commit: - description: 'Commit hash or identifier recorded in the build.' - required: true - docker_image: - description: 'Docker image name.' - required: false - default: 'nationalinstruments/labview' - image_tag: - description: 'Docker image tag. Defaults to "2026q1-linux" if not specified.' - required: false - default: '' - working_directory: - description: 'Working directory where the action will run.' - required: false - log_level: - description: 'Verbosity level (ERROR|WARN|INFO|DEBUG).' - default: 'INFO' - required: false - dry_run: - description: 'If true, simulate the action without side effects.' - default: false - required: false - -runs: - using: 'composite' - steps: - - name: Dispatch build-lvlibp-docker - shell: pwsh - run: | - $ErrorActionPreference = 'Stop' - $args = @{ - MinimumSupportedLVVersion = '${{ inputs.minimum_supported_lv_version }}' - SupportedBitness = '${{ inputs.supported_bitness }}' - ProjectPath = '${{ inputs.project_path }}' - TargetName = '${{ inputs.target_name }}' - Major = [int]'${{ inputs.major }}' - Minor = [int]'${{ inputs.minor }}' - Patch = [int]'${{ inputs.patch }}' - Build = [int]'${{ inputs.build }}' - Commit = '${{ inputs.commit }}' - } - if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } - if ('${{ inputs.docker_image }}') { $args['DockerImage'] = '${{ inputs.docker_image }}' } - if ('${{ inputs.image_tag }}') { $args['ImageTag'] = '${{ inputs.image_tag }}' } - - $params = @{ - ActionName = 'build-lvlibp-docker' - ArgsJson = ($args | ConvertTo-Json -Compress) - LogLevel = '${{ inputs.log_level }}' - } - if ('${{ inputs.dry_run }}' -eq 'true') { $params['DryRun'] = $true } - if ('${{ inputs.working_directory }}') { $params['WorkingDirectory'] = '${{ inputs.working_directory }}' } - - & '${{ github.action_path }}/../actions/Invoke-OSAction.ps1' @params - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/build-lvlibp-win32/action.yml b/build-lvlibp-win32/action.yml index 1a329269..045e545c 100644 --- a/build-lvlibp-win32/action.yml +++ b/build-lvlibp-win32/action.yml @@ -5,33 +5,35 @@ inputs: description: 'LabVIEW version year for the build (e.g., "2021", "2026").' required: true supported_bitness: - description: 'Bitness of the LabVIEW environment ("32").' + description: 'Bitness of the LabVIEW environment ("32" or "64").' required: true project_path: description: 'Path to the LabVIEW project .lvproj file.' required: true target_name: - description: 'Target that contains the build specification.' - required: true + description: 'Target that contains the build specification. Defaults to "My Computer" in helper VI.' + required: false + default: '' build_spec_name: description: 'Name of the build specification. If empty, builds all specifications in the target.' required: false default: '' major: - description: 'Major version component for the PPL.' - required: true + description: 'Major version component for the PPL. Omit to skip version setting.' + required: false minor: - description: 'Minor version component for the PPL.' - required: true + description: 'Minor version component for the PPL. Omit to skip version setting.' + required: false patch: - description: 'Patch version component for the PPL.' - required: true + description: 'Patch version component for the PPL. Omit to skip version setting.' + required: false build: - description: 'Build number component for the PPL.' - required: true + description: 'Build number component for the PPL. Omit to skip version setting.' + required: false commit: description: 'Commit hash or identifier recorded in the build.' - required: true + required: false + default: '' working_directory: description: 'Working directory where the action will run.' required: false @@ -41,7 +43,7 @@ inputs: required: false dry_run: description: 'If true, simulate the action without side effects.' - default: false + default: 'false' required: false runs: @@ -56,13 +58,15 @@ runs: SupportedBitness = '${{ inputs.supported_bitness }}' ProjectPath = '${{ inputs.project_path }}' TargetName = '${{ inputs.target_name }}' - Major = [int]'${{ inputs.major }}' - Minor = [int]'${{ inputs.minor }}' - Patch = [int]'${{ inputs.patch }}' - Build = [int]'${{ inputs.build }}' + BuildSpecName = '${{ inputs.build_spec_name }}' Commit = '${{ inputs.commit }}' } - if ('${{ inputs.build_spec_name }}') { $args['BuildSpecName'] = '${{ inputs.build_spec_name }}' } + + # Only add version parameters if they are provided + if ('${{ inputs.major }}') { $args['Major'] = [int]'${{ inputs.major }}' } + if ('${{ inputs.minor }}') { $args['Minor'] = [int]'${{ inputs.minor }}' } + if ('${{ inputs.patch }}') { $args['Patch'] = [int]'${{ inputs.patch }}' } + if ('${{ inputs.build }}') { $args['Build'] = [int]'${{ inputs.build }}' } $params = @{ ActionName = 'build-lvlibp-win32' diff --git a/ci_evidence.txt b/ci_evidence.txt index 736f4bd9..66933ff2 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"f76edce1f9190ca0f7234890cac5935d2e1236be","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"a4e23b2793f3f6c2e96ce16600059a4587a46d9c","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index ad901d98..7293f831 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -363,12 +363,13 @@ } }, "Invoke-BuildLvlibpWin32": { - "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification. BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component. Minor: Minor version component. Patch: Patch version component. Build: Build number component. Commit: Commit hash or identifier. DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", + "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { "type": "number", - "required": true, - "description": "Build number component" + "required": false, + "default": "-1", + "description": "Build number component (optional, skips version setting if < 0)" }, "BuildSpecName": { "type": "string", @@ -378,8 +379,9 @@ }, "Commit": { "type": "string", - "required": true, - "description": "Commit hash or identifier" + "required": false, + "default": "", + "description": "Commit hash or identifier (optional)" }, "DryRun": { "type": "boolean", @@ -393,8 +395,9 @@ }, "Major": { "type": "number", - "required": true, - "description": "Major version component" + "required": false, + "default": "-1", + "description": "Major version component (optional, skips version setting if < 0)" }, "MinimumSupportedLVVersion": { "type": "string", @@ -403,13 +406,15 @@ }, "Minor": { "type": "number", - "required": true, - "description": "Minor version component" + "required": false, + "default": "-1", + "description": "Minor version component (optional, skips version setting if < 0)" }, "Patch": { "type": "number", - "required": true, - "description": "Patch version component" + "required": false, + "default": "-1", + "description": "Patch version component (optional, skips version setting if < 0)" }, "ProjectPath": { "type": "string", @@ -423,8 +428,9 @@ }, "TargetName": { "type": "string", - "required": true, - "description": "Target that contains the build specification" + "required": false, + "default": "", + "description": "Target that contains the build specification (optional, defaults to \"My Computer\")" } } }, diff --git a/docs/actions/build-lvlibp-win32.md b/docs/actions/build-lvlibp-win32.md index 14147f49..957fb01d 100644 --- a/docs/actions/build-lvlibp-win32.md +++ b/docs/actions/build-lvlibp-win32.md @@ -2,7 +2,7 @@ ## Purpose -Builds LabVIEW Packed Project Library (.lvlibp) files using LabVIEW installed on a Windows GitHub-hosted runner. This action executes the LabVIEW build specification through LabVIEWCLI, embedding version information and commit metadata. +Builds LabVIEW Packed Project Library (.lvlibp) files using LabVIEW installed on a Windows GitHub-hosted runner. This action executes the LabVIEW build specification through LabVIEWCLI (32-bit), optionally embedding version information and commit metadata. Use this action when you need to build PPL files on GitHub-hosted Windows runners with locally installed LabVIEW (no Docker required). @@ -15,16 +15,16 @@ Common parameters are described in [Common parameters](../common-parameters.md). - **MinimumSupportedLVVersion** (`string`): LabVIEW version year for the build (e.g., `"2021"`, `"2023"`, `"2025"`). - **SupportedBitness** (`string`): Bitness of the LabVIEW environment (`"32"` or `"64"`). - **ProjectPath** (`string`): Path to the LabVIEW project `.lvproj` file that contains the build specification. -- **TargetName** (`string`): Target that contains the build specification (e.g., `"My Computer"`). -- **Major** (`int`): Major version component for the PPL. -- **Minor** (`int`): Minor version component for the PPL. -- **Patch** (`int`): Patch version component for the PPL. -- **Build** (`int`): Build number component for the PPL. -- **Commit** (`string`): Commit hash or identifier recorded in the build. ### Optional -- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. Default: `""`. +- **TargetName** (`string`): Target that contains the build specification. Defaults to `"My Computer"` in helper VI if not provided. +- **BuildSpecName** (`string`): Name of the build specification to execute. If empty, builds all build specifications under the specified target. +- **Major** (`int`): Major version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Minor** (`int`): Minor version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Patch** (`int`): Patch version component for the PPL. If not provided (or < 0), version setting is skipped. +- **Build** (`int`): Build number component for the PPL. If not provided (or < 0), version setting is skipped. +- **Commit** (`string`): Commit hash or identifier recorded in the build. ### GitHub Action inputs @@ -33,13 +33,13 @@ Common parameters are described in [Common parameters](../common-parameters.md). | `minimum_supported_lv_version` | `MinimumSupportedLVVersion` | LabVIEW version year for the build. | | `supported_bitness` | `SupportedBitness` | Bitness (`"32"` or `"64"`). | | `project_path` | `ProjectPath` | Path to the LabVIEW project `.lvproj` file. | -| `target_name` | `TargetName` | Target that contains the build specification. | -| `build_spec_name` | `BuildSpecName` | Name of the build specification (optional). | -| `major` | `Major` | Major version component. | -| `minor` | `Minor` | Minor version component. | -| `patch` | `Patch` | Patch version component. | -| `build` | `Build` | Build number component. | -| `commit` | `Commit` | Commit hash or identifier. | +| `target_name` | `TargetName` | Target that contains the build specification ("My Computer" is used if empty). | +| `build_spec_name` | `BuildSpecName` | Name of the build specification (Uses all build specs if empty). | +| `major` | `Major` | Major version component (optional). | +| `minor` | `Minor` | Minor version component (optional). | +| `patch` | `Patch` | Patch version component (optional). | +| `build` | `Build` | Build number component (optional). | +| `commit` | `Commit` | Commit hash or identifier (optional). | | `working_directory` | `WorkingDirectory` | Base directory for the action. | | `log_level` | `LogLevel` | Verbosity level (ERROR\|WARN\|INFO\|DEBUG). | | `dry_run` | `DryRun` | If true, simulate without side effects. | @@ -81,6 +81,17 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson commit: ${{ github.sha }} ``` +### CLI without Version (Skip setting version) + +```powershell +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson '{ + "MinimumSupportedLVVersion": "2025", + "SupportedBitness": "32", + "ProjectPath": "lv_icon_editor.lvproj", + "BuildSpecName": "Editor Packed Library" +}' +``` + ### Complete Workflow with LabVIEW Setup ```yaml @@ -154,6 +165,8 @@ jobs: ### Build All Specifications +Omit `build_spec_name` to build all build specifications. The provided version is applied to all specs: + ```yaml - name: Build All PPLs uses: ni/open-source/build-lvlibp-win32@v1 @@ -162,7 +175,6 @@ jobs: supported_bitness: '32' project_path: 'lv_icon_editor.lvproj' target_name: 'My Computer' - build_spec_name: '' # Empty - builds all specifications major: 1 minor: 0 patch: 0 @@ -172,12 +184,32 @@ jobs: ## Behavior -1. Uses the LabVIEWPath: `C:\Program Files (x86)\National Instruments\LabVIEW {version}\LabVIEW.exe` -2. Verifies that LabVIEW exists at the expected path -3. Verifies that the project file exists -4. Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with the specified parameters -5. Copies LabVIEW logs from `%TEMP%` to `build-logs\` directory for artifact collection -6. On failure, exits with the build error code +1. **Version Setting**: + + - If all version components (`Major`, `Minor`, `Patch`, `Build`) are provided (β‰₯ 0), the helper VI is called to set the version + - If any version component is missing or < 0, version setting is skipped + - When version is provided: + - If `BuildSpecName` is specified: version is set on that build spec only + - If `BuildSpecName` is omitted: version is set on **all** build specs in the project + +2. **LabVIEW Path Construction**: + + - 32-bit: `C:\Program Files (x86)\National Instruments\LabVIEW {lv_version}\LabVIEW.exe` + +3. **Build Execution**: + + - Verifies LabVIEW exists at the expected path + - Verifies project file exists + - Calls helper VI to set version (if version parameters provided) + - Executes `LabVIEWCLI -OperationName ExecuteBuildSpec` with specified parameters + +4. **Log Collection**: + + - Copies LabVIEW logs from `%TEMP%` to `build-logs\` directory for artifact collection + +5. **Error Handling**: + + - On failure, exits with the build error code ## Return Codes @@ -191,6 +223,7 @@ jobs: - The LabVIEW project file must exist at the specified path - The target and build specification must exist in the project - Windows runner (Windows Server 2019, 2022, or Windows 10/11) +- Helper VI (`SetBuildVersionCaller.vi`) must be present in `scripts/build-lvlibp-helpers/` ## Platform Support diff --git a/docs/scripts/build-lvlibp-win32.md b/docs/scripts/build-lvlibp-win32.md index ced21b73..6f7a9191 100644 --- a/docs/scripts/build-lvlibp-win32.md +++ b/docs/scripts/build-lvlibp-win32.md @@ -4,18 +4,18 @@ Call **`BuildLvlibpWin32.ps1`** to compile LabVIEW packed libraries using LabVIE ## Inputs -| Name | Required | Example | Description | -|------|----------|---------|-------------| -| `minimum_supported_lv_version` | **Yes** | `2025` | LabVIEW version year to use. | -| `supported_bitness` | **Yes** | `32` or `64` | Target LabVIEW bitness. | -| `project_path` | **Yes** | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | -| `target_name` | **Yes** | `My Computer` | Target that contains the build specification. | -| `build_spec_name` | No | `Editor Packed Library` | Build specification name. Leave empty to build all. | -| `major` | **Yes** | `1` | Major version component. | -| `minor` | **Yes** | `0` | Minor version component. | -| `patch` | **Yes** | `0` | Patch version component. | -| `build` | **Yes** | `1` | Build number component. | -| `commit` | **Yes** | `abcdef` | Commit identifier. | +| Name | Required | Default | Example | Description | +|------|----------|---------|---------|-------------| +| `minimum_supported_lv_version` | **Yes** | - | `2025` | LabVIEW version year to use. | +| `supported_bitness` | **Yes** | - | `32` or `64` | Target LabVIEW bitness. | +| `project_path` | **Yes** | - | `lv_icon_editor.lvproj` | Path to the LabVIEW project file. | +| `target_name` | No | `""` | `My Computer` | Target containing the build spec. Defaults to "My Computer" in helper VI. | +| `build_spec_name` | No | `""` | `Editor Packed Library` | Build spec name. If empty, builds all specs. | +| `major` | No | `-1` | `1` | Major version component. If < 0, version setting is skipped. | +| `minor` | No | `-1` | `0` | Minor version component. If < 0, version setting is skipped. | +| `patch` | No | `-1` | `0` | Patch version component. If < 0, version setting is skipped. | +| `build` | No | `-1` | `1` | Build number component. If < 0, version setting is skipped. | +| `commit` | No | `""` | `abcdef` | Commit identifier. | ## Quick-start @@ -88,9 +88,9 @@ jobs: path: builds/*.lvlibp ``` -## Build All Specifications +## Build All Specifications with Version Override -Leave `build_spec_name` empty to build all build specifications under the target: +Leave `build_spec_name` empty and provide version to set the same version on all build specs: ```yaml - uses: ./.github/actions/build-lvlibp-win32 @@ -99,7 +99,6 @@ Leave `build_spec_name` empty to build all build specifications under the target supported_bitness: 32 project_path: lv_icon_editor.lvproj target_name: My Computer - build_spec_name: '' major: 1 minor: 0 patch: 0 @@ -107,10 +106,35 @@ Leave `build_spec_name` empty to build all build specifications under the target commit: ${{ github.sha }} ``` +## Skip Version setting + +Omit version parameters to use versions to skip setting versions in build specifications: + +```yaml +- uses: ./.github/actions/build-lvlibp-win32 + with: + minimum_supported_lv_version: 2025 + supported_bitness: 32 + project_path: lv_icon_editor.lvproj + build_spec_name: Editor Packed Library +``` + +## Version Behavior + +- **All version components provided** (`major`, `minor`, `patch`, `build` all β‰₯ 0): + - Helper VI is called to set the version + - If `build_spec_name` is provided: version is set on that build spec only + - If `build_spec_name` is omitted: version is set on **all** build specs in the project + +- **Any version component omitted** (< 0 or not provided): + - Version setting is skipped + - Build specifications use their own version settings from the project file + ## Requirements - LabVIEW must be installed on the runner (use `setup-labview` action) - LabVIEWCLI must be available in the PATH +- Helper VI must exist at `scripts/build-lvlibp-helpers/SetBuildVersionCaller.vi` - Windows runner (Windows Server 2019, 2022, or Windows 10/11) ## Platform Notes diff --git a/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 b/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 deleted file mode 100644 index df96912a..00000000 --- a/scripts/build-lvlibp-docker/BuildLvlibpDocker.ps1 +++ /dev/null @@ -1,195 +0,0 @@ -<# -.SYNOPSIS - Builds the LabVIEW Packed Project Library (.lvlibp) using LabVIEW Docker container. - -.DESCRIPTION - Executes LabVIEW build specification through g-cli inside a Docker container, - embedding the provided version information and commit identifier. - -.PARAMETER MinimumSupportedLVVersion - LabVIEW version used for the build (e.g., "2021", "2023"). - -.PARAMETER SupportedBitness - Bitness of the LabVIEW environment ("32" or "64"). - -.PARAMETER TargetName - Target that contains the build specification. - -.PARAMETER ProjectPath - Path to the LabVIEW project .lvproj file that contains the build specification. - -.PARAMETER BuildSpec - Name of the LabVIEW build specification to execute. If empty, execute all build specifications in the target. - -.PARAMETER Major - Major version component for the PPL. - -.PARAMETER Minor - Minor version component for the PPL. - -.PARAMETER Patch - Patch version component for the PPL. - -.PARAMETER Build - Build number component for the PPL. - -.PARAMETER Commit - Commit hash or identifier recorded in the build. - -.PARAMETER DockerImage - Docker image name (e.g., "nationalinstruments/labview"). - -.PARAMETER ImageTag - Docker image tag. Defaults to MinimumSupportedLVVersion if not specified. - -.EXAMPLE - .\BuildLvlibpDocker.ps1 -MinimumSupportedLVVersion "2026q1-linux" -SupportedBitness "64" -RelativePath "." -BuildSpec "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" -DockerImage "nationalinstruments/labview" - -.NOTES - [REQ-039] Build LabVIEW Packed Project Library using Docker container -#> - -[CmdletBinding()] -param( - [Parameter(Mandatory = $true)] - [string]$MinimumSupportedLVVersion, - - [Parameter(Mandatory = $true)] - [string]$SupportedBitness, - - [Parameter(Mandatory = $true)] - [string]$RelativePath, - - [Parameter(Mandatory = $true)] - [string]$BuildSpecName, - - [Parameter(Mandatory = $true)] - [int]$Major, - - [Parameter(Mandatory = $true)] - [int]$Minor, - - [Parameter(Mandatory = $true)] - [int]$Patch, - - [Parameter(Mandatory = $true)] - [int]$Build, - - [Parameter(Mandatory = $true)] - [string]$Commit, - - [Parameter(Mandatory = $false)] - [string]$DockerImage = "nationalinstruments/labview", - - [Parameter(Mandatory = $false)] - [string]$ImageTag = "2026q1-linux" -) - -Set-StrictMode -Version Latest -$ErrorActionPreference = 'Stop' - -try { - Write-Verbose "Building PPL with Docker container" - Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue - Write-Information "Commit: $Commit" -InformationAction Continue - - $fullImage = "${DockerImage}:${ImageTag}" - Write-Information "Docker Image: $fullImage" -InformationAction Continue - - # Pull Docker image - Write-Information "Pulling Docker image..." -InformationAction Continue - docker pull $fullImage - if ($LASTEXITCODE -ne 0) { - throw "Failed to pull Docker image (exit code: $LASTEXITCODE)" - } - - $labviewPath = if ($IsWindows) { - if ($SupportedBitness -eq '32') { - "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" - } else { - "C:\Program Files\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" - } - } else { - "/usr/local/natinst/LabVIEW-${MinimumSupportedLVVersion}-${SupportedBitness}/labview" - } - - Write-Verbose "LabVIEWPath: $labviewPath" - - # Determine volume mount syntax based on OS - $workspaceMount = if ($IsWindows) { - "${PWD}:C:\workspace" - } else { - "${PWD}:/workspace" - } - - $containerWorkDir = if ($IsWindows) { - "C:\workspace" - } else { - "/workspace" - } - - $containerProjectPath = if ($IsWindows) { - "C:\workspace\$ProjectPath" - } else { - "/workspace/$ProjectPath" - } - - $cliArgs = @( - "-OperationName ExecuteBuildSpec" - "-LabVIEWPath `"$labviewPath`"" - "-ProjectPath `"$containerProjectPath`"" - "-TargetName `"$TargetName`"" - ) - - if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { - $cliArgs += "-BuildSpecName `"$BuildSpecName`"" - } - $cliArgs += "-Version `"$Major.$Minor.$Patch.$Build`"" - - # Construct LabVIEWCLI command - $labviewCLICommand = "LabVIEWCLI $($cliArgs -join ' ')" - - Write-Information "Executing LabVIEWCLI in Docker container..." -InformationAction Continue - Write-Verbose "Command: $labviewCLICommand" - - # Run build in container - docker run --rm ` - -v $workspaceMount ` - -w $containerWorkDir ` - $fullImage ` - bash -c $labviewCLICommand - - $buildExitCode = $LASTEXITCODE - Write-Information "Build exit code: $buildExitCode" -InformationAction Continue - - if ($buildExitCode -ne 0) { - throw "Build failed with exit code $buildExitCode" - } - - # Rename PPL with version and commit metadata - Write-Information "Renaming PPL artifact..." -InformationAction Continue - Write-Information "Renaming PPL artifact..." -InformationAction Continue - $shortCommit = if ($Commit.Length -ge 7) { $Commit.Substring(0, 7) } else { $Commit } - $bitnessTag = if ($SupportedBitness -eq '32') { 'x86' } else { 'x64' } - $versionTag = "v$Major.$Minor.$Patch.$Build+g$shortCommit" - - $buildOutputs = Get-ChildItem -Path . -Filter "*.lvlibp" -Recurse | Where-Object { $_.Directory.Name -eq 'builds' } - - if ($buildOutputs) { - foreach ($ppl in $buildOutputs) { - $baseName = [System.IO.Path]::GetFileNameWithoutExtension($ppl.Name) - $newName = "${baseName}_${bitnessTag}_$versionTag.lvlibp" - Rename-Item -Path $ppl.FullName -NewName $newName - Write-Information "Renamed LVLIBP to '$newName'" -InformationAction Continue - } - } else { - Write-Warning "No .lvlibp files found in builds directory." - } - - Write-Information "Build succeeded" -InformationAction Continue - exit 0 -} -catch { - Write-Error "BuildLvlibpDocker failed: $_" - exit 1 -} \ No newline at end of file diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index 81c01b54..a937ef6f 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -3,8 +3,7 @@ Builds the LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. .DESCRIPTION - Executes LabVIEW build specification through LabVIEWCLI on a Windows GitHub-hosted runner, - embedding the provided version information and commit identifier. + Executes LabVIEW build specification through LabVIEWCLI on a Windows GitHub-hosted runner. .PARAMETER MinimumSupportedLVVersion LabVIEW version year used for the build (e.g., "2021", "2023", "2026"). @@ -16,28 +15,28 @@ Path to the LabVIEW project .lvproj file that contains the build specification. .PARAMETER TargetName - Target that contains the build specification. + Target that contains the build specification. Defaults to "My Computer". .PARAMETER BuildSpecName Name of the LabVIEW build specification to execute. If empty, builds all specifications in the target. .PARAMETER Major - Major version component for the PPL. + Major version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Minor - Minor version component for the PPL. + Minor version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Patch - Patch version component for the PPL. + Patch version component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Build - Build number component for the PPL. + Build number component for the PPL. Optional - if not provided, version setting is skipped. .PARAMETER Commit Commit hash or identifier recorded in the build. .EXAMPLE - .\BuildLvlibpWin32.ps1 -MinimumSupportedLVVersion "2026" -SupportedBitness "64" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" + .\BuildLvlibpWin32.ps1 -MinimumSupportedLVVersion "2025" -SupportedBitness "32" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" .NOTES [REQ-041] Build LabVIEW Packed Project Library using Windows GitHub-hosted runner @@ -54,26 +53,26 @@ param( [Parameter(Mandatory = $true)] [string]$ProjectPath, - [Parameter(Mandatory = $true)] - [string]$TargetName, + [Parameter(Mandatory = $false)] + [string]$TargetName = "", [Parameter(Mandatory = $false)] [string]$BuildSpecName = "", - [Parameter(Mandatory = $true)] - [int]$Major, + [Parameter(Mandatory = $false)] + [int]$Major = -1, - [Parameter(Mandatory = $true)] - [int]$Minor, + [Parameter(Mandatory = $false)] + [int]$Minor = -1, - [Parameter(Mandatory = $true)] - [int]$Patch, + [Parameter(Mandatory = $false)] + [int]$Patch = -1, - [Parameter(Mandatory = $true)] - [int]$Build, + [Parameter(Mandatory = $false)] + [int]$Build = -1, - [Parameter(Mandatory = $true)] - [string]$Commit + [Parameter(Mandatory = $false)] + [string]$Commit = "" ) Set-StrictMode -Version Latest @@ -81,7 +80,15 @@ $ErrorActionPreference = 'Stop' try { Write-Verbose "Building PPL with Windows GitHub-hosted runner" - Write-Information "PPL Version: $Major.$Minor.$Patch.$Build" -InformationAction Continue + $hasVersion = ($Major -ge 0) -and ($Minor -ge 0) -and ($Patch -ge 0) -and ($Build -ge 0) + + if ($hasVersion) { + $versionString = "$Major.$Minor.$Patch.$Build" + Write-Information "PPL Version: $versionString" -InformationAction Continue + } else { + Write-Information "PPL Version setting skipped." -InformationAction Continue + } + Write-Information "Commit: $Commit" -InformationAction Continue # Construct LabVIEWPath for Windows @@ -94,23 +101,65 @@ try { Write-Verbose "LabVIEWPath: $labviewPath" Write-Information "Project: $ProjectPath" -InformationAction Continue - Write-Information "Target: $TargetName" -InformationAction Continue + Write-Information "Target: $(if ($TargetName) { $TargetName } else { '' })" -InformationAction Continue Write-Information "Build Spec: $(if ($BuildSpecName) { $BuildSpecName } else { '' })" -InformationAction Continue - # Verify project file exists if (-not (Test-Path $ProjectPath)) { throw "Project file not found: $ProjectPath" } + # Only set build version if BuildSpecName is provided + if ($hasVersion) { + Write-Information "Setting build version to: $versionString..." -InformationAction Continue + $helperVI = Join-Path $PSScriptRoot '..' 'build-lvlibp-helpers' 'SetBuildVersionCaller.vi' + + if (-not (Test-Path $helperVI)) { + throw "Helper VI not found at: $helperVI" + } + + # SetBuildVersionCaller.vi expects positional arguments: + # 1. ProjectPath (required) + # 2. BuildSpecName (empty string to apply to all) + # 3. TargetName (empty string to use VI default) + # 4. Version (required when setting version) + + Write-Information "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$labviewPath`" -VIPath `"$helperVI`" `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$versionString`"" -InformationAction Continue + + $setVersionArgs = @( + '-OperationName', 'RunVI' + '-LabVIEWPath', $labviewPath + '-VIPath', (Resolve-Path $helperVI).Path + (Resolve-Path $ProjectPath).Path + $BuildSpecName + $TargetName + $versionString + '-Headless' + ) + + & $labviewCLI @setVersionArgs + $setVersionExit = $LASTEXITCODE + + if ($setVersionExit -ne 0) { + throw "Failed to set build version (exit code: $setVersionExit)" + } + + Write-Information "Build version set successfully" -InformationAction Continue + } else { + Write-Information "Skipping version set " -InformationAction Continue + } + # Construct LabVIEWCLI command $cliArgs = @( '-OperationName', 'ExecuteBuildSpec' '-LabVIEWPath', $labviewPath '-ProjectPath', (Resolve-Path $ProjectPath).Path - '-TargetName', $TargetName ) - if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { + if ($TargetName) { + $cliArgs += '-TargetName', $TargetName + } + + if ($BuildSpecName) { $cliArgs += '-BuildSpecName', $BuildSpecName } diff --git a/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 deleted file mode 100644 index e2e63af7..00000000 --- a/tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1 +++ /dev/null @@ -1,72 +0,0 @@ -#requires -Version 7.0 -Set-StrictMode -Version Latest -$ErrorActionPreference = 'Stop' - -Describe 'BuildLvlibpDocker.Workflow' { - $meta = @{ - requirement = 'REQ-039' - Owner = 'NI' - Evidence = 'tests/pester/BuildLvlibpDocker.Workflow.Tests.ps1' - } - - BeforeAll { - $repoRoot = (Resolve-Path (Join-Path $PSScriptRoot '..' '..')).Path - Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force - } - - It 'validates build-lvlibp-docker action exists in dispatcher registry [REQ-039]' -Tag 'REQ-039' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $dispatchers.'build-lvlibp-docker' | Should -Not -BeNullOrEmpty - $dispatchers.'build-lvlibp-docker'.function | Should -Be 'Invoke-BuildLvlibpDocker' - } - - It 'validates required parameters are defined [REQ-039]' -Tag 'REQ-039' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-docker' - $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty - $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty - $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty - $action.parameters.TargetName | Should -Not -BeNullOrEmpty - $action.parameters.Major | Should -Not -BeNullOrEmpty - $action.parameters.Minor | Should -Not -BeNullOrEmpty - $action.parameters.Patch | Should -Not -BeNullOrEmpty - $action.parameters.Build | Should -Not -BeNullOrEmpty - $action.parameters.Commit | Should -Not -BeNullOrEmpty - } - - It 'executes dry-run without errors [REQ-039]' -Tag 'REQ-039' { - $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-docker' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` - -DryRun - - $LASTEXITCODE | Should -Be 0 - } - - It 'validates module function throws when required parameters are missing [REQ-039]' -Tag 'REQ-039' { - { Invoke-BuildLvlibpDocker } | Should -Throw - } - - It 'accepts optional parameters in dry-run [REQ-039]' -Tag 'REQ-039' { - $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-docker' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` - -DryRun - - $LASTEXITCODE | Should -Be 0 - } - - It 'validates action.yml exists [REQ-039]' -Tag 'REQ-039' { - $actionPath = Join-Path $repoRoot 'build-lvlibp-docker' 'action.yml' - Test-Path $actionPath | Should -Be $true - } - - It 'validates implementation script exists [REQ-039]' -Tag 'REQ-039' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker' 'BuildLvlibpDocker.ps1' - Test-Path $scriptPath | Should -Be $true - } -} \ No newline at end of file diff --git a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 index 92647858..e4166c42 100644 --- a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 @@ -30,7 +30,15 @@ Describe 'BuildLvlibpWin32.Workflow' { $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + } + + It 'validates optional parameters are defined [REQ-041]' -Tag 'REQ-041' { + $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' + $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json + + $action = $dispatchers.'build-lvlibp-win32' $action.parameters.TargetName | Should -Not -BeNullOrEmpty + $action.parameters.BuildSpecName | Should -Not -BeNullOrEmpty $action.parameters.Major | Should -Not -BeNullOrEmpty $action.parameters.Minor | Should -Not -BeNullOrEmpty $action.parameters.Patch | Should -Not -BeNullOrEmpty @@ -49,6 +57,18 @@ Describe 'BuildLvlibpWin32.Workflow' { It 'validates module function throws when required parameters are missing [REQ-041]' -Tag 'REQ-041' { { Invoke-BuildLvlibpWin32 } | Should -Throw + { Invoke-BuildLvlibpWin32 -MinimumSupportedLVVersion '2026' } | Should -Throw + { Invoke-BuildLvlibpWin32 -MinimumSupportedLVVersion '2026' -SupportedBitness '64' } | Should -Throw + } + + It 'validates module function accepts minimal required parameters [REQ-041]' -Tag 'REQ-041' { + { + Invoke-BuildLvlibpWin32 ` + -MinimumSupportedLVVersion '2026' ` + -SupportedBitness '64' ` + -ProjectPath 'test.lvproj' ` + -DryRun + } | Should -Not -Throw } It 'accepts optional parameters in dry-run [REQ-041]' -Tag 'REQ-041' { From ff63ede235abb8adc3a8f2ce846385ca02002254 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 13:54:14 +0530 Subject: [PATCH 39/49] Added line for debugging [REQ-040] --- scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index 973dbe3d..a359d9fd 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -62,7 +62,7 @@ if ($Version) { '-Headless' ) - Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$Version`" -Headless" + Write-Host "Executing: LabVIEWCLI $($setVersionArgs -join ' ')" & LabVIEWCLI @setVersionArgs $setVersionExit = $LASTEXITCODE From db41218dc18d8d56b6616fb35f2fb1dfa20e6ad6 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 14:38:34 +0530 Subject: [PATCH 40/49] Explicitly pass empty string [REQ-040] --- .../build-lvlibp.ps1 | 27 +++++++------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index a359d9fd..cfcf88f7 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -46,24 +46,15 @@ if ($Version) { throw "Helper VI not found at: $helperVI" } - # SetBuildVersionCaller.vi expects positional arguments: - # 1. ProjectPath (required) - # 2. BuildSpecName (optional, empty string to apply to all) - # 3. TargetName (optional, defaults to "My Computer" in VI) - # 4. Version (optional, empty string to skip version setting) - $setVersionArgs = @( - '-OperationName', 'RunVI' - '-LabVIEWPath', $LabVIEWPath - '-VIPath', $helperVI - $ProjectPath - $BuildSpecName - $TargetName - $Version - '-Headless' - ) - - Write-Host "Executing: LabVIEWCLI $($setVersionArgs -join ' ')" - & LabVIEWCLI @setVersionArgs + # Format arguments for logging - show "" only for empty strings + $projectDisplay = if ($ProjectPath) { $ProjectPath } else { '""' } + $buildSpecDisplay = if ($BuildSpecName) { $BuildSpecName } else { '""' } + $targetDisplay = if ($TargetName) { $TargetName } else { '""' } + $versionDisplay = if ($Version) { $Version } else { '""' } + + Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" $projectDisplay $buildSpecDisplay $targetDisplay $versionDisplay -Headless" + + & LabVIEWCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $ProjectPath $BuildSpecName $TargetName $Version -Headless $setVersionExit = $LASTEXITCODE if ($setVersionExit -ne 0) { From 13aaf71de1e0b03e08c2d0f5cf4be342d9ea7991 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 15:19:18 +0530 Subject: [PATCH 41/49] Explicitly pass empty string [REQ-040] --- scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 index cfcf88f7..e055be9b 100644 --- a/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 +++ b/scripts/build-lvlibp-docker-windows/build-lvlibp.ps1 @@ -47,14 +47,14 @@ if ($Version) { } # Format arguments for logging - show "" only for empty strings - $projectDisplay = if ($ProjectPath) { $ProjectPath } else { '""' } - $buildSpecDisplay = if ($BuildSpecName) { $BuildSpecName } else { '""' } - $targetDisplay = if ($TargetName) { $TargetName } else { '""' } - $versionDisplay = if ($Version) { $Version } else { '""' } + $projectArg = if ($ProjectPath) { $ProjectPath } else { '""' } + $buildSpecArg = if ($BuildSpecName) { $BuildSpecName } else { '""' } + $targetArg = if ($TargetName) { $TargetName } else { '""' } + $versionArg = if ($Version) { $Version } else { '""' } - Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" $projectDisplay $buildSpecDisplay $targetDisplay $versionDisplay -Headless" + Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$projectArg`" `"$buildSpecArg`" `"$targetArg`" `"$versionArg`" -Headless" - & LabVIEWCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $ProjectPath $BuildSpecName $TargetName $Version -Headless + & LabVIEWCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $projectArg $buildSpecArg $targetArg $versionArg -Headless $setVersionExit = $LASTEXITCODE if ($setVersionExit -ne 0) { From 31a285f523a628e65f2250cda840e6e2d19c580a Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 15:54:44 +0530 Subject: [PATCH 42/49] Explicitly pass empty string [REQ-041] --- ci_evidence.txt | 2 +- .../build-lvlibp-win32/BuildLvlibpWin32.ps1 | 29 +++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/ci_evidence.txt b/ci_evidence.txt index 66933ff2..8fa3f4c7 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"a4e23b2793f3f6c2e96ce16600059a4587a46d9c","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"13aaf71de1e0b03e08c2d0f5cf4be342d9ea7991","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index a937ef6f..0c6aaa7f 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -108,7 +108,7 @@ try { throw "Project file not found: $ProjectPath" } - # Only set build version if BuildSpecName is provided + # Only set build version if Version is provided if ($hasVersion) { Write-Information "Setting build version to: $versionString..." -InformationAction Continue $helperVI = Join-Path $PSScriptRoot '..' 'build-lvlibp-helpers' 'SetBuildVersionCaller.vi' @@ -122,23 +122,16 @@ try { # 2. BuildSpecName (empty string to apply to all) # 3. TargetName (empty string to use VI default) # 4. Version (required when setting version) + $projectArg = if ($ProjectPath) { $ProjectPath } else { '""' } + $buildSpecArg = if ($BuildSpecName) { $BuildSpecName } else { '""' } + $targetArg = if ($TargetName) { $TargetName } else { '""' } + $versionArg = if ($Version) { $Version } else { '""' } - Write-Information "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$labviewPath`" -VIPath `"$helperVI`" `"$ProjectPath`" `"$BuildSpecName`" `"$TargetName`" `"$versionString`"" -InformationAction Continue - - $setVersionArgs = @( - '-OperationName', 'RunVI' - '-LabVIEWPath', $labviewPath - '-VIPath', (Resolve-Path $helperVI).Path - (Resolve-Path $ProjectPath).Path - $BuildSpecName - $TargetName - $versionString - '-Headless' - ) - - & $labviewCLI @setVersionArgs - $setVersionExit = $LASTEXITCODE + Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$projectArg`" `"$buildSpecArg`" `"$targetArg`" `"$versionArg`" -Headless" + & LabVIEWCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $projectArg $buildSpecArg $targetArg $versionArg -Headless + $setVersionExit = $LASTEXITCODE + if ($setVersionExit -ne 0) { throw "Failed to set build version (exit code: $setVersionExit)" } @@ -155,11 +148,11 @@ try { '-ProjectPath', (Resolve-Path $ProjectPath).Path ) - if ($TargetName) { + if (-not [string]::IsNullOrWhiteSpace($TargetName)) { $cliArgs += '-TargetName', $TargetName } - if ($BuildSpecName) { + if (-not [string]::IsNullOrWhiteSpace($BuildSpecName)) { $cliArgs += '-BuildSpecName', $BuildSpecName } From 97225470866de325c3a59130d21431c9d10b870a Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 17:00:42 +0530 Subject: [PATCH 43/49] Corrected variable name [REQ-041] --- scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index 0c6aaa7f..12598c01 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -125,7 +125,7 @@ try { $projectArg = if ($ProjectPath) { $ProjectPath } else { '""' } $buildSpecArg = if ($BuildSpecName) { $BuildSpecName } else { '""' } $targetArg = if ($TargetName) { $TargetName } else { '""' } - $versionArg = if ($Version) { $Version } else { '""' } + $versionArg = if ($versionString) { $versionString } else { '""' } Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$projectArg`" `"$buildSpecArg`" `"$targetArg`" `"$versionArg`" -Headless" From 45e5e850300fd63865090219123f438517f500be Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 17:25:44 +0530 Subject: [PATCH 44/49] Corrected version setting command [REQ-041] --- scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index 12598c01..88dda550 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -129,7 +129,7 @@ try { Write-Host "Executing: LabVIEWCLI -OperationName RunVI -LabVIEWPath `"$LabVIEWPath`" -VIPath `"$helperVI`" `"$projectArg`" `"$buildSpecArg`" `"$targetArg`" `"$versionArg`" -Headless" - & LabVIEWCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $projectArg $buildSpecArg $targetArg $versionArg -Headless + & $labviewCLI -OperationName RunVI -LabVIEWPath $LabVIEWPath -VIPath $helperVI $projectArg $buildSpecArg $targetArg $versionArg -Headless $setVersionExit = $LASTEXITCODE if ($setVersionExit -ne 0) { From 991a6c8b16eec9f3c036925c8b11e74b4ba5a828 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Thu, 12 Mar 2026 18:09:07 +0530 Subject: [PATCH 45/49] Resolve project path [REQ-041] --- scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 index 88dda550..720fb581 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 @@ -122,7 +122,7 @@ try { # 2. BuildSpecName (empty string to apply to all) # 3. TargetName (empty string to use VI default) # 4. Version (required when setting version) - $projectArg = if ($ProjectPath) { $ProjectPath } else { '""' } + $projectArg = (Resolve-Path $ProjectPath).Path $buildSpecArg = if ($BuildSpecName) { $BuildSpecName } else { '""' } $targetArg = if ($TargetName) { $TargetName } else { '""' } $versionArg = if ($versionString) { $versionString } else { '""' } From 4ffb58fe8a8af92a37dfe34108137cff9edd1e28 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 16 Mar 2026 15:07:57 +0530 Subject: [PATCH 46/49] Updated Pester tests for BuildLvlibp actions [REQ-039][REQ-040][REQ-041] --- artifacts/linux/action-docs.json | 37 -------- artifacts/linux/action-docs.md | 9 -- ci_evidence.txt | 2 +- docs/requirements.md | 8 ++ .../BuildLvlibpDockerLinux.Workflow.Tests.ps1 | 53 +++-------- ...uildLvlibpDockerWindows.Workflow.Tests.ps1 | 94 ++----------------- .../BuildLvlibpWin32.Workflow.Tests.ps1 | 68 ++------------ 7 files changed, 43 insertions(+), 228 deletions(-) diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index fa884521..201d97b6 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -1037,43 +1037,6 @@ } }, "wrappers": { - "activate-labview": [ - { - "name": "serial_number", - "description": "LabVIEW serial number for activation.", - "required": true, - "default": "", - "type": "string" - }, - { - "name": "package_id", - "description": "LabVIEW package ID to activate.", - "required": false, - "default": "LabVIEW_COM_PKG 25.0300", - "type": "string" - }, - { - "name": "working_directory", - "description": "Working directory where the action will run.", - "required": false, - "default": "", - "type": "string" - }, - { - "name": "log_level", - "description": "Verbosity level (ERROR|WARN|INFO|DEBUG).", - "required": false, - "default": "INFO", - "type": "string" - }, - { - "name": "dry_run", - "description": "If true, simulate the action without side effects.", - "required": false, - "default": false, - "type": "string" - } - ], "add-token-to-labview": [ { "name": "minimum_supported_lv_version", diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 0d292815..5ceff7bf 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -413,15 +413,6 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' ### Wrapper Actions -#### activate-labview -| Name | Type | Required | Default | Description | -| --- | --- | --- | --- | --- | -| serial_number | string | true | | LabVIEW serial number for activation. | -| package_id | string | false | LabVIEW_COM_PKG 25.0300 | LabVIEW package ID to activate. | -| working_directory | string | false | | Working directory where the action will run. | -| log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | -| dry_run | string | false | false | If true, simulate the action without side effects. | - #### add-token-to-labview | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | diff --git a/ci_evidence.txt b/ci_evidence.txt index 8fa3f4c7..739e4bb1 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"13aaf71de1e0b03e08c2d0f5cf4be342d9ea7991","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"be0d1d4b8e3f8cca3941e8cb69eb99c8fd966d51","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/docs/requirements.md b/docs/requirements.md index db560cd8..7b5abbed 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -40,6 +40,14 @@ Runner Type indicates whether a requirement runs on a standard GitHub-hosted ima | REQ-031 | Parsing logic validates presence of required fields and reports missing or malformed data. | `scripts/__tests__/junit-parser.test.js` | | | | | REQ-032 | Parser tolerates and retains unknown attributes for future extensibility. | `scripts/__tests__/junit-parser.test.js` | | | | | REQ-033 | Tests ending with SelfHosted.Workflow.Tests.ps1 execute only in dry run mode unless the workflow targets a self-hosted Windows runner labeled self-hosted-windows-lv. | `tests/pester/SelfHosted.Workflow.Tests.ps1` | | | | +| REQ-034 | Workflow tests the composite action defined in via-lv-docker/action.yml on the GitHub-hosted Ubuntu runner labeled ubuntu-latest. | `tests/pester/ViaLvDocker.Workflow.ps1` | ubuntu-latest | integration | false | +| REQ-035 | Setup NI Package Manager (NIPM) and configure it for CI/CD environments by installing the package manager and disabling package caching. | `tests/pester/SetupNipm.Workflow.Tests.ps1` | | | | +| REQ-036 | Download, install, and activate LabVIEW Community Edition from an ISO image, handling installation timeouts and cleanup. | `tests/pester/SetupLabview.Workflow.Tests.ps1` | | | | +| REQ-037 | Configure LabVIEW settings by updating LabVIEW.ini to enable TCP/IP server and VI scripting operations. | `tests/pester/ConfigureLabview.Workflow.Tests.ps1` | | | | +| REQ-038 | Install VI Package Manager (VIPM) and LUnit CLI package for LabVIEW automation testing. | `tests/pester/SetupLunit.Workflow.Tests.ps1` | | | | +| REQ-039 | Build LabVIEW Packed Project Library (.lvlibp) using Linux LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata. | `tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1` | | | | +| REQ-040 | Build LabVIEW Packed Project Library (.lvlibp) using Windows LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata. | `tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1` | | | | +| REQ-041 | Build LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner with locally installed LabVIEW. | `tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1` | | | | | REQIE-001 | After checking out the LabVIEW icon editor repository, PreSequence: The sequencer shall enumerate and record the build matrix used by the workflow (LabVIEW versions and bitness). Acceptance: a 'matrix.json' file exists listing each tuple {"lv-version": "2021"\|"2023", "bitness": "32"\|"64"} with at least [ ["2021","32"], ["2021","64"], ["2023","64"] ]. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.PreSequence.matrix-enumeration.ps1` | self-hosted-windows-lv | integration | true | | REQIE-002 | After checking out the LabVIEW icon editor repository, Setup: For each matrix entry, the sequencer shall apply [VIPC](glossary.md#vipc) dependencies using the canonical action inputs (minimum_supported_lv_version, vip_lv_version, supported_bitness, relative_path). Evidence: a 'vipc-apply.json' summary per matrix entry capturing inputs, start/end timestamps, exit code, and status. Acceptance: all entries report exit_code == 0 and status == 'success'. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.Setup.apply-vipc-succeeds.ps1` | self-hosted-windows-lv | integration | true | | REQIE-003 | After checking out the LabVIEW icon editor repository, Setup: The sequencer shall compute and persist semantic version information. Evidence: a 'version.json' containing VERSION, MAJOR, MINOR, PATCH, BUILD, IS_PRERELEASE and the commit SHA used. Acceptance: VERSION conforms to SemVer and all numeric components are present. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.Setup.version-outputs-captured.ps1` | self-hosted-windows-lv | integration | true | diff --git a/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 index b4ef4c97..8d3bb56a 100644 --- a/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1 @@ -14,59 +14,36 @@ Describe 'BuildLvlibpDockerLinux.Workflow' { Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force } - It 'validates build-lvlibp-docker-linux action exists in dispatcher registry [REQ-039]' -Tag 'REQ-039' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $dispatchers.'build-lvlibp-docker-linux' | Should -Not -BeNullOrEmpty - $dispatchers.'build-lvlibp-docker-linux'.function | Should -Be 'Invoke-BuildLvlibpDockerLinux' + It 'validates action.yml exists [REQ-039]' -Tag 'REQ-039' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-linux' 'action.yml' + Test-Path $actionPath | Should -Be $true } - It 'validates required parameters are defined [REQ-039]' -Tag 'REQ-039' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-docker-linux' - $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty - $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty - $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty - $action.parameters.TargetName | Should -Not -BeNullOrEmpty - $action.parameters.Major | Should -Not -BeNullOrEmpty - $action.parameters.Minor | Should -Not -BeNullOrEmpty - $action.parameters.Patch | Should -Not -BeNullOrEmpty - $action.parameters.Build | Should -Not -BeNullOrEmpty - $action.parameters.Commit | Should -Not -BeNullOrEmpty + It 'validates implementation script exists [REQ-039]' -Tag 'REQ-039' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-linux' 'BuildLvlibpDockerLinux.ps1' + Test-Path $scriptPath | Should -Be $true + } + + It 'validates inner build script exists [REQ-039]' -Tag 'REQ-039' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-linux' 'build-lvlibp.sh' + Test-Path $scriptPath | Should -Be $true } - It 'executes dry-run without errors [REQ-039]' -Tag 'REQ-039' { + It 'executes dry-run with only required parameters [REQ-039]' -Tag 'REQ-039' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` -ActionName 'build-lvlibp-docker-linux' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj"}' ` -DryRun $LASTEXITCODE | Should -Be 0 } - It 'validates module function throws when required parameters are missing [REQ-039]' -Tag 'REQ-039' { - { Invoke-BuildLvlibpDockerLinux } | Should -Throw - } - - It 'accepts optional parameters in dry-run [REQ-039]' -Tag 'REQ-039' { + It 'executes dry-run with all parameters [REQ-039]' -Tag 'REQ-039' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` -ActionName 'build-lvlibp-docker-linux' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234","DockerImage":"nationalinstruments/labview","ImageTag":"2026q1-linux"}' ` -DryRun $LASTEXITCODE | Should -Be 0 } - - It 'validates action.yml exists [REQ-039]' -Tag 'REQ-039' { - $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-linux' 'action.yml' - Test-Path $actionPath | Should -Be $true - } - - It 'validates implementation script exists [REQ-039]' -Tag 'REQ-039' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-linux' 'BuildLvlibpDockerLinux.ps1' - Test-Path $scriptPath | Should -Be $true - } } \ No newline at end of file diff --git a/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 index e4dc4767..3e582c3d 100644 --- a/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1 @@ -14,40 +14,19 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force } - It 'validates build-lvlibp-docker-windows action exists in dispatcher registry [REQ-040]' -Tag 'REQ-040' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $dispatchers.'build-lvlibp-docker-windows' | Should -Not -BeNullOrEmpty - $dispatchers.'build-lvlibp-docker-windows'.function | Should -Be 'Invoke-BuildLvlibpDockerWindows' + It 'validates action.yml exists [REQ-040]' -Tag 'REQ-040' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-windows' 'action.yml' + Test-Path $actionPath | Should -Be $true } - It 'validates required parameters are defined [REQ-040]' -Tag 'REQ-040' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-docker-windows' - # Only 3 parameters are required - $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty - $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty - $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + It 'validates implementation script exists [REQ-040]' -Tag 'REQ-040' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'BuildLvlibpDockerWindows.ps1' + Test-Path $scriptPath | Should -Be $true } - It 'validates optional parameters are defined [REQ-040]' -Tag 'REQ-040' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-docker-windows' - # Optional parameters - $action.parameters.TargetName | Should -Not -BeNullOrEmpty - $action.parameters.BuildSpecName | Should -Not -BeNullOrEmpty - $action.parameters.Major | Should -Not -BeNullOrEmpty - $action.parameters.Minor | Should -Not -BeNullOrEmpty - $action.parameters.Patch | Should -Not -BeNullOrEmpty - $action.parameters.Build | Should -Not -BeNullOrEmpty - $action.parameters.Commit | Should -Not -BeNullOrEmpty - $action.parameters.DockerImage | Should -Not -BeNullOrEmpty - $action.parameters.ImageTag | Should -Not -BeNullOrEmpty + It 'validates inner build script exists [REQ-040]' -Tag 'REQ-040' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'build-lvlibp.ps1' + Test-Path $scriptPath | Should -Be $true } It 'executes dry-run with only required parameters [REQ-040]' -Tag 'REQ-040' { @@ -67,59 +46,4 @@ Describe 'BuildLvlibpDockerWindows.Workflow' { $LASTEXITCODE | Should -Be 0 } - - It 'validates module function throws when required parameters are missing [REQ-040]' -Tag 'REQ-040' { - { Invoke-BuildLvlibpDockerWindows } | Should -Throw - { Invoke-BuildLvlibpDockerWindows -MinimumSupportedLVVersion '2026' } | Should -Throw - { Invoke-BuildLvlibpDockerWindows -MinimumSupportedLVVersion '2026' -SupportedBitness '64' } | Should -Throw - } - - It 'validates module function accepts minimal required parameters [REQ-040]' -Tag 'REQ-040' { - { - Invoke-BuildLvlibpDockerWindows ` - -MinimumSupportedLVVersion '2026' ` - -SupportedBitness '64' ` - -ProjectPath 'test.lvproj' ` - -DryRun - } | Should -Not -Throw - } - - It 'accepts optional parameters in dry-run [REQ-040]' -Tag 'REQ-040' { - $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-docker-windows' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678","DockerImage":"custom/labview","ImageTag":"custom-tag"}' ` - -DryRun - - $LASTEXITCODE | Should -Be 0 - } - - It 'accepts partial version parameters in dry-run (should skip version setting) [REQ-040]' -Tag 'REQ-040' { - # Omitting version parameters should skip version setting - $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-docker-windows' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild"}' ` - -DryRun - - $LASTEXITCODE | Should -Be 0 - } - - It 'validates action.yml exists [REQ-040]' -Tag 'REQ-040' { - $actionPath = Join-Path $repoRoot 'build-lvlibp-docker-windows' 'action.yml' - Test-Path $actionPath | Should -Be $true - } - - It 'validates implementation script exists [REQ-040]' -Tag 'REQ-040' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'BuildLvlibpDockerWindows.ps1' - Test-Path $scriptPath | Should -Be $true - } - - It 'validates inner build script exists [REQ-040]' -Tag 'REQ-040' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-docker-windows' 'build-lvlibp.ps1' - Test-Path $scriptPath | Should -Be $true - } - - It 'validates helper VI directory exists [REQ-040]' -Tag 'REQ-040' { - $helperPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-helpers' - Test-Path $helperPath | Should -Be $true - } } \ No newline at end of file diff --git a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 index e4166c42..ac709bee 100644 --- a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 @@ -14,79 +14,31 @@ Describe 'BuildLvlibpWin32.Workflow' { Import-Module (Join-Path $repoRoot 'actions' 'OpenSourceActions.psd1') -Force } - It 'validates build-lvlibp-win32 action exists in dispatcher registry [REQ-041]' -Tag 'REQ-041' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $dispatchers.'build-lvlibp-win32' | Should -Not -BeNullOrEmpty - $dispatchers.'build-lvlibp-win32'.function | Should -Be 'Invoke-BuildLvlibpWin32' - } - - It 'validates required parameters are defined [REQ-041]' -Tag 'REQ-041' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-win32' - $action.parameters.MinimumSupportedLVVersion | Should -Not -BeNullOrEmpty - $action.parameters.SupportedBitness | Should -Not -BeNullOrEmpty - $action.parameters.ProjectPath | Should -Not -BeNullOrEmpty + It 'validates action.yml exists [REQ-041]' -Tag 'REQ-041' { + $actionPath = Join-Path $repoRoot 'build-lvlibp-win32' 'action.yml' + Test-Path $actionPath | Should -Be $true } - It 'validates optional parameters are defined [REQ-041]' -Tag 'REQ-041' { - $dispatchersPath = Join-Path $repoRoot 'dispatchers.json' - $dispatchers = Get-Content $dispatchersPath | ConvertFrom-Json - - $action = $dispatchers.'build-lvlibp-win32' - $action.parameters.TargetName | Should -Not -BeNullOrEmpty - $action.parameters.BuildSpecName | Should -Not -BeNullOrEmpty - $action.parameters.Major | Should -Not -BeNullOrEmpty - $action.parameters.Minor | Should -Not -BeNullOrEmpty - $action.parameters.Patch | Should -Not -BeNullOrEmpty - $action.parameters.Build | Should -Not -BeNullOrEmpty - $action.parameters.Commit | Should -Not -BeNullOrEmpty + It 'validates implementation script exists [REQ-041]' -Tag 'REQ-041' { + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-win32' 'BuildLvlibpWin32.ps1' + Test-Path $scriptPath | Should -Be $true } - It 'executes dry-run without errors [REQ-041]' -Tag 'REQ-041' { + It 'executes dry-run with only required parameters [REQ-041]' -Tag 'REQ-041' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` -ActionName 'build-lvlibp-win32' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj"}' ` -DryRun $LASTEXITCODE | Should -Be 0 } - It 'validates module function throws when required parameters are missing [REQ-041]' -Tag 'REQ-041' { - { Invoke-BuildLvlibpWin32 } | Should -Throw - { Invoke-BuildLvlibpWin32 -MinimumSupportedLVVersion '2026' } | Should -Throw - { Invoke-BuildLvlibpWin32 -MinimumSupportedLVVersion '2026' -SupportedBitness '64' } | Should -Throw - } - - It 'validates module function accepts minimal required parameters [REQ-041]' -Tag 'REQ-041' { - { - Invoke-BuildLvlibpWin32 ` - -MinimumSupportedLVVersion '2026' ` - -SupportedBitness '64' ` - -ProjectPath 'test.lvproj' ` - -DryRun - } | Should -Not -Throw - } - - It 'accepts optional parameters in dry-run [REQ-041]' -Tag 'REQ-041' { + It 'executes dry-run with all parameters [REQ-041]' -Tag 'REQ-041' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` -ActionName 'build-lvlibp-win32' ` - -ArgsJson '{"MinimumSupportedLVVersion":"2021","SupportedBitness":"32","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"","Major":2,"Minor":1,"Patch":0,"Build":5,"Commit":"def5678"}' ` + -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` -DryRun $LASTEXITCODE | Should -Be 0 } - - It 'validates action.yml exists [REQ-041]' -Tag 'REQ-041' { - $actionPath = Join-Path $repoRoot 'build-lvlibp-win32' 'action.yml' - Test-Path $actionPath | Should -Be $true - } - - It 'validates implementation script exists [REQ-041]' -Tag 'REQ-041' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-win32' 'BuildLvlibpWin32.ps1' - Test-Path $scriptPath | Should -Be $true - } } \ No newline at end of file From ca2e2799dc4ab919b029800520cee7124d7a3d7a Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 16 Mar 2026 15:31:42 +0530 Subject: [PATCH 47/49] Fix pester test [REQ-039] --- tests/pester/Dispatcher.DryRun.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/pester/Dispatcher.DryRun.Tests.ps1 b/tests/pester/Dispatcher.DryRun.Tests.ps1 index ac3f8a77..8b0db576 100644 --- a/tests/pester/Dispatcher.DryRun.Tests.ps1 +++ b/tests/pester/Dispatcher.DryRun.Tests.ps1 @@ -33,6 +33,7 @@ Describe 'Unified Dispatcher β€” DryRun behavior for all actions' { LVVersion = '2021' LVBitness = '64' ProjectFile = 'Project.lvproj' + ProjectPath = 'Project.lvproj' Major = 1 Minor = 0 Patch = 0 From f5bc70d955bfbbd19570cb1afbffba8bf4036582 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Tue, 17 Mar 2026 17:31:33 +0530 Subject: [PATCH 48/49] Renamed action to make it more generic [REQ-041] --- actions/Invoke-OSAction.ps1 | 38 +++++++++---------- actions/OpenSourceActions.psd1 | 2 +- actions/OpenSourceActions.psm1 | 6 +-- artifacts/linux/action-docs.json | 4 +- artifacts/linux/action-docs.md | 6 +-- .../action.yml | 6 +-- ci_evidence.txt | 2 +- dispatchers.json | 2 +- docs/actions/build-lvlibp-docker-windows.md | 2 +- ... => build-lvlibp-github-hosted-windows.md} | 12 +++--- docs/actions/index.md | 2 +- docs/index.md | 2 +- docs/requirements.md | 2 +- docs/scripts/build-lvlibp-win32.md | 12 +++--- requirements.json | 2 +- .../BuildLvlibpGithubHostedWindows.ps1} | 11 ++++-- scripts/build-lvlibp-helpers/README.md | 2 +- ...ibpGithubHostedWindows.Workflow.Tests.ps1} | 12 +++--- 18 files changed, 65 insertions(+), 60 deletions(-) rename {build-lvlibp-win32 => build-lvlibp-github-hosted-windows}/action.yml (95%) rename docs/actions/{build-lvlibp-win32.md => build-lvlibp-github-hosted-windows.md} (96%) rename scripts/{build-lvlibp-win32/BuildLvlibpWin32.ps1 => build-lvlibp-github-hosted-windows/BuildLvlibpGithubHostedWindows.ps1} (91%) rename tests/pester/{BuildLvlibpWin32.Workflow.Tests.ps1 => BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1} (77%) diff --git a/actions/Invoke-OSAction.ps1 b/actions/Invoke-OSAction.ps1 index a837936f..388ee1e2 100644 --- a/actions/Invoke-OSAction.ps1 +++ b/actions/Invoke-OSAction.ps1 @@ -20,25 +20,25 @@ Import-Module (Join-Path $PSScriptRoot 'OpenSourceActions.psm1') -Force # Attempt to build registry from generated dispatcher metadata; fall back to # a static map only if loading fails or produces no entries. $FallbackRegistry = [ordered]@{ - 'add-token-to-labview' = 'Invoke-AddTokenToLabVIEW' - 'apply-vipc' = 'Invoke-ApplyVIPC' - 'build' = 'Invoke-Build' - 'build-lvlibp' = 'Invoke-BuildLvlibp' - 'build-lvlibp-docker-linux' = 'Invoke-BuildLvlibpDockerLinux' - 'build-lvlibp-docker-windows' = 'Invoke-BuildLvlibpDockerWindows' - 'build-lvlibp-win32' = 'Invoke-BuildLvlibpWin32' - 'build-vi-package' = 'Invoke-BuildViPackage' - 'close-labview' = 'Invoke-CloseLabVIEW' - 'generate-release-notes' = 'Invoke-GenerateReleaseNotes' - 'missing-in-project' = 'Invoke-MissingInProject' - 'modify-vipb-display-info' = 'Invoke-ModifyVIPBDisplayInfo' - 'prepare-labview-source' = 'Invoke-PrepareLabVIEWSource' - 'rename-file' = 'Invoke-RenameFile' - 'restore-setup-lv-source' = 'Invoke-RestoreSetupLVSource' - 'revert-development-mode' = 'Invoke-RevertDevelopmentMode' - 'run-pester-tests' = 'Invoke-RunPesterTests' - 'run-unit-tests' = 'Invoke-RunUnitTests' - 'set-development-mode' = 'Invoke-SetDevelopmentMode' + 'add-token-to-labview' = 'Invoke-AddTokenToLabVIEW' + 'apply-vipc' = 'Invoke-ApplyVIPC' + 'build' = 'Invoke-Build' + 'build-lvlibp' = 'Invoke-BuildLvlibp' + 'build-lvlibp-docker-linux' = 'Invoke-BuildLvlibpDockerLinux' + 'build-lvlibp-docker-windows' = 'Invoke-BuildLvlibpDockerWindows' + 'build-lvlibp-github-hosted-windows' = 'Invoke-BuildLvlibpGithubHostedWindows' + 'build-vi-package' = 'Invoke-BuildViPackage' + 'close-labview' = 'Invoke-CloseLabVIEW' + 'generate-release-notes' = 'Invoke-GenerateReleaseNotes' + 'missing-in-project' = 'Invoke-MissingInProject' + 'modify-vipb-display-info' = 'Invoke-ModifyVIPBDisplayInfo' + 'prepare-labview-source' = 'Invoke-PrepareLabVIEWSource' + 'rename-file' = 'Invoke-RenameFile' + 'restore-setup-lv-source' = 'Invoke-RestoreSetupLVSource' + 'revert-development-mode' = 'Invoke-RevertDevelopmentMode' + 'run-pester-tests' = 'Invoke-RunPesterTests' + 'run-unit-tests' = 'Invoke-RunUnitTests' + 'set-development-mode' = 'Invoke-SetDevelopmentMode' } $Registry = $null diff --git a/actions/OpenSourceActions.psd1 b/actions/OpenSourceActions.psd1 index ed87ca8e..d5ef1a88 100644 --- a/actions/OpenSourceActions.psd1 +++ b/actions/OpenSourceActions.psd1 @@ -17,7 +17,7 @@ 'Invoke-BuildLvlibp' 'Invoke-BuildLvlibpDockerLinux' 'Invoke-BuildLvlibpDockerWindows' - 'Invoke-BuildLvlibpWin32' + 'Invoke-BuildLvlibpGithubHostedWindows' 'Invoke-BuildViPackage' 'Invoke-CloseLabVIEW' 'Invoke-ConfigureLabview' diff --git a/actions/OpenSourceActions.psm1 b/actions/OpenSourceActions.psm1 index c09e1475..99ee69de 100644 --- a/actions/OpenSourceActions.psm1 +++ b/actions/OpenSourceActions.psm1 @@ -355,7 +355,7 @@ function Invoke-BuildLvlibpDockerWindows { # Commit: Commit hash or identifier (optional). # DryRun: If set, prints the command instead of executing it. # gcliPath: Optional path prepended to PATH for locating the g CLI. -function Invoke-BuildLvlibpWin32 { +function Invoke-BuildLvlibpGithubHostedWindows { [CmdletBinding()] param( [Parameter(Mandatory)] [string] $MinimumSupportedLVVersion, @@ -371,10 +371,10 @@ function Invoke-BuildLvlibpWin32 { [switch] $DryRun, [string] $gcliPath ) - Write-Information "Invoking BuildLvlibpWin32" -InformationAction Continue + Write-Information "Invoking BuildLvlibpGithubHostedWindows" -InformationAction Continue $result = Invoke-OpenSourceActionScript ` - -ScriptSegments @('build-lvlibp-win32', 'BuildLvlibpWin32.ps1') ` + -ScriptSegments @('build-lvlibp-github-hosted-windows', 'BuildLvlibpGithubHostedWindows.ps1') ` -Arguments @{ MinimumSupportedLVVersion = $MinimumSupportedLVVersion SupportedBitness = $SupportedBitness diff --git a/artifacts/linux/action-docs.json b/artifacts/linux/action-docs.json index 201d97b6..2caf2774 100644 --- a/artifacts/linux/action-docs.json +++ b/artifacts/linux/action-docs.json @@ -364,7 +364,7 @@ } } }, - "Invoke-BuildLvlibpWin32": { + "Invoke-BuildLvlibpGithubHostedWindows": { "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { @@ -1560,7 +1560,7 @@ "type": "string" } ], - "build-lvlibp-win32": [ + "build-lvlibp-github-hosted-windows": [ { "name": "minimum_supported_lv_version", "description": "LabVIEW version year for the build (e.g., \"2021\", \"2026\").", diff --git a/artifacts/linux/action-docs.md b/artifacts/linux/action-docs.md index 5ceff7bf..3b315766 100644 --- a/artifacts/linux/action-docs.md +++ b/artifacts/linux/action-docs.md @@ -121,7 +121,7 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Windows Docker container. pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpDockerWindows -ArgsJson '{}' ``` -#### Invoke-BuildLvlibpWin32 +#### Invoke-BuildLvlibpGithubHostedWindows Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., "2021", "2026"). SupportedBitness: Bitness of the LabVIEW environment ("32" or "64"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to "My Computer"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI. | Parameter | Type | Required | Default | Description | | --- | --- | --- | --- | --- | @@ -139,7 +139,7 @@ Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runn | gcliPath | string | false | | Optional path prepended to PATH for locating the g CLI | ```powershell -pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpWin32 -ArgsJson '{}' +pwsh ./actions/Invoke-OSAction.ps1 -ActionName Invoke-BuildLvlibpGithubHostedWindows -ArgsJson '{}' ``` #### Invoke-BuildViPackage @@ -510,7 +510,7 @@ pwsh ./actions/Invoke-OSAction.ps1 -ActionName Set-LogLevel -ArgsJson '{}' | log_level | string | false | INFO | Verbosity level (ERROR|WARN|INFO|DEBUG). | | dry_run | string | false | false | If true, simulate the action without side effects. | -#### build-lvlibp-win32 +#### build-lvlibp-github-hosted-windows | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | minimum_supported_lv_version | string | true | | LabVIEW version year for the build (e.g., "2021", "2026"). | diff --git a/build-lvlibp-win32/action.yml b/build-lvlibp-github-hosted-windows/action.yml similarity index 95% rename from build-lvlibp-win32/action.yml rename to build-lvlibp-github-hosted-windows/action.yml index 045e545c..95db66e3 100644 --- a/build-lvlibp-win32/action.yml +++ b/build-lvlibp-github-hosted-windows/action.yml @@ -1,4 +1,4 @@ -name: 'Build LVLIBP Win32' +name: 'Build LVLIBP GitHub Hosted Windows' description: 'Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner' inputs: minimum_supported_lv_version: @@ -49,7 +49,7 @@ inputs: runs: using: 'composite' steps: - - name: Dispatch build-lvlibp-win32 + - name: Dispatch build-lvlibp-github-hosted-windows shell: pwsh run: | $ErrorActionPreference = 'Stop' @@ -69,7 +69,7 @@ runs: if ('${{ inputs.build }}') { $args['Build'] = [int]'${{ inputs.build }}' } $params = @{ - ActionName = 'build-lvlibp-win32' + ActionName = 'build-lvlibp-github-hosted-windows' ArgsJson = ($args | ConvertTo-Json -Compress) LogLevel = '${{ inputs.log_level }}' } diff --git a/ci_evidence.txt b/ci_evidence.txt index 739e4bb1..c2a1b504 100644 --- a/ci_evidence.txt +++ b/ci_evidence.txt @@ -1 +1 @@ -{"pipeline":"Unknown","git_sha":"be0d1d4b8e3f8cca3941e8cb69eb99c8fd966d51","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file +{"pipeline":"Unknown","git_sha":"ca2e2799dc4ab919b029800520cee7124d7a3d7a","req_status":{"REQ-023":"PASS","REQ-024":"PASS","REQ-025":"PASS","REQ-026":"PASS","REQ-027":"PASS","REQ-028":"PASS","REQ-029":"PASS","REQ-030":"PASS","REQ-031":"PASS","REQ-032":"PASS","REQ-033":"PASS"}} \ No newline at end of file diff --git a/dispatchers.json b/dispatchers.json index 063bb5ff..e833f877 100644 --- a/dispatchers.json +++ b/dispatchers.json @@ -362,7 +362,7 @@ } } }, - "Invoke-BuildLvlibpWin32": { + "Invoke-BuildLvlibpGithubHostedWindows": { "description": "Builds LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner. MinimumSupportedLVVersion: LabVIEW version for the build (e.g., \"2021\", \"2026\"). SupportedBitness: Bitness of the LabVIEW environment (\"32\" or \"64\"). ProjectPath: Path to the LabVIEW project .lvproj file. TargetName: Target that contains the build specification (optional, defaults to \"My Computer\"). BuildSpecName: Name of the LabVIEW build specification (optional, builds all if empty). Major: Major version component (optional, skips version setting if < 0). Minor: Minor version component (optional, skips version setting if < 0). Patch: Patch version component (optional, skips version setting if < 0). Build: Build number component (optional, skips version setting if < 0). Commit: Commit hash or identifier (optional). DryRun: If set, prints the command instead of executing it. gcliPath: Optional path prepended to PATH for locating the g CLI.", "parameters": { "Build": { diff --git a/docs/actions/build-lvlibp-docker-windows.md b/docs/actions/build-lvlibp-docker-windows.md index 0bad65d6..b273147e 100644 --- a/docs/actions/build-lvlibp-docker-windows.md +++ b/docs/actions/build-lvlibp-docker-windows.md @@ -185,6 +185,6 @@ You cannot partially specify version components - either provide all four or non ## See also - [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) – Linux Docker PPL build action -- [build-lvlibp-win32](build-lvlibp-win32.md) – Windows native PPL build action +- [build-lvlibp-github-hosted-windows](build-lvlibp-github-hosted-windows.md) – Windows native PPL build action - [build](build.md) – General LabVIEW build action - [Architecture documentation](../architecture.md) diff --git a/docs/actions/build-lvlibp-win32.md b/docs/actions/build-lvlibp-github-hosted-windows.md similarity index 96% rename from docs/actions/build-lvlibp-win32.md rename to docs/actions/build-lvlibp-github-hosted-windows.md index 957fb01d..31794064 100644 --- a/docs/actions/build-lvlibp-win32.md +++ b/docs/actions/build-lvlibp-github-hosted-windows.md @@ -1,4 +1,4 @@ -# build-lvlibp-win32 +# build-lvlibp-github-hosted-windows ## Purpose @@ -49,7 +49,7 @@ Common parameters are described in [Common parameters](../common-parameters.md). ### CLI ```powershell -pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson '{ +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-github-hosted-windows -ArgsJson '{ "MinimumSupportedLVVersion": "2025", "SupportedBitness": "32", "ProjectPath": "lv_icon_editor.lvproj", @@ -67,7 +67,7 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson ```yaml - name: Build PPL with GitHub-hosted Runner - uses: ni/open-source/build-lvlibp-win32@v1 + uses: ni/open-source/build-lvlibp-github-hosted-windows@v1 with: minimum_supported_lv_version: '2025' supported_bitness: '32' @@ -84,7 +84,7 @@ pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson ### CLI without Version (Skip setting version) ```powershell -pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-win32 -ArgsJson '{ +pwsh -File actions/Invoke-OSAction.ps1 -ActionName build-lvlibp-github-hosted-windows -ArgsJson '{ "MinimumSupportedLVVersion": "2025", "SupportedBitness": "32", "ProjectPath": "lv_icon_editor.lvproj", @@ -132,7 +132,7 @@ jobs: "patch=$($parts[2])" >> $env:GITHUB_OUTPUT - name: Build PPL - uses: ni/open-source/build-lvlibp-win32@v1 + uses: ni/open-source/build-lvlibp-github-hosted-windows@v1 with: minimum_supported_lv_version: '2025' supported_bitness: '32' @@ -169,7 +169,7 @@ Omit `build_spec_name` to build all build specifications. The provided version i ```yaml - name: Build All PPLs - uses: ni/open-source/build-lvlibp-win32@v1 + uses: ni/open-source/build-lvlibp-github-hosted-windows@v1 with: minimum_supported_lv_version: '2025' supported_bitness: '32' diff --git a/docs/actions/index.md b/docs/actions/index.md index 9aea22e3..7e1f0d9d 100644 --- a/docs/actions/index.md +++ b/docs/actions/index.md @@ -7,7 +7,7 @@ List of available GitHub Actions. - [build-lvlibp](./build-lvlibp.md): Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp) - [build-lvlibp-docker-linux](./build-lvlibp-docker-linux.md) – Build LVLIBP using Linux Docker container - [build-lvlibp-docker-windows](./build-lvlibp-docker-windows.md) – Build LVLIBP using Windows Docker container -- [build-lvlibp-win32](./build-lvlibp-win32.md) – Build LVLIBP using Windows GitHub-hosted runner +- [build-lvlibp-github-hosted-windows](./build-lvlibp-github-hosted-windows.md) – Build LVLIBP using Windows GitHub-hosted runner - [build-vi-package](./build-vi-package.md): Update VIPB display information and build a VI package using g-cli. - [build](./build.md): Automate building the LabVIEW Icon Editor project, including cleaning, building libraries, and packaging. - [close-labview](./close-labview.md): Gracefully close a running LabVIEW instance via g-cli. diff --git a/docs/index.md b/docs/index.md index 22b56a00..44c5aaba 100644 --- a/docs/index.md +++ b/docs/index.md @@ -26,7 +26,7 @@ Open Source LabVIEW Actions unifies LabVIEW [CI/CD](glossary.md#ci-cd) scripts b | [build-lvlibp](actions/build-lvlibp.md) | Build a LabVIEW project’s build specification into a Packed Project Library (.lvlibp). | | [build-lvlibp-docker-linux](actions/build-lvlibp-docker-linux.md) | Build LVLIBP with Linux Docker. | | [build-lvlibp-docker-windows](actions/build-lvlibp-docker-windows.md) | Build LVLIBP with Windows Docker. | -| [build-lvlibp-win32](actions/build-lvlibp-win32.md) | Build LVLIBP with Windows runner. | +| [build-lvlibp-github-hosted-windows](actions/build-lvlibp-github-hosted-windows.md) | Build LVLIBP with Windows runner. | | [build-vi-package](actions/build-vi-package.md) | Update VIPB display information and build a VI package using g-cli. | | [close-labview](actions/close-labview.md) | Gracefully close a running LabVIEW instance via g-cli. | | [generate-release-notes](actions/generate-release-notes.md) | Generate release notes from the git history and write them to a markdown file. | diff --git a/docs/requirements.md b/docs/requirements.md index 7b5abbed..55791e49 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -47,7 +47,7 @@ Runner Type indicates whether a requirement runs on a standard GitHub-hosted ima | REQ-038 | Install VI Package Manager (VIPM) and LUnit CLI package for LabVIEW automation testing. | `tests/pester/SetupLunit.Workflow.Tests.ps1` | | | | | REQ-039 | Build LabVIEW Packed Project Library (.lvlibp) using Linux LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata. | `tests/pester/BuildLvlibpDockerLinux.Workflow.Tests.ps1` | | | | | REQ-040 | Build LabVIEW Packed Project Library (.lvlibp) using Windows LabVIEW Docker container with specified version, bitness, and build specification, then rename the artifact with version and commit metadata. | `tests/pester/BuildLvlibpDockerWindows.Workflow.Tests.ps1` | | | | -| REQ-041 | Build LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner with locally installed LabVIEW. | `tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1` | | | | +| REQ-041 | Build LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner with locally installed LabVIEW. | `tests/pester/BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1` | | | | | REQIE-001 | After checking out the LabVIEW icon editor repository, PreSequence: The sequencer shall enumerate and record the build matrix used by the workflow (LabVIEW versions and bitness). Acceptance: a 'matrix.json' file exists listing each tuple {"lv-version": "2021"\|"2023", "bitness": "32"\|"64"} with at least [ ["2021","32"], ["2021","64"], ["2023","64"] ]. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.PreSequence.matrix-enumeration.ps1` | self-hosted-windows-lv | integration | true | | REQIE-002 | After checking out the LabVIEW icon editor repository, Setup: For each matrix entry, the sequencer shall apply [VIPC](glossary.md#vipc) dependencies using the canonical action inputs (minimum_supported_lv_version, vip_lv_version, supported_bitness, relative_path). Evidence: a 'vipc-apply.json' summary per matrix entry capturing inputs, start/end timestamps, exit code, and status. Acceptance: all entries report exit_code == 0 and status == 'success'. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.Setup.apply-vipc-succeeds.ps1` | self-hosted-windows-lv | integration | true | | REQIE-003 | After checking out the LabVIEW icon editor repository, Setup: The sequencer shall compute and persist semantic version information. Evidence: a 'version.json' containing VERSION, MAJOR, MINOR, PATCH, BUILD, IS_PRERELEASE and the commit SHA used. Acceptance: VERSION conforms to SemVer and all numeric components are present. g-cli is expected at 'C:\Program Files\G-CLI\bin\g-cli.exe'. | `tests/pester/BuildProfile1.IconEditor.Setup.version-outputs-captured.ps1` | self-hosted-windows-lv | integration | true | diff --git a/docs/scripts/build-lvlibp-win32.md b/docs/scripts/build-lvlibp-win32.md index 6f7a9191..9a621891 100644 --- a/docs/scripts/build-lvlibp-win32.md +++ b/docs/scripts/build-lvlibp-win32.md @@ -1,6 +1,6 @@ # Build Packed Library with Windows Runner πŸ–₯οΈπŸ“¦ -Call **`BuildLvlibpWin32.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI on a Windows GitHub-hosted runner. +Call **`BuildLvlibpGithubHostedWindows.ps1`** to compile LabVIEW packed libraries using LabVIEWCLI on a Windows GitHub-hosted runner. ## Inputs @@ -22,7 +22,7 @@ Call **`BuildLvlibpWin32.ps1`** to compile LabVIEW packed libraries using LabVIE The following example builds using LabVIEW 2025 (32-bit) on a Windows runner. ```yaml -- uses: ./.github/actions/build-lvlibp-win32 +- uses: ./.github/actions/build-lvlibp-github-hosted-windows with: minimum_supported_lv_version: 2025 supported_bitness: 32 @@ -68,7 +68,7 @@ jobs: package_id: 'LabVIEW_COM_PKG 25.0300' - name: Build PPL - uses: ./.github/actions/build-lvlibp-win32 + uses: ./.github/actions/build-lvlibp-github-hosted-windows with: minimum_supported_lv_version: 2025 supported_bitness: 32 @@ -93,7 +93,7 @@ jobs: Leave `build_spec_name` empty and provide version to set the same version on all build specs: ```yaml -- uses: ./.github/actions/build-lvlibp-win32 +- uses: ./.github/actions/build-lvlibp-github-hosted-windows with: minimum_supported_lv_version: 2025 supported_bitness: 32 @@ -111,7 +111,7 @@ Leave `build_spec_name` empty and provide version to set the same version on all Omit version parameters to use versions to skip setting versions in build specifications: ```yaml -- uses: ./.github/actions/build-lvlibp-win32 +- uses: ./.github/actions/build-lvlibp-github-hosted-windows with: minimum_supported_lv_version: 2025 supported_bitness: 32 @@ -146,7 +146,7 @@ For containerized builds: - Windows containers: [build-lvlibp-docker-windows](build-lvlibp-docker-windows.md) - Linux containers: [build-lvlibp-docker-linux](build-lvlibp-docker-linux.md) -See also: [docs/actions/build-lvlibp-win32.md](../actions/build-lvlibp-win32.md) +See also: [docs/actions/build-lvlibp-github-hosted-windows.md](../actions/build-lvlibp-github-hosted-windows.md) ## License diff --git a/requirements.json b/requirements.json index f0f3c5bc..6582ecc3 100644 --- a/requirements.json +++ b/requirements.json @@ -314,7 +314,7 @@ "id": "REQ-041", "description": "Build LabVIEW Packed Project Library (.lvlibp) using Windows GitHub-hosted runner with locally installed LabVIEW.", "tests": [ - "BuildLvlibpWin32.Workflow.Tests" + "BuildLvlibpGithubHostedWindows.Workflow.Tests" ] }, { diff --git a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 b/scripts/build-lvlibp-github-hosted-windows/BuildLvlibpGithubHostedWindows.ps1 similarity index 91% rename from scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 rename to scripts/build-lvlibp-github-hosted-windows/BuildLvlibpGithubHostedWindows.ps1 index 720fb581..79dc671f 100644 --- a/scripts/build-lvlibp-win32/BuildLvlibpWin32.ps1 +++ b/scripts/build-lvlibp-github-hosted-windows/BuildLvlibpGithubHostedWindows.ps1 @@ -36,7 +36,7 @@ Commit hash or identifier recorded in the build. .EXAMPLE - .\BuildLvlibpWin32.ps1 -MinimumSupportedLVVersion "2025" -SupportedBitness "32" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" + .\BuildLvlibpGithubHostedWindows.ps1 -MinimumSupportedLVVersion "2025" -SupportedBitness "32" -ProjectPath "lv_icon_editor.lvproj" -TargetName "My Computer" -BuildSpecName "Editor Packed Library" -Major 1 -Minor 0 -Patch 0 -Build 0 -Commit "abc1234" .NOTES [REQ-041] Build LabVIEW Packed Project Library using Windows GitHub-hosted runner @@ -92,7 +92,12 @@ try { Write-Information "Commit: $Commit" -InformationAction Continue # Construct LabVIEWPath for Windows - $labviewPath = "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + if ($SupportedBitness -eq "32") { + $labviewPath = "C:\Program Files (x86)\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } else { + $labviewPath = "C:\Program Files\National Instruments\LabVIEW $MinimumSupportedLVVersion\LabVIEW.exe" + } + $labviewCLI = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" if (-not (Test-Path $labviewPath)) { @@ -186,6 +191,6 @@ try { exit 0 } catch { - Write-Error "BuildLvlibpWin32 failed: $_" + Write-Error "BuildLvlibpGithubHostedWindows failed: $_" exit 1 } \ No newline at end of file diff --git a/scripts/build-lvlibp-helpers/README.md b/scripts/build-lvlibp-helpers/README.md index 506c3042..cae16ccd 100644 --- a/scripts/build-lvlibp-helpers/README.md +++ b/scripts/build-lvlibp-helpers/README.md @@ -52,7 +52,7 @@ LabVIEWCLI \ - [`build-lvlibp-docker-linux`](../build-lvlibp-docker-linux/BuildLvlibpDockerLinux.ps1) – When version parameters are provided - [`build-lvlibp-docker-windows`](../build-lvlibp-docker-windows/BuildLvlibpDockerWindows.ps1) – When version parameters are provided -- [`build-lvlibp-win32`](../build-lvlibp-win32/BuildLvlibpWin32.ps1) – When version parameters are provided +- [`build-lvlibp-github-hosted-windows`](../build-lvlibp-github-hosted-windows/BuildLvlibpGithubHostedWindows.ps1) – When version parameters are provided ### When is the Helper VI Called? diff --git a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 b/tests/pester/BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1 similarity index 77% rename from tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 rename to tests/pester/BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1 index ac709bee..f39344d5 100644 --- a/tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1 +++ b/tests/pester/BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1 @@ -2,11 +2,11 @@ Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' -Describe 'BuildLvlibpWin32.Workflow' { +Describe 'BuildLvlibpGithubHostedWindows.Workflow' { $meta = @{ requirement = 'REQ-041' Owner = 'NI' - Evidence = 'tests/pester/BuildLvlibpWin32.Workflow.Tests.ps1' + Evidence = 'tests/pester/BuildLvlibpGithubHostedWindows.Workflow.Tests.ps1' } BeforeAll { @@ -15,18 +15,18 @@ Describe 'BuildLvlibpWin32.Workflow' { } It 'validates action.yml exists [REQ-041]' -Tag 'REQ-041' { - $actionPath = Join-Path $repoRoot 'build-lvlibp-win32' 'action.yml' + $actionPath = Join-Path $repoRoot 'build-lvlibp-github-hosted-windows' 'action.yml' Test-Path $actionPath | Should -Be $true } It 'validates implementation script exists [REQ-041]' -Tag 'REQ-041' { - $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-win32' 'BuildLvlibpWin32.ps1' + $scriptPath = Join-Path $repoRoot 'scripts' 'build-lvlibp-github-hosted-windows' 'BuildLvlibpGithubHostedWindows.ps1' Test-Path $scriptPath | Should -Be $true } It 'executes dry-run with only required parameters [REQ-041]' -Tag 'REQ-041' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-win32' ` + -ActionName 'build-lvlibp-github-hosted-windows' ` -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj"}' ` -DryRun @@ -35,7 +35,7 @@ Describe 'BuildLvlibpWin32.Workflow' { It 'executes dry-run with all parameters [REQ-041]' -Tag 'REQ-041' { $result = & "$repoRoot/actions/Invoke-OSAction.ps1" ` - -ActionName 'build-lvlibp-win32' ` + -ActionName 'build-lvlibp-github-hosted-windows' ` -ArgsJson '{"MinimumSupportedLVVersion":"2026","SupportedBitness":"64","ProjectPath":"test.lvproj","TargetName":"My Computer","BuildSpecName":"TestBuild","Major":1,"Minor":0,"Patch":0,"Build":0,"Commit":"abc1234"}' ` -DryRun From b439b25a20d56192a48da7ea67ee7a60e670330d Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Wed, 18 Mar 2026 09:36:06 +0530 Subject: [PATCH 49/49] Renamed docs [REQ-041] --- ...uild-lvlibp-win32.md => build-lvlibp-github-hosted-windows.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/scripts/{build-lvlibp-win32.md => build-lvlibp-github-hosted-windows.md} (100%) diff --git a/docs/scripts/build-lvlibp-win32.md b/docs/scripts/build-lvlibp-github-hosted-windows.md similarity index 100% rename from docs/scripts/build-lvlibp-win32.md rename to docs/scripts/build-lvlibp-github-hosted-windows.md