@@ -50,12 +50,30 @@ jobs:
5050 run : |
5151 mkdir -p .python_deps
5252 python -m pip install --target .python_deps pyyaml
53+
5354 - name : Cache downloaded packs
5455 uses : actions/cache@v4
5556 with :
5657 key : SDS
5758 path : /home/runner/.cache/arm/packs/.Download
5859
60+ - name : Rename DataOutput.N.sds -> DataOutput.N.ref.sds
61+ working-directory : ./ST/B-U585I-IOT02A/algorithm/SDS Recordings
62+ run : |
63+
64+ for file in DataOutput.*.sds; do
65+
66+ # Skip if no matching files
67+ [ -e "$file" ] || continue
68+
69+ # Insert ".ref" before .sds
70+ newname="${file%.sds}.ref.sds"
71+
72+ echo "Renaming: $file -> $newname"
73+ # Use git mv so the rename is tracked; fall back to mv if file is untracked
74+ git mv --force -- "$file" "$newname" 2>/dev/null || mv -- "$file" "$newname"
75+ done
76+
5977 - name : Build AlgorithmTest for ST B-U585I-IOT2A
6078 working-directory : ./ST/B-U585I-IOT02A
6179 run : |
6886 run : |
6987 cp ../../.ci/sdsio.yml . # configure test case execution
7088 FVP_Corstone_SSE-300 -f Board/Corstone-300/fvp_config.txt -a out/AlgorithmTest/AVH-SSE-300/DebugPlay/AlgorithmTest.axf
89+
90+ - name : Compare SDS output files
91+ working-directory : ./ST/B-U585I-IOT02A/algorithm/SDS Recordings
92+ run : |
93+
94+ mkdir -p ../diff_artifacts # Create folder outside the recordings directory
95+
96+ # Find all *.ref.sds files
97+ for file_ref in DataOutput.*.ref.sds; do
98+ # Strip ".ref" to get the corresponding original file
99+ file_orig="${file_ref/.ref/}"
100+
101+ echo "Comparing $file_ref with $file_orig ..."
102+
103+ if cmp -s "$file_ref" "$file_orig"; then
104+ echo " ✅ Files are identical"
105+ else
106+ echo " ❌ Files differ"
107+ # Copy both versions into the diff_artifacts folder
108+ cp "$file_ref" "$file_orig" ../diff_artifacts/
109+ fi
110+ done
111+
112+ - name : Upload differing SDS files
113+ uses : actions/upload-artifact@v4
114+ with :
115+ name : sds-diff-files
116+ path : ST/B-U585I-IOT02A/algorithm/diff_artifacts
117+
118+ - name : Fail if diffs found
119+ working-directory : ./ST/B-U585I-IOT02A/algorithm
120+ run : |
121+ if [ -n "$(ls -A diff_artifacts)" ]; then
122+ echo "❌ Differences found in SDS files!"
123+ exit 1
124+ else
125+ echo "✅ No differences found."
126+ fi
0 commit comments