-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathAlgorithmTest_ST_B-U585I-IOT02A_MR.yaml
More file actions
126 lines (103 loc) · 4.06 KB
/
AlgorithmTest_ST_B-U585I-IOT02A_MR.yaml
File metadata and controls
126 lines (103 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# SPDX-FileCopyrightText: Copyright 2022-2025 Arm Limited and/or its
# affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Algorithm Test ST B-U585I-IOT02A (Motion Recognition)
on:
workflow_dispatch:
#pull_request:
# branches: [main]
#push:
# branches: [main]
#schedule:
# - cron: '00 20 * * 6'
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Activate vcpkg
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
config: ".ci/vcpkg-configuration-AC6.json"
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
- name: Install python
uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install PyYAML in .python_deps
run: |
mkdir -p .python_deps
python -m pip install --target .python_deps pyyaml
- name: Cache downloaded packs
uses: actions/cache@v5
with:
key: SDS
path: /home/runner/.cache/arm/packs/.Download
- name: Rename DataOutput.N.sds -> DataOutput.N.ref.sds
working-directory: ./ST/B-U585I-IOT02A/MotionRecognition/algorithm/SDS Recordings
run: |
for file in DataOutput.*.sds; do
# Skip if no matching files
[ -e "$file" ] || continue
# Insert ".ref" before .sds
newname="${file%.sds}.ref.sds"
echo "Renaming: $file -> $newname"
# Use git mv so the rename is tracked; fall back to mv if file is untracked
git mv --force -- "$file" "$newname" 2>/dev/null || mv -- "$file" "$newname"
done
- name: Build AlgorithmTest for ST B-U585I-IOT2A
working-directory: ./ST/B-U585I-IOT02A/MotionRecognition
run: |
cbuild SDS.csolution.yml --context AlgorithmTest.DebugPlay+AVH-SSE-300 --packs
- name: Execute Test cases
working-directory: ./ST/B-U585I-IOT02A/MotionRecognition
env:
PYTHONPATH: ${{ github.workspace }}/.python_deps
run: |
cp ../../../.ci/sdsio.yml . # configure test case execution
FVP_Corstone_SSE-300 -f Board/Corstone-300/fvp_config.txt -a out/AlgorithmTest/AVH-SSE-300/DebugPlay/AlgorithmTest.axf
- name: Compare SDS output files
working-directory: ./ST/B-U585I-IOT02A/MotionRecognition/algorithm/SDS Recordings
run: |
mkdir -p ../diff_artifacts # Create folder outside the recordings directory
# Find all *.ref.sds files
for file_ref in DataOutput.*.ref.sds; do
# Strip ".ref" to get the corresponding original file
file_orig="${file_ref/.ref/}"
echo "Comparing $file_ref with $file_orig ..."
if cmp -s "$file_ref" "$file_orig"; then
echo " ✅ Files are identical"
else
echo " ❌ Files differ"
# Copy both versions into the diff_artifacts folder
cp "$file_ref" "$file_orig" ../diff_artifacts/
fi
done
- name: Upload differing SDS files
uses: actions/upload-artifact@v7
with:
name: sds-diff-files
path: ST/B-U585I-IOT02A/MotionRecognition/algorithm/diff_artifacts
- name: Fail if diffs found
working-directory: ./ST/B-U585I-IOT02A/MotionRecognition/algorithm
run: |
if [ -n "$(ls -A diff_artifacts)" ]; then
echo "❌ Differences found in SDS files!"
exit 1
else
echo "✅ No differences found."
fi