Skip to content

Per integration

Per integration #47

Workflow file for this run

###############################################################################
#
# 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 DTM
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/dtm-memory-leak
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: |
# (cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 1M --results results/per_dtm_results_1M)
# (cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 2M --results results/per_dtm_results_2M)
# (cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S2 --results results/per_dtm_results_S2)
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S8 --results results/per_dtm_results_S8)
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
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 1M --results $FULL_RESULTS_DIR/per_dtm_results_1M)
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy 2M --results $FULL_RESULTS_DIR/per_dtm_results_2M)
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S2 --results $FULL_RESULTS_DIR/per_dtm_results_S2)
(cd $TEST_DIR/per && python3 per_heatmap.py $MASTER $DUT --phy S8 --results $FULL_RESULTS_DIR/per_dtm_results_S8)
# Connection
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.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