-
Notifications
You must be signed in to change notification settings - Fork 373
49 lines (41 loc) · 1.9 KB
/
run_test.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
name: Gen3 Experiments Runnability Test
on:
workflow_dispatch:
inputs:
depthai_version:
description: 'Version of DepthAI to install for the test run. If specified the version will override version specified in requirements.txt'
required: false
# push:
# branches:
# - gen3
jobs:
test:
runs-on: ["self-hosted", "testbed-runner"]
strategy:
matrix:
python-version: [3.12]
platform: [RVC2] #TODO: add RVC4 platform
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Add HIL Tools to Path
run: |
echo "/home/$USER/hil_framework/lib_testbed/tools" >> $GITHUB_PATH
echo "PYTHONPATH="$PYTHONPATH:/home/$USER/hil_framework"" >> $GITHUB_ENV
echo "HIL_FRAMEWORK_PATH="/home/$USER/hil_framework"" >> $GITHUB_ENV
- name: Set model variable
run: |
if [ "${{ matrix.platform }}" = "RVC2" ]; then
echo "MODEL=oak_d_s2" >> $GITHUB_ENV
elif [ "${{ matrix.platform }}" = "RVC4" ]; then
echo "MODEL=oak4_pro" >> $GITHUB_ENV
fi
- name: Run Test
run: |
export RESERVATION_NAME="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}#${{ matrix.platform}}-${{ matrix.python-version }}"
CMD="hil --models $MODEL --reservation-name $RESERVATION_NAME --wait --sync-workspace --commands 'cd /tmp/depthai-experiments' 'python3 gen3_script_tester.py --environment-variables DEPTHAI_PLATFORM=${{ matrix.platform }} --virtual-display --path ./neural-networks/advanced-examples/object-detection/mobile-object-localizer"
if [ -n "${{ github.event.inputs.depthai_version }}" ]; then
CMD="$CMD --depthai-version ${{ github.event.inputs.depthai_version }}"
fi
CMD="$CMD'"
eval $CMD