Per integration #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# | |
# 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 | |