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
32 changes: 32 additions & 0 deletions .github/workflows/checkIpfixElemets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: checkIpfixElements

on: [workflow_call]

jobs:
ipfix-elements-checks:
runs-on: ubuntu-latest
container: oraclelinux:9
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
dnf install -y dnf-plugins-core epel-release cpp
dnf copr enable @CESNET/NEMEA
dnf install cesnet-ipfix-elements
- name: Check IPFIX elements
run: |
cd include/ipfixprobe
diff_output=$(comm -23 \
<(echo -e '#include "ipfix-elements.hpp"\n#define F(ENUMBER, EID, LENGTH, SOURCE) \
e ## ENUMBER ## id ## EID\n#define X(FIELD) FIELD(F),\nstart\nIPFIX_ENABLED_TEMPLATES(X)\n \
' | cpp | sed -n '/^start/,$p;' | sed 's/start//; s/, \?/\n/g' | sort | uniq) \
<(/opt/libfds/bin/get-ipfix-elementlist-from-libfds.py /opt/libfds/system/elements/* | sort | uniq))

if [ -n "$diff_output" ]; then
echo "Missing IPFIX elements:"
echo "$diff_output"
exit 1
else
echo "All IPFIX elements are present."
fi
4 changes: 4 additions & 0 deletions .github/workflows/ciEntryPoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ jobs:
uses: ./.github/workflows/rpm-install.yml
with:
os: ${{ matrix.os }}

ipfix-elements-check:
needs: [rpm-build]
uses: ./.github/workflows/checkIpfixElemets.yml