Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
f8820a3
docs: sync runner labels and release notes
svelderrainruiz Aug 7, 2025
75ec693
docs: align runner labels and release behavior (#88)
svelderrainruiz Aug 7, 2025
b3ea183
docs: cleanup troubleshooting numbering
svelderrainruiz Aug 7, 2025
cd5e110
chore: rename build job and drop GPG docs (#89)
svelderrainruiz Aug 7, 2025
72e561c
docs: clarify CI workflow naming
svelderrainruiz Aug 7, 2025
fb25db1
docs: clarify CI workflow naming (#90)
svelderrainruiz Aug 7, 2025
99f55d4
docs: clarify CI composites and workflow references
svelderrainruiz Aug 7, 2025
75cf3e9
docs: clarify CI composites and workflow references (#91)
svelderrainruiz Aug 7, 2025
315515b
Clarify CI pipeline roles and runner labels
svelderrainruiz Aug 7, 2025
20916a4
doc: clarify CI pipeline responsibilities (#92)
svelderrainruiz Aug 7, 2025
3794119
docs: clarify composite actions and inputs
svelderrainruiz Aug 7, 2025
22b713c
docs: clarify composite actions and inputs (#94)
svelderrainruiz Aug 7, 2025
4948bc2
docs: clarify CI build number and gating
svelderrainruiz Aug 7, 2025
88e493e
docs: clarify CI build number and gating (#95)
svelderrainruiz Aug 7, 2025
6820264
docs: clarify conditional apply-deps and runner labels
svelderrainruiz Aug 7, 2025
39aec62
docs: clarify conditional apply-deps and runner labels (#96)
svelderrainruiz Aug 7, 2025
065fbf0
docs: clarify CI branch gating
svelderrainruiz Aug 7, 2025
7cc2213
docs: clarify CI workflow branch gating (#97)
svelderrainruiz Aug 7, 2025
5b45020
docs: clarify 64-bit vip generation
svelderrainruiz Aug 7, 2025
e2cb469
docs: clarify 64-bit vip generation (#98)
svelderrainruiz Aug 7, 2025
5472c7a
docs: explain default CI branding values
svelderrainruiz Aug 7, 2025
df810b5
docs: explain default CI branding values (#99)
svelderrainruiz Aug 7, 2025
06bc0cc
Remove obsolete unit-tests action
svelderrainruiz Aug 7, 2025
15abe02
Remove obsolete unit-tests action (#100)
svelderrainruiz Aug 7, 2025
d99bba1
docs: use checkout v4 in build-vi-package guide
svelderrainruiz Aug 7, 2025
368a5f9
docs: update checkout version in build-vi-package guide (#101)
svelderrainruiz Aug 7, 2025
2f15f1c
docs: clarify CI branch triggers and gating
svelderrainruiz Aug 7, 2025
ff1d7ad
docs: clarify CI branch triggers and issue gating (#102)
svelderrainruiz Aug 7, 2025
e3d70bc
fix ci issue branch detection
svelderrainruiz Aug 7, 2025
c27ceea
Fix PR branch detection in CI workflow (#103)
svelderrainruiz Aug 7, 2025
bfd1f82
docs: clarify bitness example
svelderrainruiz Aug 7, 2025
39e86b4
docs: clarify bitness example (#104)
svelderrainruiz Aug 7, 2025
8ef1c40
docs: fix compute-version link path
svelderrainruiz Aug 7, 2025
c934c25
docs: fix compute-version link path (#105)
svelderrainruiz Aug 7, 2025
5ad2737
docs: note checkout v4 in build package workflow
svelderrainruiz Aug 7, 2025
2fe36d4
docs: clarify checkout version in build package workflow (#106)
svelderrainruiz Aug 7, 2025
f07c306
docs: clarify 64-bit packaging
svelderrainruiz Aug 7, 2025
2ea9861
docs: clarify 64-bit packaging (#107)
svelderrainruiz Aug 7, 2025
2e629c3
docs: clarify default version bump
svelderrainruiz Aug 7, 2025
708f301
docs: clarify compute-version default behavior (#108)
svelderrainruiz Aug 7, 2025
aebd38a
docs: pin build-vi-package checkout to v3
svelderrainruiz Aug 7, 2025
f6c3599
docs: pin build-vi-package checkout to v3 (#109)
svelderrainruiz Aug 7, 2025
cc7f2db
docs: clarify release branch naming
svelderrainruiz Aug 7, 2025
d3b08e7
docs: clarify release branch naming (#110)
svelderrainruiz Aug 7, 2025
354129a
Support issue branch patterns
svelderrainruiz Aug 7, 2025
30ff07d
Support issue branch patterns in CI workflow (#111)
svelderrainruiz Aug 7, 2025
074821d
doc: note issue-status gate for release workflow
svelderrainruiz Aug 7, 2025
3ca7132
doc: note issue-status gate for release workflow (#112)
svelderrainruiz Aug 7, 2025
84c693a
docs: clarify version job runs compute-version action
svelderrainruiz Aug 7, 2025
af64a3a
docs: clarify compute-version action usage (#113)
svelderrainruiz Aug 7, 2025
05d16ad
Document version inputs for build actions
svelderrainruiz Aug 7, 2025
8a99474
Document version inputs for build actions (#114)
svelderrainruiz Aug 7, 2025
ea0a9ea
docs: update LabVIEW version to 2023
svelderrainruiz Aug 7, 2025
d7fa374
docs: update LabVIEW version to 2023 in CI snippet (#115)
svelderrainruiz Aug 7, 2025
947ed52
docs: update issue-status link
svelderrainruiz Aug 7, 2025
e0ef33b
docs: update issue-status link (#116)
svelderrainruiz Aug 7, 2025
e4a7c5b
docs: document issue branch pattern
svelderrainruiz Aug 7, 2025
98e4ffc
docs: document issue branch pattern (#117)
svelderrainruiz Aug 7, 2025
a28e031
docs: update checkout version
svelderrainruiz Aug 7, 2025
7d9ec88
docs: update checkout version in build-vi-package doc (#118)
svelderrainruiz Aug 7, 2025
6e4da09
docs: clarify issue branch naming
svelderrainruiz Aug 7, 2025
a3f50d3
docs: clarify issue branch naming for CI gating (#119)
svelderrainruiz Aug 7, 2025
cf30cb4
docs: update CI metadata injection example
svelderrainruiz Aug 7, 2025
828baa6
docs: update CI metadata injection example (#120)
svelderrainruiz Aug 7, 2025
22c1cbb
docs: note workflow_dispatch manual trigger
svelderrainruiz Aug 7, 2025
7d729b9
docs: note workflow_dispatch manual trigger (#121)
svelderrainruiz Aug 7, 2025
b63d697
docs: clarify build action usage
svelderrainruiz Aug 7, 2025
f383dd8
docs: clarify build action usage (#122)
svelderrainruiz Aug 7, 2025
9050042
docs: clarify issue-status reference
svelderrainruiz Aug 7, 2025
13a9611
docs: clarify issue-status gate reference (#123)
svelderrainruiz Aug 7, 2025
f1aec6d
docs: use checkout v3
svelderrainruiz Aug 7, 2025
627a092
docs: use checkout v3 in build-vi-package docs (#124)
svelderrainruiz Aug 7, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Runs **`build_vip.ps1`** to update a `.vipb` file's display info and build the V

## Quick-start
```yaml
- uses: ./.github/actions/build-vip
- uses: ./.github/actions/build-vi-package
with:
supported_bitness: 64
relative_path: ${{ github.workspace }}
Expand Down
18 changes: 0 additions & 18 deletions .github/actions/unit-tests/README.md

This file was deleted.

19 changes: 0 additions & 19 deletions .github/actions/unit-tests/action.yml

This file was deleted.

97 changes: 0 additions & 97 deletions .github/actions/unit-tests/unit_tests.ps1

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/ci-composite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- release-rc/*
- feature/*
- hotfix/*
- issue-*
pull_request:
branches:
- main
Expand All @@ -27,6 +28,7 @@ on:
- release-rc/*
- feature/*
- hotfix/*
- issue-*
types:
- opened
- synchronize
Expand All @@ -52,8 +54,10 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const branch = context.ref.replace('refs/heads/', '');
if (!branch.startsWith('issue-')) {
const branch = context.payload.pull_request?.head.ref ??
context.ref.replace('refs/heads/', '');
const match = branch.match(/(?:^|\/)issue-(\d+)/);
if (!match) {
core.setOutput('proceed', 'false');
const msg = `Branch '${branch}' is not issue-specific. CI will be skipped.`;
core.info(msg);
Expand All @@ -69,17 +73,6 @@ jobs:
);
return;
}
const match = branch.match(/^issue-(\d+)/);
if (!match) {
core.setOutput('proceed', 'false');
const msg = `Cannot parse issue number from branch '${branch}'`;
core.warning(msg);
fs.appendFileSync(
process.env.GITHUB_STEP_SUMMARY,
['### Issue Status', '', msg, ''].join('\n')
);
return;
}
const issueNumber = parseInt(match[1], 10);
const query = `
query($owner:String!, $repo:String!, $number:Int!){
Expand Down Expand Up @@ -258,7 +251,7 @@ jobs:
name: lv_icon_${{ matrix.suffix }}.lvlibp
path: resource/plugins/lv_icon_${{ matrix.suffix }}.lvlibp

build-vip:
build-vi-package:
name: Build VI Package
needs: [build-ppl, version]
runs-on: self-hosted-windows-lv
Expand Down Expand Up @@ -314,7 +307,7 @@ jobs:
commit: ${{ github.sha }}
release_notes_file: ${{ github.workspace }}/Tooling/deployment/release_notes.md
display_information_json: ${{ steps.display-info.outputs.json }}
- uses: ./.github/actions/build-vip
- uses: ./.github/actions/build-vi-package
with:
supported_bitness: 64
relative_path: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ All interactions should be respectful and follow our [Code of Conduct](CODE_OF_C
- **Issue Reference** – Link the issue number if one exists.
- **Testing** – How can reviewers test or reproduce the change?
8. **Respond to Feedback:** Maintainers will review your PR. You may see comments requesting changes or asking questions. This is a normal part of the process. Update your code as needed and push new commits; they will automatically be added to the PR.
9. **CI Builds:** When you open a PR, our continuous integration will automatically attempt to build the VI Package and run tests. You’ll see a check for the **Build VI Package** workflow – if it fails, inspect the logs (e.g., missing dependencies or failing tests) and update your code. Successful CI will produce a `.vip` artifact that maintainers and you can download to test your changes in LabVIEW.
9. **CI Builds:** When you open a PR, our continuous integration will automatically attempt to build the VI Package and run tests. You’ll see a check for the **CI Pipeline (Composite)** workflow with a job named **Build VI Package** – if it fails, inspect the logs (e.g., missing dependencies or failing tests) and update your code. Successful CI will produce a `.vip` artifact that maintainers and you can download to test your changes in LabVIEW.

> Note: When opening a PR, apply exactly one release label (major, minor, or patch) to request the version bump. The CI pipeline will fail if no label (or multiple labels) are set, since it relies on a single label to determine the new version.

Expand Down
2 changes: 1 addition & 1 deletion docs/automated-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ This document describes how to **build, test, and distribute** the **LabVIEW Ico
We provide **GitHub Actions** that wrap these same PowerShell scripts for building the Icon Editor:

- **Development Mode Toggle**: Uses `Set_Development_Mode.ps1` or `RevertDevelopmentMode.ps1`.
- **Run Unit Tests**: Calls `unit_tests.ps1`.
- **Run Unit Tests**: Calls `RunUnitTests.ps1`.
- **Build VI Package**: Internally calls `Build.ps1` to produce a `.vip` artifact (and can draft a release if configured).

### Injecting Organization/Repo for Unique Builds
Expand Down
32 changes: 20 additions & 12 deletions docs/ci-workflows.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Local CI/CD Workflows

This document explains how to automate build, test, and distribution steps for the Icon Editor using GitHub Actions. It includes features such as **fork-friendly GPG signing** toggles, **automatic version bumping** (using labels), and the **release creation** process. Additionally, it shows how you can **brand** the resulting VI Package with **organization** and **repository** metadata for unique identification.
This document explains how to automate build, test, and distribution steps for the Icon Editor using GitHub Actions. It includes features such as **automatic version bumping** (using labels) and **artifact upload**. Additionally, it shows how you can **brand** the resulting VI Package with **organization** and **repository** metadata for unique identification.

---

Expand All @@ -24,7 +24,6 @@ Automating your Icon Editor builds and tests:
- Minimizes manual toggling of LabVIEW environment settings
- Stores build artifacts (VI Packages) in GitHub for easy download
- Automatically versions releases using **semantic version** logic
- Handles GPG signing in the main repo but **disables** it for forks (so fork owners aren’t blocked by passphrase prompts)
- **Allows you to brand** each VI Package build with your organization or repository name for unique identification

**Prerequisites**:
Expand All @@ -48,17 +47,27 @@ Automating your Icon Editor builds and tests:

4. **Run Tests**
Use the main CI workflow (`ci-composite.yml`) to confirm your environment is valid.
- The workflow triggers on pushes to or pull requests targeting:
- `main`
- `develop`
- release branches: `release-alpha/*`, `release-beta/*`, `release-rc/*`
- feature branches: `feature/*`
- hotfix branches: `hotfix/*`
- issue branches: `issue-*`
- `workflow_dispatch` enables manual runs.
- Typically run with Dev Mode **disabled** unless you’re testing dev features specifically.
- An `issue-status` job gates execution: it skips all other jobs unless the source branch name contains `issue-<number>` (for example, `issue-123` or `feature/issue-123`) and the linked GitHub issue’s Status is **In Progress**. For pull requests, the check inspects the PR’s head branch. This gating helps avoid ambiguous runs for automated tools.

5. **Build VI Package**
- Produces `.vip` artifacts automatically, **including** optional metadata fields (`-CompanyName`, `-AuthorName`) that let you **brand** your package.
- Produces `.vip` artifacts automatically. By default, the workflow populates the **“Company Name”** with `github.repository_owner` and the **“Author Name”** with `github.event.repository.name`, so each build is branded with your GitHub account and repository.
- To use different branding, edit the **“Generate display information JSON”** step in [`.github/workflows/ci-composite.yml`](../.github/workflows/ci-composite.yml) and supply custom values for these fields.
- Uses **label-based** version bumping (major/minor/patch) on pull requests.

6. **Disable Dev Mode** (optional)
Reverts your environment to normal LabVIEW settings, removing local overrides.

> [!NOTE]
> Passing metadata fields like `-CompanyName` or `-AuthorName` to the build script helps incorporate your **organization** or **repo** name directly into the final VI Package. This makes your build easily distinguishable from other forks or variants.
> The workflow automatically brands the VI Package using the repository owner (`github.repository_owner`) and repository name (`github.event.repository.name`). Modify the “Generate display information JSON” step in `.github/workflows/ci-composite.yml` if you need different values.

---

Expand Down Expand Up @@ -87,23 +96,23 @@ Below are the **key GitHub Actions** provided in this repository:
- **Automatically** versions your code based on PR labels (`major`, `minor`, `patch`).
Direct pushes retain the previous version and increment only the build number.
- Uses a **build counter** to ensure each artifact is uniquely numbered (e.g., `v1.2.3-build4`).
- **Fork-Friendly**: Disables GPG signing if it detects a fork (so no passphrase is needed). In the **main repo** (`ni/labview-icon-editor`), signing remains active.
- **Fork-Friendly**: Runs in forks without requiring extra signing keys.
- Produces the `.vip` file via a PowerShell script (e.g., `Build.ps1`).
- **You can pass metadata** (e.g., `-CompanyName`, `-AuthorName`) to embed your organization or repository into the generated `.vip` for distinct branding.
- By default, “Company Name” and “Author Name” in the generated `.vip` come from `github.repository_owner` and `github.event.repository.name`. Update the “Generate display information JSON” step in [`ci-composite.yml`](../.github/workflows/ci-composite.yml) if you need custom values.
- Uploads the `.vip` artifact to GitHub’s build artifacts.

#### Jobs in CI workflow

The [`ci-composite.yml`](../.github/workflows/ci-composite.yml) pipeline breaks the build into several jobs:

- **issue-status** – ensures CI runs only on branches named `issue-<number>` whose linked GitHub issue has Status “In Progress”.
- **issue-status** – ensures CI runs only when the source branch name contains `issue-<number>` (such as `issue-123` or `feature/issue-123`) and the linked GitHub issue has Status “In Progress”. For pull requests, the job evaluates the PR’s head branch.
- **changes** – checks out the repository and detects `.vipc` file changes to determine if dependencies need to be applied.
- **apply-deps** – installs VIPC dependencies for multiple LabVIEW versions and bitnesses.
- **apply-deps** – installs VIPC dependencies for multiple LabVIEW versions and bitnesses **only when** the `changes` job reports `.vipc` modifications (`if: needs.changes.outputs.vipc == 'true'`).
- **version** – computes the semantic version and build number using commit count and PR labels.
- **missing-in-project-check** – verifies every source file is referenced in the `.lvproj`.
- **test** – runs LabVIEW unit tests across the supported matrix.
- **build-ppl** – uses a matrix to build 32-bit and 64-bit packed libraries.
- **build-vip** – packages the final VI Package using the built libraries and version information.
- **build-vi-package** – packages the final VI Package using the built libraries and version information. In `ci-composite.yml` this job passes `supported_bitness: 64`, so it produces only a 64-bit `.vip`.

The `build-ppl` job uses a matrix to produce both bitnesses rather than distinct jobs.

Expand All @@ -122,7 +131,7 @@ The `build-ppl` job uses a matrix to produce both bitnesses rather than distinct
Go to **Settings → Actions → Runners** in your GitHub repository (or organization) and follow the steps to register a runner on your machine that has LabVIEW installed.

3. **Label the Runner** (optional):
- You may label it `self-hosted, iconeditor` (or adjust the workflow’s `runs-on` lines to match your chosen labels).
- Use labels such as `self-hosted-windows-lv` (and `self-hosted-linux-lv` for Linux). Adjust the workflow’s `runs-on` lines to match your runner labels.
- This helps ensure the correct environment is used for building the Icon Editor.

---
Expand Down Expand Up @@ -165,7 +174,7 @@ Although GitHub Actions primarily run on GitHub-hosted or self-hosted agents, yo

4. **Merge the PR** into `develop` (or `main`):
- The **Build VI Package** workflow builds and uploads the `.vip` artifact.
- **Inside** that `.vip`, the fields for **“Company Name”** and **“Author Name (Person or Company)”** can reflect your **organization** or **repo**, ensuring it’s easy to identify which fork or team produced the build.
- **Inside** that `.vip`, the **“Company Name”** and **“Author Name (Person or Company)”** fields are filled automatically using `github.repository_owner` and `github.event.repository.name`. Modify the “Generate display information JSON” step in `.github/workflows/ci-composite.yml` to override them.

5. **Disable Development Mode**:
- Switch LabVIEW back to normal mode.
Expand All @@ -176,7 +185,6 @@ Although GitHub Actions primarily run on GitHub-hosted or self-hosted agents, yo
## Final Notes

- **Artifact Storage**: The `.vip` file is accessible under the Actions run summary (click “Artifacts”).
- **Forking**: If another user forks your repo, the new **fork** sees GPG signing disabled automatically, preventing passphrase errors.
- **Version Enforcement**: Pull requests without a version label default to `patch`; you can enforce labeling with an optional “Label Enforcer” step if desired.
- **Branding**: To highlight the **organization** or **repository** behind a particular build, simply pass `-CompanyName` and `-AuthorName` (or similar parameters) into the `Build.ps1` script. This metadata flows into the final **Display Information** of the Icon Editor’s VI Package.

Expand Down
Loading