-
Notifications
You must be signed in to change notification settings - Fork 1
275 lines (221 loc) · 8.27 KB
/
per.yml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
###############################################################################
#
# Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
# Analog Devices, Inc.),
# Copyright (C) 2023-2024 Analog Devices, Inc.
#
# 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: PER
concurrency:
group: ${{ github.workflow }}-&{{ github.ref }}
cancel-in-progress: true
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
env:
RESULTS_DIR: __results__
jobs:
run_per_tests:
runs-on: [self-hosted, btm-ci]
if: github.event.pull_request.draft == false
steps:
- name: envsetup
run: |
resource_manager -v
FULL_RESULTS_DIR=${GITHUB_WORKSPACE}/$RESULTS_DIR
echo "FULL_RESULTS_DIR=${GITHUB_WORKSPACE}/${RESULTS_DIR}" >> $GITHUB_ENV
# printenv | grep FULL_RESULTS_DIR
mkdir -p $FULL_RESULTS_DIR
- uses: actions/checkout@v4
with:
submodules: false
repository: analogdevicesinc/msdk
ref: fix/me18_gcr
fetch-depth: 0
# - name: Clean
# run: |
# echo $PATH
# git scorch
# rm -f *.zip
- name: Clone and build RF-PHY
run: |
git branch
git clone https://github.com/Analog-Devices-MSDK/RF-PHY ./Libraries/RF-PHY
(cd Libraries/RF-PHY && make all)
# - name: Get Targets
# uses: Analog-Devices-MSDK/btm-ci-scripts/actions/find-board@per-integration
# id: targets
# with:
# target: |
# MAX32655
# MAX32690
# NRF52840
# group: RFPHY
- name: Parse Targets
id: target_ids
run: |
# targets=$TARGET_STR
echo "max32655=max32655_board_3" >> $GITHUB_OUTPUT
targets=${targets##$ME17 }
# echo "max32690=${targets%% *}" >> $GITHUB_OUTPUT
echo "max32690=max32690_board_A1" >> $GITHUB_OUTPUT
# targets=${targets##$ME18 }
echo "nrf52840=nRF52840_1" >> $GITHUB_OUTPUT
env:
TARGET_STR: ${{ steps.targets.outputs.board_ids }}
- name: Lock Resources
# uses: Analog-Devices-MSDK/btm-ci-scripts/actions/lock-board@per-integration
# with:
# boards: |
# ${{ steps.target_ids.outputs.max32655 }}
# ${{ steps.target_ids.outputs.max32690 }}
# ${{ steps.target_ids.outputs.nrf52840 }}
# minicircuits_rf_switch
# minicircuits_rcdat6000
# lock: true
env:
max32655: ${{ steps.target_ids.outputs.max32655 }}
max32690: ${{ steps.target_ids.outputs.max32690 }}
nrf52840: ${{ steps.target_ids.outputs.nrf52840 }}
run: |
resource_manager -l $max32655 $max32690 $nrf52840 minicircuits_rf_switch minicircuits_rcdat6000 --owner $GITHUB_REF
# - name: Flash DUTs
# # uses: Analog-Devices-MSDK/btm-ci-scripts/actions/ocdflash@per-integration
# # with:
# # board:
# # ${{ steps.target_ids.outputs.max32655 }}
# # ${{ steps.target_ids.outputs.max32690 }}
# # project: BLE5_ctr
# # build: true
# # suppress_output: true
# env:
# max32655: ${{ steps.target_ids.outputs.max32655 }}
# max32690: ${{ steps.target_ids.outputs.max32690 }}
# run: |
# echo $max32655
# make -j -C Examples/MAX32690/Bluetooth/BLE5_ctr BOARD=WLP_V1
# make -j -C Examples/MAX32655/Bluetooth/BLE5_ctr
# ocdflash $max32655 Examples/MAX32655/Bluetooth/BLE5_ctr/build/max32655.elf $GITHUB_REF
# ocdflash $max32690 Examples/MAX32690/Bluetooth/BLE5_ctr/build/max32690.elf $GITHUB_REF
# echo 655 $max32655
# echo 690 $max32690
# give time for device cal and proper reset
# sleep 2
- name: Test MAX32690
run: |
set +e
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 1M --results results/per_dtm_results_1M)
dtm_1m=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 2M --results results/per_dtm_results_2M)
dtm_2m=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S2 --results results/per_dtm_results_S2 --num-packets 100)
dtm_s2=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S8 --results results/per_dtm_results_S8 --num-packets 100)
dtm_s8=$?
overall=0
if [[ $dtm_1m -ne 0 ]]; then
echo DTM 1M failure
overall=1
fi
if [[ $dtm_2m -ne 0 ]]; then
echo DTM 2M failure
overall=1
fi
if [[ $dtm_s2 -ne 0 ]]; then
echo DTM S2 failure
overall=1
fi
if [[ $dtm_s8 -ne 0 ]]; then
echo DTM S8 failure
overall=1
fi
if [[ $overall -eq 1 ]]; then
echo DTM Overall Failure!
exit -1
else
echo DTM Passed moving to connection
fi
set -e
# Connection
(cd $TEST_DIR/per && per_connection.py $MASTER $DUT $RESULTS_DIR)
if [[ $? -ne 0 ]]; then
Connection test failed!
fi
mkdir -p $RESULTS_DIR/ME17
mv $TEST_DIR/per/results $RESULTS_DIR/ME18
env:
MASTER: ${{ steps.target_ids.outputs.nrf52840 }}
DUT: ${{ steps.target_ids.outputs.max32690 }}
- name: Test MAX32655
run: |
FULL_RESULTS_DIR=${{ env.FULL_RESULTS_DIR }}
#DTM
set -e
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 1M --results $FULL_RESULTS_DIR/per_dtm_results_1M)
dtm_1m=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 2M --results $FULL_RESULTS_DIR/per_dtm_results_2M)
dtm_2m=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S2 --results $FULL_RESULTS_DIR/per_dtm_results_S2 --num-packets 100)
dtm_s2=$?
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S8 --results $FULL_RESULTS_DIR/per_dtm_results_S8 --num-packets 100)
dtm_s8=$?
overall=0
if [[ $dtm_1m -ne 0 ]]; then
echo DTM 1M failure
overall=1
fi
if [[ $dtm_2m -ne 0 ]]; then
echo DTM 2M failure
overall=1
fi
if [[ $dtm_s2 -ne 0 ]]; then
echo DTM S2 failure
overall=1
fi
if [[ $dtm_s8 -ne 0 ]]; then
echo DTM S8 failure
overall=1
fi
if [[ $overall -eq 1 ]]; then
echo DTM Overall Failure!
exit -1
else
echo DTM Passed moving to connection
fi
set +e
# Connection
(cd $TEST_DIR/per && per_connection.py $MASTER $DUT $RESULTS_DIR)
if [[ $? -ne 0 ]]; then
Connection test failed!
fi
mkdir -p $RESULTS_DIR/ME17
mv $TEST_DIR/per/results $RESULTS_DIR/ME17
env:
MASTER: ${{ steps.target_ids.outputs.nrf52840 }}
DUT: ${{ steps.target_ids.outputs.max32655 }}
- name: Upload Results
uses: actions/upload-artifact@v4
with:
name: per_dtm_results
path: ${{ env.FULL_RESULTS_DIR}}
- name: Unlock Resources
if: always()
# uses: Analog-Devices-MSDK/btm-ci-scripts/actions/lock-board@per-integration
# with:
# all_owned: true
run: resource_manager -uo $GITHUB_REF