Automate LabVIEW headless builds, MassCompile, VI Analyzer, and other LabVIEWCLI operations in CI/CD pipelines using LabVIEW Docker containers.
This document describes the example LabVIEW CICD workflows and helper scripts included in this repository. These examples demonstrate how to integrate LabVIEW container images into automated pipelines using GitHub Actions (and GitLab CI/CD).
All CI/CD example resources live under examples/cicd-examples/:
examples/cicd-examples/
├── helper-scripts/
│ ├── masscompile/
│ │ ├── masscompile.sh
│ │ └── masscompile.ps1
│ ├── run-vi-analyzer/
│ │ ├── run-vi-analyzer.sh
│ │ └── run-vi-analyzer.ps1
│ └── vidiff/
│ ├── vidiff.sh
│ └── vidiff.ps1
└── Test-VIs/
├── ArthOps.vi
├── BeepWrapper.vi
├── CreateNewProj.vi
├── WriteToRandomFile.vi
└── via-configs/
├── via-config-pass.viancfg
└── via-config-fail.viancfg
- Workflow files: All GitHub Actions workflow files can be found in the
.github/workflows/folder. - Helper scripts: Example helper scripts for each operation are located in the
examples/cicd-examples/helper-scripts/folder, organized by operation name.
The Test-VIs/ folder contains a set of sample LabVIEW VIs used as targets for the CI/CD examples. These VIs are intentionally simple and are designed to exercise the MassCompile and VI Analyzer operations in the pipeline. The via-configs/ subfolder holds the VI Analyzer configuration files that define which tests to run against the Test-VIs.
Compiles all VIs in a target directory using LabVIEWCLI's MassCompile operation. This validates that VIs can be loaded and compiled without errors inside the LabVIEW Docker container — a key step in any LabVIEW automated builds pipeline.
Workflow files:
| Platform | Workflow |
|---|---|
| Linux | masscompile-linux-container.yml |
| Windows | masscompile-windows-container.yml |
These workflows run the MassCompile command inline — no helper script is needed.
Helper scripts (optional, for standalone use):
-
Script:
masscompile.sh(Linux / Bash)- Link:
helper-scripts/masscompile/masscompile.sh - Runs
LabVIEWCLI -OperationName MassCompileagainst the Test-VIs directory. - Configures the LabVIEW path and year via the
LV_YEARenvironment variable. - Exits with the LabVIEWCLI exit code.
- Link:
-
Script:
masscompile.ps1(Windows / PowerShell)- Link:
helper-scripts/masscompile/masscompile.ps1 - Accepts a
-WorkspaceRootparameter to locate the Test-VIs directory. - Runs
LabVIEWCLI -OperationName MassCompilewith-Headlessmode. - Exits with the LabVIEWCLI exit code.
- Link:
Runs static code analysis on the Test-VIs using LabVIEWCLI's RunVIAnalyzer operation with a VI Analyzer configuration file. The workflow invokes a helper script that handles parsing the results and failing the pipeline if any tests fail — enabling LabVIEW automation of code quality checks.
Workflow files:
| Platform | Workflow |
|---|---|
| Linux | run-vi-analyzer-linux-container.yml |
| Windows | run-vi-analyzer-windows-container.yml |
These workflows call the helper scripts below inside the container.
Helper scripts:
-
Script:
run-vi-analyzer.sh(Linux / Bash)- Link:
helper-scripts/run-vi-analyzer/run-vi-analyzer.sh - Validates that the VI Analyzer configuration file exists.
- Runs
LabVIEWCLI -OperationName RunVIAnalyzerwith the pass-case config. - Parses the results report and extracts the failed test count.
- Exits with code
1if any tests failed,0if all passed.
- Link:
-
Script:
run-vi-analyzer.ps1(Windows / PowerShell)- Link:
helper-scripts/run-vi-analyzer/run-vi-analyzer.ps1 - Accepts a
-WorkspaceRootparameter. - Validates that the VI Analyzer configuration file exists and creates the report directory if needed.
- Runs
LabVIEWCLI -OperationName RunVIAnalyzerwith the pass-case config. - Parses the results report using regex to extract the failed test count.
- Exits with code
1if any tests failed,0if all passed.
- Link:
Generates an HTML diff report comparing the base (main) and PR versions of each changed VI using LabVIEWCLI's CreateComparisonReport operation. The workflow automatically detects .vi files that changed in a pull request, runs the diff inside a LabVIEW container, publishes the reports to GitHub Pages, and posts a comment on the PR with links to each report.
Workflow files:
| Platform | Workflow |
|---|---|
| Linux | vidiff-linux-container.yml |
| Windows | vidiff-windows-container.yml |
These workflows:
- Detect
.vifiles changed in the PR. - Check out both the PR and base branch versions.
- Run the helper script inside the container to generate HTML diff reports.
- Deploy reports to GitHub Pages under
/vidiff/pr-<number>/<platform>/. - Post a comment on the PR with links to each individual report.
Helper scripts:
-
Script:
vidiff.sh(Linux / Bash)- Link:
helper-scripts/vidiff/vidiff.sh - Accepts workspace-relative paths to changed
.vifiles as arguments. - Compares each VI's base version (
/workspace-base/) against the PR version (/workspace/). - Runs
LabVIEWCLI -OperationName CreateComparisonReportwith-ReportType html. - Skips new or deleted VIs gracefully.
- Outputs reports to
/workspace/vidiff-reports/.
- Link:
-
Script:
vidiff.ps1(Windows / PowerShell)- Link:
helper-scripts/vidiff/vidiff.ps1 - Accepts
-WorkspaceRoot,-WorkspaceBaseRoot, and-VIFilesparameters. - Compares each VI's base version against the PR version.
- Runs
LabVIEWCLI -OperationName CreateComparisonReportwith-ReportType html. - Skips new or deleted VIs gracefully.
- Outputs reports to
$WorkspaceRoot\vidiff-reports\.
- Link:
Note: The VIDiff workflows require GitHub Pages to be enabled on your repository. The first run will automatically create the
gh-pagesbranch.
All workflows are configured to trigger on pull request events (opened, synchronized, reopened). To see the CI/CD examples in action:
- Fork this repository or create a branch.
- Modify any VI file in the
Test-VIs/folder (e.g., open a VI in LabVIEW, make a small change, and save). - Raise a Pull Request against this repository.
- The GitHub Actions workflows will automatically run MassCompile, VI Analyzer, and VIDiff against the modified VIs.
- Check the Actions tab on the PR to view the pipeline results.
- For VIDiff, check the PR comments for links to the HTML diff reports on GitHub Pages.
- GitLab CI/CD Integration — equivalent pipeline examples for GitLab
- General Examples — examples of running LabVIEW containers interactively