Skip to content

Add build workflow using vipm-io/action-vipm-build #7

Add build workflow using vipm-io/action-vipm-build

Add build workflow using vipm-io/action-vipm-build #7

Workflow file for this run

name: build (action)
# Builds the VI Package using the reusable vipm-io/action-vipm-build action,
# which encapsulates the container display/headless-LabVIEW plumbing and runs
# refresh -> install -> build. Compare with the inline Build job in ci.yml.
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
# The LabVIEW container defaults to `sh`; use `bash` for predictable syntax.
defaults:
run:
shell: bash
env:
LABVIEW_IMAGE: 2026q1patch2-linux
# vipm reads this from the environment; the default 60s liveliness window
# is too tight for this build (matches the value used in ci.yml).
VIPM_DESKTOP_LIVELINESS_TIMEOUT: 300
container:
image: nationalinstruments/labview:2026q1patch2-linux
steps:
- name: Install git for actions/checkout
# git is required by actions/checkout but is not in the base LabVIEW image.
run: apt-get update && apt-get install -y git
- name: Checkout code
uses: actions/checkout@v6
- name: Cache VIPM packages
uses: actions/cache@v5
env:
CACHE_VERSION: 1
with:
path: /usr/local/jki/vipm/cache/
key: vipm-v${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ env.LABVIEW_IMAGE }}-${{ hashFiles('source/.vipc', 'error.dragon') }}
restore-keys: |
vipm-v${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ env.LABVIEW_IMAGE }}-
- name: Refresh, install dependencies, and build the VI Package
id: build
# Pinned to the head commit of vipm-io/action-vipm-build#1, which adds
# channel-aware "latest" resolution for the preview/develop channels.
uses: vipm-io/action-vipm-build@0b9ba53221c4d7434385c2d023acf9c82e5d2078
with:
path: source # auto-finds source/.vipb
refresh: 'true'
install: |
error.dragon
output_directory: dist
# LabVIEW version is auto-detected from the container (2026).
vipm_release_type: preview # VIPM Linux builds ship on the preview channel
# Track the latest preview build; resolves to the preview channel's
# latest_preview alias (requires action-vipm-build#1).
vipm_version: latest
community_edition: 'true'
show_progress: 'true'
verbose: 'true'
- name: Upload Built Package as Artifact
uses: actions/upload-artifact@v7
with:
name: vi-package-${{ env.LABVIEW_IMAGE }}
path: dist/*.vip