Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 42 additions & 0 deletions .github/actions/verify-codesys/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Verify CODESYS Startup"
description: "Verify CODESYS starts successfully with the correct profile"

inputs:
codesys-executable:
description: "Path to CODESYS executable"
required: true
generation:
description: "CODESYS generation (e.g., 3.5.21.0)"
required: true
patch:
description: "CODESYS patch version"
required: true

runs:
using: composite
steps:
- name: Verify CODESYS starts with profile
shell: pwsh
run: |
$codesysExe = "${{ inputs.codesys-executable }}"
$generation = "${{ inputs.generation }}"
$patch = ${{ inputs.patch }}

$genParts = $generation -split '\.'
$spNumber = $genParts[2]
if ($patch -eq 0) {
$profile = "CODESYS V3.5 SP$spNumber"
} else {
$profile = "CODESYS V3.5 SP$spNumber Patch $patch"
}

Write-Host "Verifying CODESYS startup with profile: $profile"

$process = Start-Process -FilePath $codesysExe -ArgumentList "--noUI", "--profile=`"$profile`"" -Wait -PassThru -NoNewWindow

if ($process.ExitCode -eq 0) {
Write-Host "CODESYS started successfully"
} else {
Write-Host "CODESYS failed with exit code: $($process.ExitCode)"
exit 1
}
Loading