Skip to content
Open

Demo #51

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2ca45bc
Update runlabview.sh
aphill93 Oct 20, 2025
15b3849
Update vi-analyzer-container.yml
aphill93 Oct 28, 2025
c4db1d9
Update vi-analyzer-container.yml
aphill93 Oct 28, 2025
c8de190
replacing Test config file with passing test
aphill93 Oct 28, 2025
e9111eb
Update runlabview.sh
aphill93 Nov 3, 2025
8fa0305
Create temporary directory for LabVIEW compilation
aphill93 Nov 3, 2025
e9b9e4b
Make LV CLI verbose
aphill93 Nov 3, 2025
2d8dc60
Update Docker image version in workflow
aphill93 Nov 3, 2025
338ee59
Fix syntax error in runlabview.sh
aphill93 Nov 3, 2025
e9b37f2
Update LabVIEW Docker image version in workflow
aphill93 Nov 3, 2025
b8a50f5
Update Tests Cases to Fail
aphill93 Nov 4, 2025
7a1aa5f
Add LABVIEW_PATH variable to runlabview.sh
aphill93 Nov 4, 2025
7320929
Update configuration file path in runlabview.sh
aphill93 Nov 4, 2025
007f6e9
Update LabVIEW configuration file path
aphill93 Nov 4, 2025
337b251
Update configuration file path in runlabview.sh
aphill93 Nov 4, 2025
5dc4d09
Update LabVIEW configuration file path
aphill93 Nov 4, 2025
3ed7fcd
Update configuration file path in runlabview.sh
aphill93 Nov 4, 2025
8f593d2
Update LabVIEW config file path in runlabview.sh
aphill93 Jan 16, 2026
73e8315
Update configuration file path in runlabview.sh
gregr-ni Jan 16, 2026
8d23bb8
Update configuration file path in runlabview.sh
gregr-ni Jan 28, 2026
71506ea
Update configuration file path in runlabview.sh
gregr-ni Jan 28, 2026
e94c2a2
Initial plan
Copilot Feb 24, 2026
8dc85b0
Add vi-compare.yml workflow and runvicompare.sh script
Copilot Feb 24, 2026
ddd754f
Switch vi-compare to 2026q1-windows container with CreateComparisonRe…
Copilot Feb 24, 2026
0cba408
update cli command line comments and parameters
gregr-ni Feb 24, 2026
d117d18
Add separate Linux/Windows vi-compare workflows with artifact upload …
Copilot Feb 24, 2026
f846526
vi change
Feb 25, 2026
165758d
Fix PS1 syntax error: replace UTF-8 checkmark with ASCII [OK]
Copilot Feb 25, 2026
1708d29
Add LabVIEW path variable for report generation
gregr-ni Feb 25, 2026
89a9f6c
Fix LabVIEWPath argument formatting in script
gregr-ni Feb 25, 2026
e10318d
Fix command substitution for LabVIEWCLI output
gregr-ni Feb 25, 2026
3643636
Update LabVIEWCLI command options in runvicompare.ps1
gregr-ni Feb 25, 2026
65672f4
Update Docker image version in workflow
gregr-ni Feb 25, 2026
e9f8806
Remove duplicate OperationName parameter
gregr-ni Feb 25, 2026
e271752
Add LabVIEWPath variable for LabVIEW executable
gregr-ni Feb 25, 2026
1e21970
Add headless option to LabVIEW CLI command
gregr-ni Feb 25, 2026
2eddf65
Update Docker image version in workflow
gregr-ni Feb 25, 2026
8f93a1d
disable all but linux compare
Feb 26, 2026
542e7d9
Fix upload failure and add per-file artifact uploads
Copilot Feb 26, 2026
2d09adb
parameter order
gregr-ni Feb 26, 2026
1f8ab49
Display LabVIEWCLI command before execution
gregr-ni Feb 26, 2026
fd89823
Update LabVIEW path to version 2026
gregr-ni Feb 26, 2026
6ea1698
parameter order
Feb 27, 2026
1776049
Add GitHub Pages deployment for direct HTML report viewing
Copilot Feb 27, 2026
d978354
more VI changes
Feb 27, 2026
4f549c4
Merge branch 'copilot/add-vi-compare-workflow' of https://github.com/…
Feb 27, 2026
a944ac3
Add Pages setup error message and remove redundant artifact uploads
Copilot Feb 27, 2026
1522ee6
add PrintToSingleFileHtml operation
Feb 27, 2026
4903b19
Merge branch 'copilot/add-vi-compare-workflow' of https://github.com/…
Feb 27, 2026
8cb780a
Use PrintToSingleFileHtml for added/deleted VIs; add -AdditionalOpera…
Copilot Feb 27, 2026
c15d3e7
Fix space-in-filename links, move scripts to VICompareTooling, re-ena…
Copilot Feb 27, 2026
878f72c
Update runlabview.sh
sganjoo Mar 2, 2026
39c660d
Update runlabview.sh
sganjoo Mar 2, 2026
002bbf8
Merge pull request #2 from aphill93/copilot/add-vi-compare-workflow
aphill93 Mar 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/vi-analyzer-container.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Run LabVIEWCLI on Linux Container

