Skip to content

Commit

Permalink
Merge pull request #548 from luxonis/feature/gen3-testscript
Browse files Browse the repository at this point in the history
Gen3 Test GH Action Worklflow
  • Loading branch information
moratom authored Nov 8, 2024
2 parents b9d5003 + d279fdc commit 536b134
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Gen3 Experiments Runnability Test

on:
workflow_dispatch:
inputs:
depthai_version:

# push:
# branches:
# - gen3

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.12]
platform: [RVC2] #TODO: add RVC4 platform

steps:
- name: Setup WireGuard
run: |
sudo apt install wireguard
echo "${{ secrets.WIREGUARD_PRIVATE_KEY }}" > privatekey
sudo ip link add dev wg0 type wireguard
sudo ip address add dev wg0 10.12.99.26 peer 10.12.99.1
sudo wg set wg0 listen-port 48123 private-key privatekey peer ${{ secrets.WIREGUARD_PUBLIC_KEY }} allowed-ips 10.12.99.1/32,10.12.99.26/32,10.12.0.0/16 endpoint "${{ secrets.WIREGUARD_PUBLIC_ENDPOINT }}"
sudo ip link set up dev wg0
sudo ip route add 10.12.0.0/16 dev wg0
- name: Clone HIL Framework
run: |
git clone https://oauth2:${{secrets.GITLAB_TOKEN}}@gitlab.luxonis.com/luxonis/hil_lab/hil_framework.git --recursive
- name: Setup HIL Tools
run: |
cd hil_framework
sudo chmod +x setup_hil_tools.sh
./setup_hil_tools.sh -ga
- name: Add HIL Tools to Path
run: |
cd hil_framework
echo "$(pwd)/lib_testbed/tools" >> $GITHUB_PATH
echo "PYTHONPATH="$PYTHONPATH:$(pwd)"" >> $GITHUB_ENV
echo "HIL_FRAMEWORK_PATH="$(pwd)"" >> $GITHUB_ENV
- name: Run Test
run: |
CMD="hil --testbed oak4-pro --reservation-name 'dominik.zacek@luxonis.com' --commands 'cd ~/Documents/source/depthai-experiments' 'git pull' 'python3 ./gen3/gen3_script_tester.py --environment-variables DEPTHAI_PLATFORM=${{ matrix.platform }} --virtual-display --path ./gen3/neural-networks/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
#TODO: swap for hil --revision RVC4 when possible infrastructure-wise

- name: Stop WireGuard
if: always()
run: |
sudo ip link set down dev wg0
sudo ip link delete dev wg0

0 comments on commit 536b134

Please sign in to comment.