Build LabVIEW Project #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build LabVIEW Project | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build LabVIEW | |
runs-on: windows-latest | |
env: | |
RELATIVE_PATH: ${{ github.workspace }} | |
SCRIPTS_PATH: ${{ github.workspace }}\.github\scripts\powershell | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Step to add C:\Program Files\G-CLI\bin to the PATH | |
- name: Add G-CLI to PATH | |
shell: pwsh | |
run: | | |
$env:PATH = "$env:PATH;C:\Program Files\G-CLI\bin" | |
Write-Host "Updated PATH: $env:PATH" | |
# Test invocation of g-cli | |
g-cli --help | |
- name: Clean Up Old .lvlibp Files | |
shell: pwsh | |
run: | | |
$PluginsPath = "${{ env.RELATIVE_PATH }}\resource\plugins" | |
Write-Host "Cleaning up .lvlibp files in $PluginsPath..." | |
if (Test-Path -Path $PluginsPath) { | |
Get-ChildItem -Path $PluginsPath -Filter '*.lvlibp' | Remove-Item -Force -ErrorAction SilentlyContinue | |
Write-Host "Cleanup complete." | |
} else { | |
Write-Host "Plugins folder not found. Skipping cleanup." | |
} | |
- name: Set agent into development mode | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Set_Development_Mode.ps1 -RelativePath "${{ env.RELATIVE_PATH }}" | |
- name: Apply Dependencies 2021 (32-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Applyvipc.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath "${{ env.RELATIVE_PATH }}" -VIPCPath "Tooling\deployment\Dependencies.vipc" -VIP_LVVersion 2021 | |
- name: Run Unit Tests 2021 (32-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\RunUnitTests.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath "${{ env.RELATIVE_PATH }}" | |
- name: Build LV Library 2021 (32-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Build_lvlibp.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath "${{ env.RELATIVE_PATH }}" | |
- name: Rename File After Build 2021 (32-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
$CurrentFile = "${{ env.RELATIVE_PATH }}\resource\plugins\lv_icon.lvlibp" | |
.\Rename-File.ps1 -CurrentFilename $CurrentFile -NewFilename "lv_icon_x86.lvlibp" | |
- name: Apply Dependencies 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Applyvipc.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 64 -RelativePath "${{ env.RELATIVE_PATH }}" -VIPCPath "Tooling\deployment\Dependencies.vipc" -VIP_LVVersion 2021 | |
- name: Run Unit Tests 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\RunUnitTests.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 64 -RelativePath "${{ env.RELATIVE_PATH }}" | |
- name: Build LV Library 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Build_lvlibp.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 64 -RelativePath "${{ env.RELATIVE_PATH }}" | |
- name: Rename File After Build 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
$CurrentFile = "${{ env.RELATIVE_PATH }}\resource\plugins\lv_icon.lvlibp" | |
.\Rename-File.ps1 -CurrentFilename $CurrentFile -NewFilename "lv_icon_x64.lvlibp" | |
- name: Build VI Package 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\build_vip.ps1 -SupportedBitness 64 -RelativePath "${{ env.RELATIVE_PATH }}" -VIPBPath "Tooling\deployment\NI Icon editor.vipb" -VIP_LVVersion 2021 -MinimumSupportedLVVersion 2021 | |
- name: Close LabVIEW 2021 (64-bit) | |
shell: pwsh | |
working-directory: ${{ env.SCRIPTS_PATH }} | |
run: | | |
.\Close_LabVIEW.ps1 -MinimumSupportedLVVersion 2021 -SupportedBitness 64 |