on:
pull_request:
types:
- opened
- synchronize
- reopened
# on:
# pull_request:
# types:
# - opened
# - synchronize
# - reopened

jobs:
run-vi-analyzer:
Expand All @@ -15,20 +15,20 @@ jobs:
uses: actions/checkout@v3

# Authenticate to Docker Hub
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_UNAME }}
password: ${{ secrets.GHCR_PAT }}
#- name: Log in to GitHub Container Registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ secrets.GHCR_UNAME }}
#password: ${{ secrets.GHCR_PAT }}

- name: Pull Docker Image from Docker Hub
run: docker pull ghcr.io/shivacode-2/labview:2025q3-linux-beta
run: docker pull nationalinstruments/labview:2025q3-linux

- name: Run LabVIEWCLI Operations
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
ghcr.io/shivacode-2/labview:2025q3-linux-beta \
nationalinstruments/labview:2025q3-linux \
bash -c "cd /workspace && chmod +x runlabview.sh && ./runlabview.sh"

139 changes: 139 additions & 0 deletions .github/workflows/vi-compare-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: VI Compare (Linux)

# Prerequisite (one-time, requires admin):
# Go to Settings → Pages → Build and deployment → Source → GitHub Actions → Save.
# Without this the "Deploy to GitHub Pages" step will fail with a clear error message.

on:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
run-vi-compare-linux:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pages: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Compute Changed Files and Prepare Base Versions
run: |
# Write tab-separated STATUS<TAB>FILE lines for changed .vi files.
# STATUS: A=added, D=deleted, M=modified.
# Run git diff separately so errors are not masked by grep's exit code.
git diff --name-status "origin/${{ github.base_ref }}...HEAD" \
> /tmp/vi-diff-all.txt
grep '\.vi$' /tmp/vi-diff-all.txt \
> "${{ github.workspace }}/changed-files.txt" || true

echo "Changed VI files:"
cat "${{ github.workspace }}/changed-files.txt"

# Create a git worktree for the base branch so binary .vi files can be
# compared safely without manual extraction.
git worktree add "${{ github.workspace }}/vi-base" "origin/${{ github.base_ref }}"

- name: Pull Docker Image from Docker Hub
run: docker pull nationalinstruments/labview:2026q1-linux

- name: Run CreateComparisonReport on Changed Files
run: |
docker run --rm \
-v "${{ github.workspace }}:/workspace" \
nationalinstruments/labview:2026q1-linux \
bash -c "chmod +x /workspace/VICompareTooling/runvicompare.sh && /workspace/VICompareTooling/runvicompare.sh"

