From 6f9eb69904f62ae5b3cad7fe6841355c37a8505b Mon Sep 17 00:00:00 2001 From: dominik737 Date: Thu, 19 Dec 2024 21:55:31 +0100 Subject: [PATCH 1/4] ci checkout and sync workspace using hil --- .github/workflows/run_test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 3cb097b0..479097f1 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -19,6 +19,9 @@ jobs: 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 @@ -27,7 +30,8 @@ jobs: - name: Run Test run: | - CMD="hil --testbed oak4-pro --reservation-name 'dominik.zacek@luxonis.com' --commands 'cd ~/Documents/source/depthai-experiments' 'git fetch' 'git checkout ${{ github.ref_name }}' 'git pull' 'python3 gen3_script_tester.py --environment-variables DEPTHAI_PLATFORM=${{ matrix.platform }} --virtual-display --path ./neural-networks/advanced-examples/object-detection/mobile-object-localizer" + export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/$GITHUB_RUN_ID-${{ matrix.python-version }}-${{ matrix.platform }}" + CMD="hil --testbed oak4-pro --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" CMD if [ -n "${{ github.event.inputs.depthai_version }}" ]; then CMD="$CMD --depthai-version ${{ github.event.inputs.depthai_version }}" fi From a442b72438d8b61946e00f7756b3ef51810bcefa Mon Sep 17 00:00:00 2001 From: dominik737 Date: Thu, 19 Dec 2024 22:02:02 +0100 Subject: [PATCH 2/4] ci typo fix --- .github/workflows/run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 479097f1..6ebcb4d7 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -31,7 +31,7 @@ jobs: - name: Run Test run: | export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/$GITHUB_RUN_ID-${{ matrix.python-version }}-${{ matrix.platform }}" - CMD="hil --testbed oak4-pro --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" CMD + CMD="hil --testbed oak4-pro --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 From 90aae1614e4a07c02e628dafcc6c344e3d6f4744 Mon Sep 17 00:00:00 2001 From: dominik737 Date: Thu, 19 Dec 2024 22:11:18 +0100 Subject: [PATCH 3/4] ci reservation name variables fix --- .github/workflows/run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index 6ebcb4d7..d7d7094b 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -30,7 +30,7 @@ jobs: - name: Run Test run: | - export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/$GITHUB_RUN_ID-${{ matrix.python-version }}-${{ matrix.platform }}" + export RESERVATION_NAME="https://github.com/${{ github.repository }}/actions/${{ github.run_id }}-${{ matrix.python-version }}-${{ matrix.platform }}" CMD="hil --testbed oak4-pro --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 }}" From 574e073fd6654274fa535d1ebc3232556f7f0f28 Mon Sep 17 00:00:00 2001 From: dominik737 Date: Thu, 19 Dec 2024 22:27:45 +0100 Subject: [PATCH 4/4] ci use hil models --- .github/workflows/run_test.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index d7d7094b..2ff89887 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -27,14 +27,21 @@ jobs: 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/${{ github.run_id }}-${{ matrix.python-version }}-${{ matrix.platform }}" - CMD="hil --testbed oak4-pro --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" + 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 - #TODO: swap for hil --revision RVC4 when possible infrastructure-wise