Skip to content

Commit 3d5dd2d

Browse files
authored
rename: TxApp -> dvledtx, fix innersource URLs, update license headers #1 from OpenVisualCloud/rename-paths
Renamed the application from TxApp to dvledtx across all source files, headers, configs, build system, and docs. Added BSD-3-Clause headers to all files. Fixed innersource URLs to point to the public GitHub repo. Removed BOM from meson.build files that was causing build failures. Refactored CI into five reusable composite actions: environment-check, build-dvledtx, smoke-tests, unit-tests, and static-analysis. Environment-check runs first and gates everything — it verifies APT packages, pip packages, system libraries, build dependencies via pkg-config, static analysis tools, and confirms FFmpeg is patched with the MTL plugin. Build action compiles two binaries (dvledtx-ffmpeg and dvledtx-mtl) and saves them outside the build directory so the clean step between builds does not wipe them. Smoke tests run -v on each binary to validate the version string and --help to confirm the binary runs. All four workflows (pull_request, daily_build, ci, trivy) now follow the same sequential structure with a single checkout, single cleanup, and all reports collected in one reports directory uploaded as a single artifact.
2 parents 8e36fca + b5b6611 commit 3d5dd2d

35 files changed

Lines changed: 688 additions & 556 deletions

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# Instructions For Reviewers
1+
## Description
22

3-
List any helpful information for reviewer
43

54
## Checklist
65

