From 0fce45333a98e3a605574fa73cff1b690a45cb33 Mon Sep 17 00:00:00 2001 From: Krishna Sharma S Date: Fri, 27 Mar 2026 17:40:46 +0530 Subject: [PATCH 1/9] Create release workflow that uploads a distribution artifact for easier consumption in LV installers (#160) * Action to create distribution artifact * Added a release workflow * Added exclusions to the distribution artifact creation workflow --- .../create-distribution-artifact.yml | 38 +++ .github/workflows/release.yml | 34 +++ .../Workflows/releases-and-artifacts.md | 229 ++++++++++++++++++ pipeline/config/artifact-exclusions.txt | 9 + .../scripts/Create_Distribution_Artifact.ps1 | 95 ++++++++ 5 files changed, 405 insertions(+) create mode 100644 .github/workflows/create-distribution-artifact.yml create mode 100644 .github/workflows/release.yml create mode 100644 Documentation/Workflows/releases-and-artifacts.md create mode 100644 pipeline/config/artifact-exclusions.txt create mode 100644 pipeline/scripts/Create_Distribution_Artifact.ps1 diff --git a/.github/workflows/create-distribution-artifact.yml b/.github/workflows/create-distribution-artifact.yml new file mode 100644 index 0000000..35486ae --- /dev/null +++ b/.github/workflows/create-distribution-artifact.yml @@ -0,0 +1,38 @@ +name: Create Distribution Artifact + +on: + workflow_dispatch: + inputs: + upload-artifact: + description: 'Upload as GitHub artifact' + required: false + type: boolean + default: true + workflow_call: + inputs: + upload-artifact: + description: 'Upload as GitHub artifact' + required: false + type: boolean + default: false + +jobs: + create-artifact: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Create framework artifact structure + shell: pwsh + run: | + & "${{ github.workspace }}\pipeline\scripts\Create_Distribution_Artifact.ps1" + + - name: Upload artifact + if: ${{ inputs.upload-artifact }} + uses: actions/upload-artifact@v6 + with: + name: actor-framework-distribution + path: artifact-staging/ + retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..66ce201 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Create Release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + create-artifact: + uses: ./.github/workflows/create-distribution-artifact.yml + with: + upload-artifact: true + + create-release: + needs: create-artifact + runs-on: windows-latest + + steps: + - name: Download artifact + uses: actions/download-artifact@v7 + with: + name: actor-framework-distribution + path: artifact-staging + + - name: Create actor-framework-distribution.zip + shell: pwsh + run: | + Compress-Archive -Path artifact-staging\* -DestinationPath actor-framework-distribution.zip + + - name: Create Release + uses: softprops/action-gh-release@v2 + with: + files: actor-framework-distribution.zip + generate_release_notes: true \ No newline at end of file diff --git a/Documentation/Workflows/releases-and-artifacts.md b/Documentation/Workflows/releases-and-artifacts.md new file mode 100644 index 0000000..7f9578c --- /dev/null +++ b/Documentation/Workflows/releases-and-artifacts.md @@ -0,0 +1,229 @@ +# Actor Framework Release Workflows + +This document contains information used to create the release artifacts using GitHub Actions workflows for the Actor Framework repository. + +## Workflows + +### 1. Create Distribution Artifact (`create-distribution-artifact.yml`) + +Creates a structured artifact containing Actor Framework files organized in the correct directory layout for LabVIEW installation. The workflow yml can be found [here](/.github/workflows/create-distribution-artifact.yml). + +**Triggers:** +- Manual dispatch via GitHub Actions UI +- Reusable workflow (called by other workflows) + +**Artifact Structure:** +``` +/ +├── vi.lib/ +│ └── ActorFramework/ # From Core/ActorFramework/ +├── resource/ +│ ├── AFDebug/ # From Core/AFDebug/ +│ └── Framework/ +│ └── Providers/ # From Providers/ +└── menus/ # From Core/Menus/ +``` + +**Excluded Files:** +- `*.lvproj` - LabVIEW project files +- `*.vipb` - VI Package Builder files +- `*.aliases` - LabVIEW aliases files +- `*.lvlps` - LabVIEW project settings +- Paths listed in [`pipeline/config/artifact-exclusions.txt`](../../pipeline/config/artifact-exclusions.txt) + +**Manual Usage:** +1. Go to Actions tab in GitHub +2. Select "Create Distribution Artifact" workflow +3. Click "Run workflow" +4. Download the `actor-framework-distribution` artifact + +**Reusable Workflow Inputs:** +- `upload-artifact` (boolean, default: false) - Whether to upload as GitHub artifact + +### 2. Create Release (`release.yml`) + +Automatically creates a GitHub release with the distribution artifact when a version tag is pushed. The workflow yml can be found [here](/.github/workflows/release.yml). + +**Triggers:** +- Push of tags matching pattern `v*.*.*` (e.g., `v2.0.0`, `v1.0.1`, `v2.0.0.5`, `v1.0.0.0-rc`) + +**Process:** +1. Calls `create-distribution-artifact.yml` workflow +2. Downloads the created artifact +3. Compresses it into `actor-framework-distribution.zip` +4. Creates a GitHub release with: + - The ZIP file as release asset + - Auto-generated release notes + +**Usage:** +```bash +# Create and push a version tag +git tag v2.0.0.18 +git push origin v2.0.0.18 + +# The workflow runs automatically and creates the release +``` + +**Release Assets:** +- `actor-framework-distribution.zip` - Contains the complete framework in proper directory structure + +## Configuration Files + +### `pipeline/config/artifact-exclusions.txt` + +Text file containing paths to exclude from the distribution artifact. See the file [here](../../pipeline/config/artifact-exclusions.txt). + +**Format:** +- One path per line (relative to repository root) +- Lines starting with `#` are comments +- Empty lines are ignored +- Use backslashes for Windows paths: `Providers\Install Support` + +**Example:** +```text +# Installation support files +Providers\Install Support + +# Example exclusions (commented out) +# Examples\TestData +# Core\DeprecatedFeatures +``` + +**To add new exclusions:** +1. Edit `pipeline/config/artifact-exclusions.txt` +2. Add the path on a new line +3. Commit and push changes +4. Next workflow run will use updated exclusions + +## Scripts + +### `pipeline/scripts/Create_Distribution_Artifact.ps1` + +PowerShell script that handles the actual file copying and artifact structure creation. See the script [here](../../pipeline/scripts/Create_Distribution_Artifact.ps1). + +**Parameters:** +- `ExclusionFile` (string, optional) - Path to file containing exclusion patterns + - Default: `$PSScriptRoot\..\config\artifact-exclusions.txt` + +**Example:** +```powershell +# Use default exclusion file +.\pipeline\scripts\Create_Distribution_Artifact.ps1 + +# Use custom exclusion file +.\pipeline\scripts\Create_Distribution_Artifact.ps1 -ExclusionFile "path\to\custom-exclusions.txt" +``` + +**Logic:** +1. Reads exclusion paths from configuration file +2. Creates staging directory structure +3. Copies files from source directories +4. Excludes files based on: + - File extensions: `*.lvproj`, `*.vipb`, `*.aliases`, `*.lvlps` + - Paths listed in exclusion file +5. Maintains relative directory structure within each target location +6. Logs all excluded files and paths for troubleshooting + +## Development Guidelines + +### Adding New Exclusions + +**Recommended Method:** Edit the exclusion configuration file + +1. Open `pipeline/config/artifact-exclusions.txt` +2. Add new paths (one per line): + ```text + # Your comment explaining why + Path\To\Exclude + ``` +3. Commit and push changes + +**Alternative Method:** Override in workflow (not recommended for permanent exclusions) + +```yaml +- name: Create framework artifact structure + shell: pwsh + run: | + & "${{ github.workspace }}\pipeline\scripts\Create_Distribution_Artifact.ps1" -ExclusionFile "custom-exclusions.txt" +``` + +### Adding New File Extension Exclusions + +Edit `Create_Distribution_Artifact.ps1` and add to `$excludeExtensions`: + +```powershell +$excludeExtensions = @('*.lvproj', '*.vipb', '*.aliases', '*.lvlps', '*.your-extension') +``` + +### Adding New Source Directories + +Update `Create_Distribution_Artifact.ps1`: + +```powershell +# Add new directory creation +New-Item -ItemType Directory -Force -Path "$stagingDir\your\target\path" + +# Add copy operation +Copy-WithExclusions -SourcePath "Source\Path" -DestPath "$stagingDir\your\target\path" -Label "Description" +``` + +### Testing Changes + +Before pushing changes: + +1. **Test locally:** + ```powershell + cd c:\dev\actor-framework + .\pipeline\scripts\Create_Distribution_Artifact.ps1 + # Inspect artifact-staging/ directory + ``` + +2. **Test via workflow:** + - Go to Actions → "Create Distribution Artifact" + - Click "Run workflow" + - Download and verify artifact contents + +3. **Test release workflow (use test tag):** + ```bash + git tag v0.0.0-test + git push origin v0.0.0-test + # Delete after testing: git push --delete origin v0.0.0-test + ``` + +## Troubleshooting + +### Artifact is missing files +- Check workflow logs for exclusion warnings +- Verify source directories exist and contain expected files +- Review `pipeline/config/artifact-exclusions.txt` for unintended exclusions +- Ensure file extensions aren't in the `$excludeExtensions` list + +### Exclusions not working +- Verify exclusion file path is correct +- Check for typos in paths (case-sensitive on some systems) +- Ensure paths use backslashes: `Providers\Install Support` +- Review workflow logs for "Loaded X exclusion path(s)" message + +### Release workflow not triggering +- Verify tag matches pattern `v*.*.*` +- Check that tag was pushed to remote: `git push origin ` +- Review Actions tab for any errors +- Ensure you have permissions to create releases + +### Path issues on Windows +- The script normalizes paths (`/` → `\`) +- Use backslashes in exclusion file: `Providers\Install Support` +- Paths are relative to repository root +- Wildcards are supported in path matching + +### Script fails to find exclusion file +- Default location: `pipeline\config\artifact-exclusions.txt` +- Verify file exists and is committed to repository +- Check file is not excluded by `.gitignore` +- Use `-ExclusionFile` parameter to specify custom path + +## Related Documentation + +- [GitHub Actions Documentation](https://docs.github.com/en/actions) +- [Reusable Workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) +- [Creating Releases](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) \ No newline at end of file diff --git a/pipeline/config/artifact-exclusions.txt b/pipeline/config/artifact-exclusions.txt new file mode 100644 index 0000000..5e580a1 --- /dev/null +++ b/pipeline/config/artifact-exclusions.txt @@ -0,0 +1,9 @@ +# Artifact Exclusion List +# One path per line, relative to repository root +# Lines starting with # are comments + +# Installation support files +Providers\Install Support + +# Add future exclusions here +# Examples\TestData \ No newline at end of file diff --git a/pipeline/scripts/Create_Distribution_Artifact.ps1 b/pipeline/scripts/Create_Distribution_Artifact.ps1 new file mode 100644 index 0000000..401e5f5 --- /dev/null +++ b/pipeline/scripts/Create_Distribution_Artifact.ps1 @@ -0,0 +1,95 @@ +param( + [string]$ExclusionFile = "$PSScriptRoot\..\config\artifact-exclusions.txt" +) + +# Create artifact staging directory +$stagingDir = "artifact-staging" +New-Item -ItemType Directory -Force -Path $stagingDir +New-Item -ItemType Directory -Force -Path "$stagingDir\vi.lib\ActorFramework" +New-Item -ItemType Directory -Force -Path "$stagingDir\resource\AFDebug" +New-Item -ItemType Directory -Force -Path "$stagingDir\resource\Framework\Providers" +New-Item -ItemType Directory -Force -Path "$stagingDir\menus" + +# Define exclusion patterns +$excludeExtensions = @('*.lvproj', '*.vipb', '*.aliases', '*.lvlps') + +# Parse path exclusions from file +$excludePathsList = @() +if (Test-Path $ExclusionFile) { + Write-Host "Reading exclusions from: $ExclusionFile" + $excludePathsList = Get-Content $ExclusionFile | + Where-Object { $_ -notmatch '^\s*#' -and $_ -notmatch '^\s*$' } | + ForEach-Object { $_.Trim() } + + Write-Host "Loaded $($excludePathsList.Count) exclusion path(s)" +} else { + Write-Warning "Exclusion file not found: $ExclusionFile" +} + +# Helper function to check if path should be excluded +function Test-PathExcluded { + param($FilePath) + + foreach ($excludePath in $excludePathsList) { + $normalizedExclude = $excludePath -replace '/', '\' + if ($FilePath -like "*$normalizedExclude*") { + return $true + } + } + return $false +} + +# Helper function to copy files with exclusions +function Copy-WithExclusions { + param($SourcePath, $DestPath, $Label) + + Write-Host "Copying $Label" + Get-ChildItem -Path $SourcePath -Recurse -File | ForEach-Object { + $excluded = $false + + # Check file extension exclusions + foreach ($pattern in $excludeExtensions) { + if ($_.Name -like $pattern) { + Write-Warning "Excluding file: $($_.FullName)" + $excluded = $true + break + } + } + + # Check path exclusions + if (-not $excluded -and (Test-PathExcluded -FilePath $_.FullName)) { + Write-Warning "Excluding path: $($_.FullName)" + $excluded = $true + } + + if (-not $excluded) { + $relativePath = $_.FullName.Substring((Resolve-Path $SourcePath).Path.Length + 1) + $destFilePath = Join-Path $DestPath $relativePath + $destDir = Split-Path -Parent $destFilePath + + if (-not (Test-Path $destDir)) { + New-Item -ItemType Directory -Force -Path $destDir | Out-Null + } + + Copy-Item -Path $_.FullName -Destination $destFilePath -Force + Write-Host "Copied: $relativePath" + } + } +} + +# Copy Core\ActorFramework\ to vi.lib\ActorFramework\ +Copy-WithExclusions -SourcePath "Core\ActorFramework" -DestPath "$stagingDir\vi.lib\ActorFramework" -Label "Core\ActorFramework\ to vi.lib\ActorFramework\" + +# Copy Core\AFDebug\ to resource\AFDebug\ +Write-Host "`n" +Copy-WithExclusions -SourcePath "Core\AFDebug" -DestPath "$stagingDir\resource\AFDebug" -Label "Core\AFDebug\ to resource\AFDebug\" + +# Copy Core\Menus\ to menus\ +Write-Host "`n" +Copy-WithExclusions -SourcePath "Core\Menus" -DestPath "$stagingDir\menus" -Label "Core\Menus\ to menus\" + +# Copy Providers\ to resource\Framework\Providers\ +Write-Host "`n" +Copy-WithExclusions -SourcePath "Providers" -DestPath "$stagingDir\resource\Framework\Providers" -Label "Providers\ to resource\Framework\Providers\" + +Write-Host "`nArtifact preparation complete" \ No newline at end of file From 9c2c53abf8510e28325eedb25607c3d8e0751eb8 Mon Sep 17 00:00:00 2001 From: Krishna Sharma Date: Mon, 6 Apr 2026 14:28:09 +0530 Subject: [PATCH 2/9] 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 3/9] 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 4/9] 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 5/9] 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 6/9] 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 7/9] 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 8/9] 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 9/9] 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")