Validate that every file on disk that should live in a LabVIEW project actually appears in the .lvproj
.
The check is executed as the first step in your CI pipeline so the run fails fast and you never ship a package or run a unit test with a broken project file.
Internally the action launches the MissingInProjectCLI.vi
utility (checked into the same directory) through g‑cli.
Results are returned as standard GitHub Action outputs so downstream jobs can decide what to do next (for example, post a comment with the missing paths).
Requirement | Notes |
---|---|
Ubuntu runner | LabVIEW and g‑cli are available on Ubuntu. |
LabVIEW >= 2020 |
Must match the numeric version you pass in lv-ver . |
g‑cli in PATH |
The action calls g-cli --lv-ver … . Install from NI Package Manager or copy the executable into the runner image. |
PowerShell 7 | Composite steps use PowerShell Core (pwsh ). |
Name | Required | Example | Description |
---|---|---|---|
lv-ver |
Yes | 2021 |
LabVIEW major version number that should be used to run MissingInProjectCLI.vi |
supported-bitness |
Yes | 32 or 64 |
Bitness of the LabVIEW runtime to launch |
project-file |
No | source/MyPlugin.lvproj |
Path (absolute or relative to repository root) of the project to inspect. Defaults to lv_icon.lvproj |
Name | Type | Meaning |
---|---|---|
passed |
true \| false |
true when no missing files were detected and the VI ran without error |
missing-files |
string |
Comma‑separated list of relative paths that are absent from the project (empty on success) |
# .github/workflows/ci-composite.yml – missing-in-project-check (excerpt)
jobs:
missing-in-project-check:
needs: [changes, apply-deps]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Verify no files are missing from the project
id: mip
uses: ./.github/actions/missing-in-project
with:
lv-ver: 2021
supported-bitness: 64
- name: Print report
if: $
run: echo "Missing: $"
If you want any missing file to abort the pipeline immediately, place the step in an independent job at the top of your DAG and let every other job depend on it:
jobs:
missing-in-project-check:
needs: [changes, apply-deps]
runs-on: ubuntu-latest
strategy:
matrix:
supported_bitness: [32, 64]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/missing-in-project
with:
lv-ver: 2021
supported-bitness: $
build-package:
needs: missing-in-project-check
…
project-file
to an absolute path and throws if the file doesn’t exist.MissingInProjectCLI.vi
through g‑climissing_files.txt
passed
, missing-files
) and an exit code (0, 1, 2).Exit | Scenario | Typical fix |
---|---|---|
0 | No missing files; VI ran successfully | Nothing to do |
1 | g‑cli or the VI crashed (parsing failed) | Ensure g‑cli is in PATH , LabVIEW version matches lv-ver , VI dependencies are present |
2 | The VI completed and found at least one missing file | Add the file(s) to the project or delete them from disk |
Symptom | Hint |
---|---|
“g‑cli executable not found” | Verify g‑cli is installed and on PATH |
“Project file not found” | Double‑check the value of project-file ; relative paths are resolved against GITHUB_WORKSPACE |
Step times out | Large projects can be slow to load; consider bumping the job’s default timeout. |
pwsh -File .github/actions/missing-in-project/Invoke-MissingInProjectCLI.ps1 `
-LVVersion 2021 `
-SupportedBitness 64 `
-ProjectFile 'C:\path\to\MyProj.lvproj'
echo "Exit code: $LASTEXITCODE"
type .github/actions/missing-in-project/missing_files.txt
See also: docs/actions/missing-in-project.md
This directory inherits the root repository’s license (MIT, unless otherwise noted).