- name: Fix report file permissions
if: always()
run: |
if [ -d "${{ github.workspace }}/vi-compare-reports" ]; then
sudo chmod -R a+r "${{ github.workspace }}/vi-compare-reports"
fi

- name: Upload reports to GitHub Pages
id: upload-pages
if: always() && hashFiles('vi-compare-reports/*.html') != ''
uses: actions/upload-pages-artifact@v3
with:
path: vi-compare-reports/

- name: Deploy to GitHub Pages
id: deploy-pages
if: always() && steps.upload-pages.outcome == 'success'
uses: actions/deploy-pages@v4
continue-on-error: true

- name: Check GitHub Pages setup
if: always() && steps.deploy-pages.outcome == 'failure'
run: |
echo ""
echo "=========================================================="
echo " GitHub Pages deployment failed — admin setup required"
echo "=========================================================="
echo ""
echo " A repo admin must complete the following one-time setup:"
echo ""
echo " 1. Go to https://github.com/${{ github.repository }}/settings/pages"
echo " 2. Under 'Build and deployment', set Source to 'GitHub Actions'"
echo " 3. Click Save"
echo ""
echo " This setting requires admin access to the repository."
echo "=========================================================="
echo "::error::GitHub Pages is not configured. A repo admin must go to Settings → Pages → Source → GitHub Actions and click Save. See the step log for details."
exit 1

- name: Post PR Comment with Report Links
if: always() && steps.deploy-pages.outcome == 'success'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const changedFilesPath = path.join(process.env.GITHUB_WORKSPACE, 'changed-files.txt');
if (!fs.existsSync(changedFilesPath)) return;

// Each line is: STATUS\tpath/to/file.vi
// STATUS: A=added, D=deleted, M=modified
const entries = fs.readFileSync(changedFilesPath, 'utf8')
.split('\n')
.map(l => l.trim())
.filter(l => l.includes('\t') && l.endsWith('.vi'))
.map(l => {
const [status, file] = l.split('\t', 2);
return { status: status.trim(), file: file.trim() };
});

if (entries.length === 0) return;

const pagesUrl = '${{ steps.deploy-pages.outputs.page_url }}';
const base = pagesUrl.endsWith('/') ? pagesUrl : pagesUrl + '/';

let body = '### VI Comparison Reports (Linux)\n\n';
body += '| VI File | Change | Report |\n|---------|--------|--------|\n';
for (const { status, file } of entries) {
const baseName = path.basename(file, '.vi');
const isModified = status === 'M';
const reportFile = isModified
? `${baseName}-diff-report.html`
: `${baseName}-print-report.html`;
const changeLabel = status === 'A' ? 'Added'
: status === 'D' ? 'Deleted'
: 'Modified';
body += `| \`${file}\` | ${changeLabel} | [${reportFile}](${base}${encodeURIComponent(reportFile)}) |\n`;
}

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body
});
141 changes: 141 additions & 0 deletions .github/workflows/vi-compare-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: VI Compare (Windows)

# Prerequisite (one-time, requires admin):
# Go to Settings → Pages → Build and deployment → Source → GitHub Actions → Save.
# Without this the "Deploy to GitHub Pages" step will fail with a clear error message.

on:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
run-vi-compare-windows:
runs-on: windows-latest
permissions:
contents: read
pull-requests: write
pages: write
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Compute Changed Files and Prepare Base Versions
shell: pwsh
run: |
# Write tab-separated STATUS<TAB>FILE lines for changed .vi files.
# STATUS: A=added, D=deleted, M=modified.
$lines = git diff --name-status "origin/${{ github.base_ref }}...HEAD" |
Where-Object { $_ -match '\.vi$' }

Write-Host "Changed VI files:"
$lines | ForEach-Object { Write-Host " $_" }

# Create a git worktree for the base branch so binary .vi files can be
# compared safely without manual extraction.
git worktree add "${{ github.workspace }}\vi-base" "origin/${{ github.base_ref }}"

