Gen3 Experiments Runnability Test #1
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: | |
# 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 '[email protected]' --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 |