Gen3 Experiments Runnability Test #30
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
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.10", "3.12"] | |
platform: [RVC2] #TODO: add RVC4 platform | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Python to Custom Directory | |
run: | | |
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/deadsnakes.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 | |
apt-get update | |
mkdir -p python | |
apt-get download \ | |
python3.8 \ | |
python3.8-minimal \ | |
libpython3.8-minimal \ | |
libpython3.8-stdlib \ | |
python3.8-venv | |
for deb in *.deb; do | |
dpkg -x "$deb" python | |
rm "$deb" | |
done | |
- 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.python-version}}-${{ matrix.platform }}" | |
CMD="hil --models $MODEL --reservation-name $RESERVATION_NAME --wait --sync-workspace --commands 'cd /tmp/depthai-experiments' '/tmp/python/usr/bin/python${{ matrix.python-version }} 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 |