Skip to content

M2A: bounded continuous PTP–SMV phase authority and guarded ESP32-P4 observer #1664

M2A: bounded continuous PTP–SMV phase authority and guarded ESP32-P4 observer

M2A: bounded continuous PTP–SMV phase authority and guarded ESP32-P4 observer #1664

name: Control Interop Harness CI
on:
push:
branches:
- "agent/phase-4d-c5-control-interoperability"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- 'tools/control_interop_probe/**'
- 'include/ariec61850/control/**'
- 'src/control/**'
- 'include/ariec61850/mms/**'
- 'src/mms/**'
- 'include/ariec61850/asn1/**'
- 'src/asn1/**'
- 'include/ariec61850/osi/**'
- 'src/osi/**'
- 'include/ariec61850/acse/**'
- 'src/acse/**'
- '.github/workflows/control-interop-harness-ci.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
control-interop:
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
name: Control Interop Harness / ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gcc
- os: ubuntu-latest
compiler: clang
- os: windows-latest
compiler: msvc
steps:
- uses: actions/checkout@v4
- name: Select compiler
if: runner.os == 'Linux'
shell: bash
run: |
if [ "${{ matrix.compiler }}" = "clang" ]; then
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"
else
echo "CC=gcc" >> "$GITHUB_ENV"
echo "CXX=g++" >> "$GITHUB_ENV"
fi
- name: Configure C5 harness
shell: bash
run: cmake -S tools/control_interop_probe -B build-control-interop
- name: Build C5 harness
shell: bash
run: cmake --build build-control-interop --config Release --parallel
- name: Run offline safety self-test
shell: bash
run: ctest --test-dir build-control-interop -C Release --output-on-failure
- name: Stage Linux harness and contract
if: runner.os == 'Linux'
shell: bash
run: |
mkdir -p evidence/control-interop
./build-control-interop/ariec61850_control_interop_probe --self-test \
| tee evidence/control-interop/self-test-${{ matrix.compiler }}.txt
./build-control-interop/ariec61850_control_interop_probe --help \
> evidence/control-interop/help-${{ matrix.compiler }}.txt
./build-control-interop/ariec61850_control_inventory_probe --self-test \
| tee evidence/control-interop/inventory-self-test-${{ matrix.compiler }}.txt
./build-control-interop/ariec61850_control_inventory_probe --help \
> evidence/control-interop/inventory-help-${{ matrix.compiler }}.txt
cp build-control-interop/ariec61850_control_interop_probe \
evidence/control-interop/ariec61850_control_interop_probe-${{ matrix.compiler }}
cp build-control-interop/ariec61850_control_inventory_probe \
evidence/control-interop/ariec61850_control_inventory_probe-${{ matrix.compiler }}
- name: Stage Windows harness and contract
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path evidence/control-interop | Out-Null
$exe = 'build-control-interop/Release/ariec61850_control_interop_probe.exe'
$inventory = 'build-control-interop/Release/ariec61850_control_inventory_probe.exe'
& $exe --self-test | Tee-Object -FilePath evidence/control-interop/self-test-msvc.txt
& $exe --help | Out-File -Encoding utf8 evidence/control-interop/help-msvc.txt
& $inventory --self-test | Tee-Object -FilePath evidence/control-interop/inventory-self-test-msvc.txt
& $inventory --help | Out-File -Encoding utf8 evidence/control-interop/inventory-help-msvc.txt
Copy-Item $exe evidence/control-interop/ariec61850_control_interop_probe.exe
Copy-Item $inventory evidence/control-interop/ariec61850_control_inventory_probe.exe
- name: Upload C5 harness evidence and binary
uses: actions/upload-artifact@v4
with:
name: control-interop-harness-${{ matrix.compiler }}
path: evidence/control-interop
if-no-files-found: error