Skip to content

Action Contracts (API)

Sergio Velderain edited this page Aug 27, 2025 · 1 revision

Action Contracts (API)

Status: ✅ Stable Summary: API-like definitions of reusable actions, inputs, behavior, outputs; wrapper-to-dispatcher call flow.

Wrapper to Dispatcher to LabVIEW

sequenceDiagram
 participant WF as Reusable Action
 participant PS as Dispatcher
 participant GC as G-CLI
 participant LV as LabVIEW
 WF->>PS: Inputs ("bitness, min LV, dry_run, log_level")
 PS->>GC: Invoke target LabVIEW and VI
 GC->>LV: Headless VI execution
 LV-->>GC: Exit code and logs
 GC-->>PS: Propagate status
 PS-->>WF: Artifacts and status
Loading

run-unit-tests@v1

Input Description
minimum_supported_lv_version Minimum LabVIEW version expected
supported_bitness "32" or "64"
dry_run Simulate without writes
log_level INFO or DEBUG
Behavior: Runs tests headlessly; non-zero fails job.
Outputs: Test logs and summary artifacts.

build-lvlibp@v1

Input Description
supported_bitness "32" or "64"
dry_run / log_level Optional diagnostics
Behavior: Builds PPL for requested bitness.
Outputs: Bitness-specific PPL artifact.

build-vi-package@v1

Input Description
(implicit) Consumes PPL artifacts from both bitnesses
dry_run / log_level Optional diagnostics
Behavior: Merges x86/x64 into a single .vip.
Outputs: Versioned .vip artifact (attached or released).

Failure Modes (per Action)

Action Symptom Likely Cause Quick Check Resolution
run-unit-tests Non-zero; contains 'Test failed' Failing unit tests Inspect test summary Fix tests; re-run
run-unit-tests Could not start LabVIEW Version/bitness not available Verify installs Install required LV
run-unit-tests g-cli not found PATH missing G-CLI g-cli --help Apply VIPC; fix PATH
build-lvlibp Compilation failed Source error or dependency Build locally Fix source; apply VIPC
build-lvlibp Bitness mismatch Requested bitness not installed Confirm LV bitness Install or adjust inputs
build-vi-package Missing x86/x64 artifact One build leg failed Matrix results Fix failing leg; re-run
build-vi-package VIPM repack failed VIPM missing or script error Check VIPM Install/repair VIPM

Example Input Payloads

jobs:
  build:
    runs-on: [self-hosted, windows]
    steps:
      - uses: actions/checkout@v4
      - uses: LabVIEW-Community-CI-CD/open-source/run-unit-tests@v1
        with:
          minimum_supported_lv_version: "2021"
          supported_bitness: "64"
          log_level: "INFO"
      - uses: LabVIEW-Community-CI-CD/open-source/build-lvlibp@v1
        with:
          supported_bitness: "64"
      - uses: LabVIEW-Community-CI-CD/open-source/build-lvlibp@v1
        with:
          supported_bitness: "32"
      - uses: LabVIEW-Community-CI-CD/open-source/build-vi-package@v1
        with:
          log_level: "INFO"

Expected Artifacts

Stage Path Pattern Notes
Unit Tests artifacts/tests/*.xml JUnit or summary logs
Build (x64) artifacts/ppl/x64/*.lvlibp Built PPL 64-bit
Build (x86) artifacts/ppl/x86/*.lvlibp Built PPL 32-bit
Package artifacts/vip/*.vip Merged .vip

See also: Workflow Semantics & Reusable ActionsPackaging & Release Artifacts

↑ Back to top

Clone this wiki locally