@@ -35,10 +34,3 @@ What kind of change does this PR introduce?
3534
- [ ] Documentation content changes
3635
- [ ] Testing
3736
- [ ] Other... Please describe:
38-
39-
## Story or Task IDs
40-
41-
Reference the Story or Task IDs for this PR:
42-
ITEP-
43-
44-
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# BSD 3-Clause License
3+
# Copyright (C) 2026 Intel Corporation
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
name: 'Build dvledtx'
7+
description: 'Build dvledtx with FFMPEG and MTL TX APIs, keep both binaries, run binary size/symbol check for each'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Build with FFMPEG TX APIs
13+
shell: bash
14+
run: |
15+
echo "===== Build: FFMPEG TX APIs ====="
16+
./scripts/build.sh
17+
if [ ! -f "./build/dvledtx" ]; then
18+
echo "ERROR: dvledtx not found after FFMPEG build!"
19+
exit 1
20+
fi
21+
mkdir -p ./bins
22+
cp ./build/dvledtx ./bins/dvledtx-ffmpeg
23+
echo "FFMPEG build saved: $(file ./bins/dvledtx-ffmpeg)"
24+
25+
- name: Build with MTL TX APIs
26+
shell: bash
27+
run: |
28+
echo "===== Build: MTL TX APIs ====="
29+
./scripts/build.sh -Denable_mtl_tx=true
30+
if [ ! -f "./build/dvledtx" ]; then
31+
echo "ERROR: dvledtx not found after MTL build!"
32+
exit 1
33+
fi
34+
mkdir -p ./bins
35+
cp ./build/dvledtx ./bins/dvledtx-mtl
36+
echo "MTL build saved: $(file ./bins/dvledtx-mtl)"
37+
38+
- name: Binary size and symbol check
39+
shell: bash
40+
run: |
41+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
42+
mkdir -p "$REPORT_DIR"
43+
44+
for BINARY in ./bins/dvledtx-ffmpeg ./bins/dvledtx-mtl; do
45+
NAME=$(basename "$BINARY")
46+
echo "" | tee -a "$REPORT_DIR/binary-report.txt"
47+
echo "===== $NAME: Binary Size =====" | tee -a "$REPORT_DIR/binary-report.txt"
48+
size "$BINARY" | tee -a "$REPORT_DIR/binary-report.txt"
49+
50+
echo "" | tee -a "$REPORT_DIR/binary-report.txt"
51+
echo "===== $NAME: Shared Library Dependencies =====" | tee -a "$REPORT_DIR/binary-report.txt"
52+
readelf -d "$BINARY" | grep NEEDED | tee -a "$REPORT_DIR/binary-report.txt"
53+
54+
echo "" | tee -a "$REPORT_DIR/binary-report.txt"
55+
echo "===== $NAME: Undefined External Symbols =====" | tee -a "$REPORT_DIR/binary-report.txt"
56+
nm -u "$BINARY" | tee -a "$REPORT_DIR/binary-report.txt"
57+
done
58+
59+
echo "Binary report saved to $REPORT_DIR/binary-report.txt"
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
#
2+
# BSD 3-Clause License
3+
# Copyright (C) 2026 Intel Corporation
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
name: 'Environment Check'
7+
description: 'Verify required libraries and tools are available on the runner'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Check APT packages
13+
shell: bash
14+
run: |
15+
echo "===== APT Package Check ====="
16+
PKGS="git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libssl-dev systemtap-sdt-dev llvm clang flex byacc libcmocka-dev"
17+
MISSING=""
18+
for pkg in $PKGS; do
19+
if dpkg -s "$pkg" &>/dev/null; then
20+
echo " [OK] $pkg"
21+
else
22+
echo " [MISSING] $pkg"
23+
MISSING="$MISSING $pkg"
24+
fi
25+
done
26+
if [ -n "$MISSING" ]; then
27+
echo "ERROR: Missing packages:$MISSING"
28+
exit 1
29+
fi
30+
echo "All required APT packages present."
31+
32+
- name: Check pip packages
33+
shell: bash
34+
run: |
35+
echo "===== pip Package Check ====="
36+
PIP_PKGS="pyelftools ninja gcovr"
37+
MISSING=""
38+
for pkg in $PIP_PKGS; do
39+
if pip3 show "$pkg" &>/dev/null; then
40+
echo " [OK] $pkg"
41+
else
42+
echo " [MISSING] $pkg"
43+
MISSING="$MISSING $pkg"
44+
fi
45+
done
46+
if [ -n "$MISSING" ]; then
47+
echo "ERROR: Missing pip packages:$MISSING"
48+
exit 1
49+
fi
50+
echo "All required pip packages present."
51+
52+
- name: Check static analysis tools
53+
shell: bash
54+
run: |
55+
echo "===== Static Analysis Tools Check ====="
56+
MISSING=""
57+
for TOOL in cppcheck flawfinder shellcheck codespell; do
58+
if command -v "$TOOL" &>/dev/null; then
59+
echo " [OK] $TOOL ($(command -v "$TOOL"))"
60+
else
61+
echo " [MISSING] $TOOL"
62+
MISSING="$MISSING $TOOL"
63+
fi
64+
done
65+
if [ -n "$MISSING" ]; then
66+
echo "ERROR: Missing static analysis tools:$MISSING"
67+
exit 1
68+
fi
69+
echo "All required static analysis tools present."
70+
71+
- name: Check system libraries
72+
shell: bash
73+
run: |
74+
echo "===== System Library Check ====="
75+
MISSING=""
76+
for LIB in m pthread; do
77+
if ldconfig -p | grep -q "lib${LIB}\.so"; then
78+
echo " [OK] lib${LIB}"
79+
else
80+
echo " [MISSING] lib${LIB}"
81+
MISSING="$MISSING lib${LIB}"
82+
fi
83+
done
84+
if [ -n "$MISSING" ]; then
85+
echo "ERROR: Missing system libraries:$MISSING"
86+
exit 1
87+
fi
88+
echo "All required system libraries present."
89+
90+
- name: Check build dependencies via pkg-config
91+
shell: bash
92+
run: |
93+
echo "===== Build Dependency Check (pkg-config) ====="
94+
if ! command -v pkg-config &>/dev/null; then
95+
echo "ERROR: pkg-config not found"
96+
exit 1
97+
fi
98+
echo " [OK] pkg-config ($(pkg-config --version)) at $(command -v pkg-config)"
99+
100+
MISSING=""
101+
for DEP in libavformat libavcodec libavutil libswscale libavdevice mtl; do
102+
if pkg-config --exists "$DEP" 2>/dev/null; then
103+
VER=$(pkg-config --modversion "$DEP" 2>/dev/null || echo "unknown")
104+
echo " [OK] $DEP ($VER)"
105+
else
106+
echo " [MISSING] $DEP"
107+
MISSING="$MISSING $DEP"
108+
fi
109+
done
110+
if [ -n "$MISSING" ]; then
111+
echo "ERROR: Missing build dependencies (dev libraries not installed):$MISSING"
112+
exit 1
113+
fi
114+
echo "All required build dependencies present."
115+
116+
- name: Check FFmpeg MTL plugin in avdevices
117+
shell: bash
118+
run: |
119+
echo "===== FFmpeg MTL Plugin Check ====="
120+
if ! command -v ffmpeg &>/dev/null; then
121+
echo "ERROR: ffmpeg binary not found"
122+
exit 1
123+
fi
124+
echo " ffmpeg: $(ffmpeg -version 2>&1 | head -1)"
125+
126+
DEVICES=$(ffmpeg -devices 2>&1)
127+
if echo "$DEVICES" | grep -qi "mtl"; then
128+
MTL_DEVICES=$(echo "$DEVICES" | grep -i "mtl")
129+
echo " [OK] MTL device(s) registered in FFmpeg avdevices:"
130+
echo "$MTL_DEVICES" | sed 's/^/ /'
131+
else
132+
echo " [MISSING] No MTL device found in FFmpeg avdevices."
133+
echo " Registered devices:"
134+
echo "$DEVICES" | grep -E "^\s+(D |E | DE)" | sed 's/^/ /' || true
135+
echo "ERROR: FFmpeg is not patched with the MTL plugin."
136+
exit 1
137+
fi
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# BSD 3-Clause License
3+
# Copyright (C) 2026 Intel Corporation
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
name: 'Smoke Tests'
7+
description: 'Run smoke tests on dvledtx-ffmpeg and dvledtx-mtl binaries. Results written to $GITHUB_WORKSPACE/reports/'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Smoke test
13+
shell: bash
14+
run: |
15+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
16+
mkdir -p "$REPORT_DIR"
17+
18+
for BINARY in ./bins/dvledtx-ffmpeg ./bins/dvledtx-mtl; do
19+
NAME=$(basename "$BINARY")
20+
echo "===== Smoke Test: $NAME ====="
21+
OUTFILE="$REPORT_DIR/smoke-test-${NAME}.txt"
22+
23+
# version check
24+
VERSION_OUTPUT=$(timeout 5s "$BINARY" -v 2>&1)
25+
if ! echo "$VERSION_OUTPUT" | grep -qE "^dvledtx version [0-9]+\.[0-9]+\.[0-9]+"; then
26+
echo "ERROR: $NAME -v output did not match expected format 'dvledtx version X.Y.Z'"
27+
echo "Got: $VERSION_OUTPUT"
28+
exit 1
29+
fi
30+
echo " [OK] $NAME -v: $VERSION_OUTPUT"
31+
32+
# help check
33+
timeout 5s "$BINARY" --help > "$OUTFILE" 2>&1 || true
34+
if [ ! -s "$OUTFILE" ]; then
35+
echo "ERROR: $NAME produced no output during smoke test."
36+
exit 1
37+
fi
38+
echo "Smoke test passed for $NAME. Output:"
39+
cat "$OUTFILE"
40+
done
41+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#
2+
# BSD 3-Clause License
3+
# Copyright (C) 2026 Intel Corporation
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
name: 'Static Analysis'
7+
description: 'Run cppcheck, flawfinder, shellcheck, and codespell. Reports written to $GITHUB_WORKSPACE/reports/'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: cppcheck
13+
shell: bash
14+
run: |
15+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
16+
mkdir -p "$REPORT_DIR"
17+
echo "===== cppcheck Static Analysis ====="
18+
cppcheck \
19+
--enable=warning,style,performance,portability \
20+
--std=c11 --force --inline-suppr \
21+
--suppress=missingIncludeSystem \
22+
-Iinclude src 2>&1 | tee "$REPORT_DIR/cppcheck-report.txt" || true
23+
echo "cppcheck scan complete. Report: $REPORT_DIR/cppcheck-report.txt"
24+
25+
- name: flawfinder
26+
shell: bash
27+
run: |
28+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
29+
mkdir -p "$REPORT_DIR"
30+
echo "===== flawfinder Security Analysis ====="
31+
flawfinder --minlevel=3 --dataonly src include 2>&1 | tee "$REPORT_DIR/flawfinder-report.txt" || true
32+
echo "flawfinder scan complete. Report: $REPORT_DIR/flawfinder-report.txt"
33+
34+
- name: shellcheck scripts
35+
shell: bash
36+
run: |
37+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
38+
mkdir -p "$REPORT_DIR"
39+
echo "===== shellcheck Script Analysis ====="
40+
shellcheck scripts/build.sh scripts/test.sh 2>&1 | tee "$REPORT_DIR/shellcheck-report.txt" || true
41+
echo "shellcheck scan complete. Report: $REPORT_DIR/shellcheck-report.txt"
42+
43+
- name: codespell
44+
shell: bash
45+
run: |
46+
REPORT_DIR="$GITHUB_WORKSPACE/reports"
47+
mkdir -p "$REPORT_DIR"
48+
echo "===== codespell Spell Check ====="
49+
codespell \
50+
--skip="./.git,./build" \
51+
--ignore-words-list=mtl,st20p,st30p \
52+
. 2>&1 | tee "$REPORT_DIR/codespell-report.txt" || true
53+
echo "codespell scan complete. Report: $REPORT_DIR/codespell-report.txt"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# BSD 3-Clause License
3+
# Copyright (C) 2026 Intel Corporation
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
name: 'Run Unit Tests'
7+
description: 'Execute unit tests and save results to reports/'
8+
9+
runs:
10+
using: composite
11+
steps:
12+
- name: Execute unit tests
13+
shell: bash
14+
run: |
15+
echo "Executing Unit Tests..."
16+
mkdir -p "$GITHUB_WORKSPACE/reports"
17+
./scripts/test.sh 2>&1 | tee "$GITHUB_WORKSPACE/reports/unit-test-results.txt"
18+
echo "Unit Tests executed successfully"

0 commit comments

Comments
 (0)