# Write the list to a file so the container can read it without
# multiline environment-variable encoding issues.
if ($null -eq $lines) {
New-Item -ItemType File -Path "${{ github.workspace }}\changed-files.txt" -Force | Out-Null
} else {
$lines | Out-File -FilePath "${{ github.workspace }}\changed-files.txt" `
-Encoding utf8NoBOM
}

- name: Pull Docker Image from Docker Hub
run: docker pull nationalinstruments/labview:2026q1-windows

- name: Run CreateComparisonReport on Changed Files
shell: pwsh
run: |
docker run --rm `
-v "${{ github.workspace }}:C:\workspace" `
nationalinstruments/labview:2026q1-windows `
powershell -File C:\workspace\VICompareTooling\runvicompare.ps1

- name: Upload reports to GitHub Pages
id: upload-pages
if: always() && hashFiles('vi-compare-reports/*.html') != ''
uses: actions/upload-pages-artifact@v3
with:
path: vi-compare-reports/

- name: Deploy to GitHub Pages
id: deploy-pages
if: always() && steps.upload-pages.outcome == 'success'
uses: actions/deploy-pages@v4
continue-on-error: true

- name: Check GitHub Pages setup
if: always() && steps.deploy-pages.outcome == 'failure'
shell: pwsh
run: |
Write-Host ""
Write-Host "=========================================================="
Write-Host " GitHub Pages deployment failed — admin setup required"
Write-Host "=========================================================="
Write-Host ""
Write-Host " A repo admin must complete the following one-time setup:"
Write-Host ""
Write-Host " 1. Go to https://github.com/${{ github.repository }}/settings/pages"
Write-Host " 2. Under 'Build and deployment', set Source to 'GitHub Actions'"
Write-Host " 3. Click Save"
Write-Host ""
Write-Host " This setting requires admin access to the repository."
Write-Host "=========================================================="
Write-Host "::error::GitHub Pages is not configured. A repo admin must go to Settings -> Pages -> Source -> GitHub Actions and click Save. See the step log for details."
exit 1

- name: Post PR Comment with Report Links
if: always() && steps.deploy-pages.outcome == 'success'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const changedFilesPath = path.join(process.env.GITHUB_WORKSPACE, 'changed-files.txt');
if (!fs.existsSync(changedFilesPath)) return;

// Each line is: STATUS\tpath/to/file.vi
// STATUS: A=added, D=deleted, M=modified
const entries = fs.readFileSync(changedFilesPath, 'utf8')
.split('\n')
.map(l => l.trim())
.filter(l => l.includes('\t') && l.endsWith('.vi'))
.map(l => {
const [status, file] = l.split('\t', 2);
return { status: status.trim(), file: file.trim() };
});

if (entries.length === 0) return;

const pagesUrl = '${{ steps.deploy-pages.outputs.page_url }}';
const base = pagesUrl.endsWith('/') ? pagesUrl : pagesUrl + '/';

let body = '### VI Comparison Reports (Windows)\n\n';
body += '| VI File | Change | Report |\n|---------|--------|--------|\n';
for (const { status, file } of entries) {
const baseName = path.basename(file, '.vi');
const isModified = status === 'M';
const reportFile = isModified
? `${baseName}-diff-report.html`
: `${baseName}-print-report.html`;
const changeLabel = status === 'A' ? 'Added'
: status === 'D' ? 'Deleted'
: 'Modified';
body += `| \`${file}\` | ${changeLabel} | [${reportFile}](${base}${encodeURIComponent(reportFile)}) |\n`;
}

await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body
});
Binary file modified Test-VIs/ArthOps.vi
Binary file not shown.
Binary file modified Test-VIs/BeepWrapper.vi
Binary file not shown.
Binary file added Test-VIs/NewThing.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added VICompareTooling/PrintToSingleFileHtml/GetHelp.vi
Binary file not shown.
Binary file not shown.
Binary file added VICompareTooling/PrintToSingleFileHtml/Open VI.vi
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading