Repository navigation
129 lines (112 loc) · 4.11 KB
/
Copy pathruncpptest.yaml
File metadata and controls
129 lines (112 loc) · 4.11 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
127
128
129
name: CPP Tests
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- 'dsppp/**'
- '.github/workflows/runcpptest.yaml'
push:
branches: [main]
paths:
- 'dsppp/**'
- '.github/workflows/runcpptest.yaml'
permissions:
actions: read
security-events: write
jobs:
CI_cpp_test_run:
strategy:
max-parallel: 6
fail-fast: false
matrix:
# GCC currently has too many problems with the C++ API
compiler: [AC6, CLANG]
core: [M0, M4, M55]
dt: [F64_DT,COMPLEX_F32_DT,F32_DT,COMPLEX_F16_DT,F16_DT,COMPLEX_Q31_DT,Q31_DT,COMPLEX_Q15_DT,Q15_DT,Q7_DT]
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Python 3.10
uses: actions/setup-python@v7
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: Testing/requirements.txt
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libtinfo6
echo "LD_LIBRARY_PATH=${pythonLocation}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
- name: Activate vcpkg
uses: ARM-software/cmsis-actions/vcpkg@v1
with:
cache: '-tools-v1'
- name: Activate Arm tool license
uses: ARM-software/cmsis-actions/armlm@v1
- name: Cache boost
id: cache-boost
uses: actions/cache@v6
with:
key: boost-cmsis-dsp
restore-keys: |
boost-cmsis-dsp
path: ${{ github.workspace }}/boost_1_84_0
- name: Install boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
echo "Install boost"
curl -o boost.tar.gz https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz
tar -xf boost.tar.gz
- name: Cache CMSIS packs
uses: actions/cache@v6
with:
# Respect the activated pack root, or use the Linux default.
path: ${{ env.CMSIS_PACK_ROOT || '~/.cache/arm/packs' }}
key: cmsis-packs-${{ runner.os }}-v1-cpp-${{ hashFiles('dsppp/**/*.csolution.yml', 'dsppp/**/*.cproject.yml', 'dsppp/**/*.clayer.yml', 'dsppp/**/*.cbuild-pack.yml') }}
restore-keys: |
cmsis-packs-${{ runner.os }}-v1-cpp-
cmsis-packs-${{ runner.os }}-v1-
- name: Prepare framework
run: |
cd dsppp
echo "Create missing folders"
mkdir AC6_results
mkdir CLANG_results
mkdir GCC_results
echo "Install missing python packages"
pip install -r ../Testing/requirements.txt
echo "Load missing pack"
csolution list packs -s test.csolution.yml -m > required_packs.txt
cat required_packs.txt
cpackget add -a -f required_packs.txt
- name: Execute
id: execute
run: |
cd dsppp
echo "Running tests"
export LD_PRELOAD="${pythonLocation}/lib/libpython3.10.so"
python run_all.py -t -g ${{ matrix.compiler }} -c ${{ matrix.core }} --dt ${{matrix.dt}} -avh $AVH_FVP_PLUGINS/../bin
- name: Upload test report
if: ${{ !cancelled() && (steps.execute.outcome == 'success' || steps.execute.outcome == 'failure') }}
uses: actions/upload-artifact@v7
with:
name: test-cpp-report_${{ matrix.compiler }}_${{ matrix.core }}_${{ matrix.dt }}
path: dsppp/${{ matrix.compiler }}_results/errors_${{ matrix.core }}.txt
if-no-files-found: error
- name: Check error
if: ${{ !cancelled() && (steps.execute.outcome == 'success' || steps.execute.outcome == 'failure') }}
run: |
cd dsppp
echo "Checking output..."
report="${{ matrix.compiler }}_results/errors_${{ matrix.core }}.txt"
if [ ! -f "$report" ]; then
echo "::error::Missing C++ test error report: $report"
exit 1
fi
if [ -s "$report" ]; then
cat "$report"
echo "::error::C++ tests reported errors"
exit 1
fi