From 9c2c53abf8510e28325eedb25607c3d8e0751eb8 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 14:28:09 +0530 Subject: [PATCH 1/8] Initial upload for CI pipeline --- .github/workflows/ci.yml | 162 ++++++++++++++++++++++++++++ .github/workflows/run-via-tests.yml | 21 ---- 2 files changed, 162 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8d9f209 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,162 @@ +name: CI Pipeline +run-name: "CI ${{ github.sha }} (#${{ github.run_id }}.${{ github.run_attempt }})" + +concurrency: + group: ci-pipeline-${{ github.repository }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +on: + pull_request: + branches: + - main + - develop + - release/* + - feature/* + - hotfix/* + types: + - opened + - synchronize + - reopened + - ready_for_review + + push: + branches: + - main + - develop + - release/* + - hotfix/* + - feature/* + + workflow_dispatch: + +jobs: + via-tests: + name: Run VI Analyzer tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Run VI Analyzer tests + uses: ni/open-source/via-lv-docker@actions + with: + config_path: ${{ github.event_name == 'workflow_dispatch' && '.github/via_config/Actor_Framework.viancfg' || '' }} + base_branch: origin/${{ github.event.pull_request.base.ref || 'develop' }} + labview_version: 'latest-linux' + + - name: Upload VI Analyzer Report + uses: actions/upload-artifact@v6 + if: always() + with: + name: vi-analyzer-report + path: vi-analyzer-report.htm + retention-days: 7 + + create-artifact: + name: Create distribution artifact + needs: via-tests + uses: ./.github/workflows/create-distribution-artifact.yml + with: + upload-artifact: true + + install-into-labview: + name: Install distribution into LabVIEW 2026 container + needs: create-artifact + runs-on: windows-latest + + steps: + - name: Download distribution artifact + uses: actions/download-artifact@v6 + with: + name: actor-framework-distribution + path: distribution + + - name: Show downloaded artifact contents + shell: pwsh + run: | + Get-ChildItem -Path "${{ github.workspace }}\distribution" -Recurse + + - name: Pull LabVIEW container image + shell: pwsh + run: | + docker pull nationalinstruments/labview:2026q1-windows + + - name: Create and start container + shell: pwsh + run: | + docker create --name af-lv2026 ` + nationalinstruments/labview:2026q1-windows ` + powershell -NoLogo -NoProfile -Command "Start-Sleep -Seconds 3600" + + docker start af-lv2026 + + - name: Copy distribution into container + shell: pwsh + run: | + docker cp "${{ github.workspace }}\distribution\." "af-lv2026:C:\staging" + + - name: Overlay files into LabVIEW 2026 and mass compile + shell: pwsh + run: | + $script = @' + $lvRoot = "C:\Program Files\National Instruments\LabVIEW 2026" + $labviewCli = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" + $stagingRoot = "C:\staging" + $logRoot = "C:\mass-compile-logs" + $folders = @("menus", "vi.lib", "resource") + + New-Item -ItemType Directory -Path $logRoot -Force | Out-Null + + foreach ($folder in $folders) { + $source = Join-Path $stagingRoot $folder + $destination = Join-Path $lvRoot $folder + + if (Test-Path $source) { + Write-Host "Overlaying $source -> $destination" + New-Item -ItemType Directory -Path $destination -Force | Out-Null + Copy-Item -Path (Join-Path $source '*') -Destination $destination -Recurse -Force + + $logFile = Join-Path $logRoot "$($folder -replace '[\\/:*?""<>|]', '_')-masscompile.log" + + Write-Host "Mass compiling $destination" + & $labviewCli ` + -OperationName MassCompile ` + -DirectoryToCompile $destination ` + -MassCompileLogFile $logFile ` + -Headless + + if ($LASTEXITCODE -ne 0) { + throw "Mass compile failed for $destination with exit code $LASTEXITCODE" + } + } + } + '@ + + $tempScript = Join-Path $env:RUNNER_TEMP "copy-and-masscompile.ps1" + Set-Content -Path $tempScript -Value $script + docker cp $tempScript "af-lv2026:C:\copy-and-masscompile.ps1" + docker exec af-lv2026 powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File C:\copy-and-masscompile.ps1 + + - name: Copy mass compile logs from container + if: always() + shell: pwsh + run: | + New-Item -ItemType Directory -Path "${{ github.workspace }}\mass-compile-logs" -Force | Out-Null + docker cp "af-lv2026:C:\mass-compile-logs\." "${{ github.workspace }}\mass-compile-logs" + + - name: Upload mass compile logs + if: always() + uses: actions/upload-artifact@v6 + with: + name: mass-compile-logs + path: mass-compile-logs + retention-days: 7 + + - name: Cleanup container + if: always() + shell: pwsh + run: | + docker rm -f af-lv2026 \ No newline at end of file diff --git a/.github/workflows/run-via-tests.yml b/.github/workflows/run-via-tests.yml index 686b9c2..f7870ae 100644 --- a/.github/workflows/run-via-tests.yml +++ b/.github/workflows/run-via-tests.yml @@ -1,27 +1,6 @@ name: Run VIA tests on: - pull_request: - branches: - - main - - develop - - release/* - - feature/* - - hotfix/* - types: - - opened - - synchronize - - reopened - - ready_for_review - - push: - branches: - - main - - develop - - release/* - - hotfix/* - - feature/* - workflow_dispatch: jobs: From 2e2e179bb5a5377bb1627f6bbfd0fcf8aaaf0427 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 14:54:04 +0530 Subject: [PATCH 2/8] Masscompile specific folders --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d9f209..cfc42c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,11 +106,29 @@ jobs: $labviewCli = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" $stagingRoot = "C:\staging" $logRoot = "C:\mass-compile-logs" - $folders = @("menus", "vi.lib", "resource") + $overlayFolders = @("menus", "vi.lib", "resource") + + # Only these folders will be mass compiled + $compileTargets = @( + "menus", + "resource\AFDebug", + "resource\Framework\Providers\ActorMessageMaker", + "resource\Framework\Providers\AddActor", + "resource\Framework\Providers\AddActorInterface", + "resource\Framework\Providers\GProviders", + "resource\Framework\Providers\MessageMakerProvider", + "resource\Framework\Providers\MessageRescripter", + "vi.lib\ActorFramework" + ) + + if (-not (Test-Path $labviewCli)) { + throw "LabVIEWCLI not found at: $labviewCli" + } New-Item -ItemType Directory -Path $logRoot -Force | Out-Null - foreach ($folder in $folders) { + # Overlay copy: overwrite common files, keep unrelated files untouched + foreach ($folder in $overlayFolders) { $source = Join-Path $stagingRoot $folder $destination = Join-Path $lvRoot $folder @@ -118,19 +136,29 @@ jobs: Write-Host "Overlaying $source -> $destination" New-Item -ItemType Directory -Path $destination -Force | Out-Null Copy-Item -Path (Join-Path $source '*') -Destination $destination -Recurse -Force + } + } + + # Mass compile only selected folders + foreach ($relativeTarget in $compileTargets) { + $targetPath = Join-Path $lvRoot $relativeTarget + if (-not (Test-Path $targetPath)) { + Write-Warning "Mass compile target not found, skipping: $targetPath" + continue + } - $logFile = Join-Path $logRoot "$($folder -replace '[\\/:*?""<>|]', '_')-masscompile.log" + $safeName = $relativeTarget -replace '[\\/:*?""<>|]', '_' + $logFile = Join-Path $logRoot "$safeName-masscompile.log" - Write-Host "Mass compiling $destination" - & $labviewCli ` - -OperationName MassCompile ` - -DirectoryToCompile $destination ` - -MassCompileLogFile $logFile ` - -Headless + Write-Host "Mass compiling $targetPath" + & $labviewCli ` + -OperationName MassCompile ` + -DirectoryToCompile $targetPath ` + -MassCompileLogFile $logFile ` + -Headless - if ($LASTEXITCODE -ne 0) { - throw "Mass compile failed for $destination with exit code $LASTEXITCODE" - } + if ($LASTEXITCODE -ne 0) { + throw "Mass compile failed for $targetPath with exit code $LASTEXITCODE" } } '@ From f6f39dd13ab830dcb4e74cb81cfbe977c9697f65 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 17:28:47 +0530 Subject: [PATCH 3/8] Mass compile only ActorFramework --- .github/workflows/ci.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfc42c2..9fc41d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: steps: - name: Download distribution artifact - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v7 with: name: actor-framework-distribution path: distribution @@ -110,14 +110,6 @@ jobs: # Only these folders will be mass compiled $compileTargets = @( - "menus", - "resource\AFDebug", - "resource\Framework\Providers\ActorMessageMaker", - "resource\Framework\Providers\AddActor", - "resource\Framework\Providers\AddActorInterface", - "resource\Framework\Providers\GProviders", - "resource\Framework\Providers\MessageMakerProvider", - "resource\Framework\Providers\MessageRescripter", "vi.lib\ActorFramework" ) @@ -127,7 +119,6 @@ jobs: New-Item -ItemType Directory -Path $logRoot -Force | Out-Null - # Overlay copy: overwrite common files, keep unrelated files untouched foreach ($folder in $overlayFolders) { $source = Join-Path $stagingRoot $folder $destination = Join-Path $lvRoot $folder @@ -173,7 +164,7 @@ jobs: shell: pwsh run: | New-Item -ItemType Directory -Path "${{ github.workspace }}\mass-compile-logs" -Force | Out-Null - docker cp "af-lv2026:C:\mass-compile-logs\." "${{ github.workspace }}\mass-compile-logs" + docker cp "af-lv2026:C:\mass-compile-logs" "${{ github.workspace }}\mass-compile-logs" - name: Upload mass compile logs if: always() From eee68b88a737e150e530a86dcc06b8567aa28897 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 18:28:10 +0530 Subject: [PATCH 4/8] Dynamically get lv year --- .github/workflows/ci.yml | 53 +++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fc41d1..3bf50c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,9 @@ name: CI Pipeline run-name: "CI ${{ github.sha }} (#${{ github.run_id }}.${{ github.run_attempt }})" +env: + LABVIEW_IMAGE: nationalinstruments/labview:latest-windows + concurrency: group: ci-pipeline-${{ github.repository }}-${{ github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} @@ -63,7 +66,7 @@ jobs: upload-artifact: true install-into-labview: - name: Install distribution into LabVIEW 2026 container + name: Mass Compile Actor Framework VIs needs: create-artifact runs-on: windows-latest @@ -82,27 +85,46 @@ jobs: - name: Pull LabVIEW container image shell: pwsh run: | - docker pull nationalinstruments/labview:2026q1-windows + docker pull $env:LABVIEW_IMAGE + + - name: Resolve LabVIEW image metadata + shell: pwsh + run: | + $imageEnv = docker image inspect --format '{{json .Config.Env}}' $env:LABVIEW_IMAGE | ConvertFrom-Json + $lvYearEntry = $imageEnv | Where-Object { $_ -like 'LV_YEAR=*' } | Select-Object -First 1 + + if (-not $lvYearEntry) { + throw "LV_YEAR was not found in image metadata for $env:LABVIEW_IMAGE" + } + + $lvYear = $lvYearEntry.Substring("LV_YEAR=".Length) + $containerName = "af-lv$lvYear-${{ github.run_id }}" + + "LV_YEAR=$lvYear" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + "AF_CONTAINER_NAME=$containerName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + Write-Host "Resolved LV_YEAR=$lvYear" + Write-Host "Resolved AF_CONTAINER_NAME=$containerName" - name: Create and start container shell: pwsh run: | - docker create --name af-lv2026 ` - nationalinstruments/labview:2026q1-windows ` + docker create --name $env:AF_CONTAINER_NAME ` + $env:LABVIEW_IMAGE ` powershell -NoLogo -NoProfile -Command "Start-Sleep -Seconds 3600" - docker start af-lv2026 + docker start $env:AF_CONTAINER_NAME - name: Copy distribution into container shell: pwsh run: | - docker cp "${{ github.workspace }}\distribution\." "af-lv2026:C:\staging" + docker cp "${{ github.workspace }}\distribution\." "$env:AF_CONTAINER_NAME:C:\staging" - - name: Overlay files into LabVIEW 2026 and mass compile + - name: Overlay files into LabVIEW directory and mass compile shell: pwsh run: | $script = @' - $lvRoot = "C:\Program Files\National Instruments\LabVIEW 2026" + $lvRoot = "C:\Program Files\National Instruments\LabVIEW $env:LV_YEAR" $labviewCli = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" $stagingRoot = "C:\staging" $logRoot = "C:\mass-compile-logs" @@ -113,6 +135,10 @@ jobs: "vi.lib\ActorFramework" ) + if (-not (Test-Path $lvRoot)) { + throw "LabVIEW root not found at: $lvRoot" + } + if (-not (Test-Path $labviewCli)) { throw "LabVIEWCLI not found at: $labviewCli" } @@ -156,15 +182,18 @@ jobs: $tempScript = Join-Path $env:RUNNER_TEMP "copy-and-masscompile.ps1" Set-Content -Path $tempScript -Value $script - docker cp $tempScript "af-lv2026:C:\copy-and-masscompile.ps1" - docker exec af-lv2026 powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File C:\copy-and-masscompile.ps1 + docker cp $tempScript "$env:AF_CONTAINER_NAME:C:\copy-and-masscompile.ps1" + docker exec ` + -e LV_YEAR="$env:LV_YEAR" ` + $env:AF_CONTAINER_NAME ` + powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -File C:\copy-and-masscompile.ps1 - name: Copy mass compile logs from container if: always() shell: pwsh run: | New-Item -ItemType Directory -Path "${{ github.workspace }}\mass-compile-logs" -Force | Out-Null - docker cp "af-lv2026:C:\mass-compile-logs" "${{ github.workspace }}\mass-compile-logs" + docker cp "$env:AF_CONTAINER_NAME:C:\mass-compile-logs" "${{ github.workspace }}\mass-compile-logs" - name: Upload mass compile logs if: always() @@ -178,4 +207,4 @@ jobs: if: always() shell: pwsh run: | - docker rm -f af-lv2026 \ No newline at end of file + docker rm -f $env:AF_CONTAINER_NAME \ No newline at end of file From 3fea147ef39f399ce14ba1c25b7deffc8003a00e Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 18:52:28 +0530 Subject: [PATCH 5/8] Fix container name not being read --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bf50c8..9bd9786 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: } $lvYear = $lvYearEntry.Substring("LV_YEAR=".Length) - $containerName = "af-lv$lvYear-${{ github.run_id }}" + $containerName = "af-lv$lvYear" "LV_YEAR=$lvYear" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append "AF_CONTAINER_NAME=$containerName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append @@ -118,7 +118,7 @@ jobs: - name: Copy distribution into container shell: pwsh run: | - docker cp "${{ github.workspace }}\distribution\." "$env:AF_CONTAINER_NAME:C:\staging" + docker cp "${{ github.workspace }}\distribution" "$($env:AF_CONTAINER_NAME):C:\staging" - name: Overlay files into LabVIEW directory and mass compile shell: pwsh @@ -126,7 +126,7 @@ jobs: $script = @' $lvRoot = "C:\Program Files\National Instruments\LabVIEW $env:LV_YEAR" $labviewCli = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" - $stagingRoot = "C:\staging" + $stagingRoot = "C:\staging\distribution" $logRoot = "C:\mass-compile-logs" $overlayFolders = @("menus", "vi.lib", "resource") @@ -193,7 +193,7 @@ jobs: shell: pwsh run: | New-Item -ItemType Directory -Path "${{ github.workspace }}\mass-compile-logs" -Force | Out-Null - docker cp "$env:AF_CONTAINER_NAME:C:\mass-compile-logs" "${{ github.workspace }}\mass-compile-logs" + docker cp "$($env:AF_CONTAINER_NAME):C:\mass-compile-logs" "${{ github.workspace }}\mass-compile-logs" - name: Upload mass compile logs if: always() From a748ece69e24113c30a89fac83558b015c68113e Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 21:38:54 +0530 Subject: [PATCH 6/8] Fix env variable usage --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bd9786..3aa38a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,12 @@ jobs: $tempScript = Join-Path $env:RUNNER_TEMP "copy-and-masscompile.ps1" Set-Content -Path $tempScript -Value $script - docker cp $tempScript "$env:AF_CONTAINER_NAME:C:\copy-and-masscompile.ps1" + docker cp $tempScript "$($env:AF_CONTAINER_NAME):C:\copy-and-masscompile.ps1" + + if ($LASTEXITCODE -ne 0) { + throw "Failed to copy script into container" + } + docker exec ` -e LV_YEAR="$env:LV_YEAR" ` $env:AF_CONTAINER_NAME ` From fb6b4aa5414b0d17f429c9ddc2b1192cbd5733dd Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 23:10:55 +0530 Subject: [PATCH 7/8] Add debugging line to verify copied content --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3aa38a7..b5fbddf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,6 +120,9 @@ jobs: run: | docker cp "${{ github.workspace }}\distribution" "$($env:AF_CONTAINER_NAME):C:\staging" + # Verify what was copied into the container + docker exec $($env:AF_CONTAINER_NAME) powershell -Command "Get-ChildItem -Path C:\staging -Recurse -Depth 3" + - name: Overlay files into LabVIEW directory and mass compile shell: pwsh run: | From f0e548c406d50e7c552e55df1c4516eb810a7563 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 23:30:15 +0530 Subject: [PATCH 8/8] Corrected stagingRoot variable --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5fbddf..6b0c99a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,16 +120,13 @@ jobs: run: | docker cp "${{ github.workspace }}\distribution" "$($env:AF_CONTAINER_NAME):C:\staging" - # Verify what was copied into the container - docker exec $($env:AF_CONTAINER_NAME) powershell -Command "Get-ChildItem -Path C:\staging -Recurse -Depth 3" - - name: Overlay files into LabVIEW directory and mass compile shell: pwsh run: | $script = @' $lvRoot = "C:\Program Files\National Instruments\LabVIEW $env:LV_YEAR" $labviewCli = "C:\Program Files (x86)\National Instruments\Shared\LabVIEW CLI\LabVIEWCLI.exe" - $stagingRoot = "C:\staging\distribution" + $stagingRoot = "C:\staging" $logRoot = "C:\mass-compile-logs" $overlayFolders = @("menus", "vi.lib", "resource")