Skip to content

Commit 90166df

Browse files
authored
Merge branch 'develop' into firmware_version_upgrade
2 parents a5fb5c4 + a03950e commit 90166df

File tree

6 files changed

+326
-23
lines changed

6 files changed

+326
-23
lines changed

.github/workflows/python-main.yml

Lines changed: 122 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,40 @@ jobs:
387387
cd bindings/python && mv wheelhouse/audited wheelhouse/audited_pre && mkdir -p wheelhouse/audited
388388
echo "Combining repaired wheels into one master wheel"
389389
python3 ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited
390+
- name: Upload combined wheels as an artifact
391+
uses: actions/upload-artifact@v4
392+
with:
393+
name: audited-wheels-combined-macos-${{ matrix.os }}
394+
path: bindings/python/wheelhouse/audited/*
395+
- name: Append build hash if not a tagged commit
396+
if: startsWith(github.ref, 'refs/tags/v') != true
397+
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
398+
- name: Install combined wheel and run a smoke-test
399+
if: startsWith(github.ref, 'refs/tags/v') != true
400+
env:
401+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
402+
run: |
403+
set -euo pipefail
404+
405+
# Resolve the exact dev version (includes commit hash)
406+
ver=$(python -c "import os,sys,pathlib; sys.path.insert(0, str(pathlib.Path('bindings/python').resolve())); import find_version as v; print(v.get_package_dev_version(os.environ['BUILD_COMMIT_HASH']))")
407+
echo "Installing depthai==$ver using $(python -V)"
408+
409+
# Get the name of the one file in bindings/python/wheelhouse/audited
410+
wheel=$(ls bindings/python/wheelhouse/audited/*.whl)
411+
412+
# Install wheel
413+
python -m pip install -U pip
414+
python -m pip install --force-reinstall $wheel
415+
416+
EXPECTED_VERSION="$ver" python bindings/python/ci/smoke_depthai.py
390417
- name: Upload combined wheels to artifactory
418+
if: success()
391419
run: cd bindings/python && bash ./ci/upload-artifactory.sh
392420
env:
393421
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
394422
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
395423
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
396-
- name: Upload the combined wheels as an artifact
397-
uses: actions/upload-artifact@v4
398-
with:
399-
name: audited-wheels-combined-macos-${{ matrix.os }}
400-
path: bindings/python/wheelhouse/audited/*
401424

402425
# This job builds wheels for x86_64 arch
403426
build-linux-x86_64:
@@ -487,17 +510,43 @@ jobs:
487510
cd bindings/python && mv wheelhouse/audited wheelhouse/audited_pre && mkdir -p wheelhouse/audited
488511
echo "Combining repaired wheels into one master wheel"
489512
python3 ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited
513+
- name: Upload combined wheels as an artifact
514+
uses: actions/upload-artifact@v4
515+
with:
516+
name: audited-wheels-combined-linux-x86_64
517+
path: bindings/python/wheelhouse/audited/*
518+
- name: Append build hash if not a tagged commit
519+
if: startsWith(github.ref, 'refs/tags/v') != true
520+
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
521+
- name: Install combined wheel and run a smoke-test
522+
if: startsWith(github.ref, 'refs/tags/v') != true
523+
env:
524+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
525+
run: |
526+
set -euo pipefail
527+
528+
PYBIN="/opt/python/cp310-cp310/bin/python"
529+
530+
# Resolve the exact dev version (includes commit hash)
531+
ver=$("$PYBIN" -c "import os,sys,pathlib; sys.path.insert(0, str(pathlib.Path('bindings/python').resolve())); import find_version as v; print(v.get_package_dev_version(os.environ['BUILD_COMMIT_HASH']))")
532+
echo "Installing depthai==$ver using $($PYBIN -V)"
533+
534+
# Get the name of the one file in bindings/python/wheelhouse/audited
535+
wheel=$(ls bindings/python/wheelhouse/audited/*.whl)
536+
537+
"$PYBIN" -m ensurepip --upgrade || true
538+
"$PYBIN" -m pip install -U pip
539+
"$PYBIN" -m pip install --force-reinstall $wheel
540+
541+
# Smoke test: fail hard on any exception or version mismatch
542+
EXPECTED_VERSION="$ver" "$PYBIN" bindings/python/ci/smoke_depthai.py
490543
- name: Upload combined wheels to artifactory
544+
if: success()
491545
run: cd bindings/python && bash ./ci/upload-artifactory.sh
492546
env:
493547
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
494548
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
495549
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
496-
- name: Upload the combined wheels as an artifact
497-
uses: actions/upload-artifact@v4
498-
with:
499-
name: audited-wheels-combined-linux-x86_64
500-
path: bindings/python/wheelhouse/audited/*
501550

502551
# This job builds wheels for ARM64 arch
503552
build-linux-arm64:
@@ -592,17 +641,43 @@ jobs:
592641
cd bindings/python && mv wheelhouse/audited wheelhouse/audited_pre && mkdir -p wheelhouse/audited
593642
echo "Combining repaired wheels into one master wheel"
594643
python3 ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited
644+
- name: Upload combined wheels as an artifact
645+
uses: actions/upload-artifact@v4
646+
with:
647+
name: audited-wheels-combined-linux-arm64
648+
path: bindings/python/wheelhouse/audited/*
649+
- name: Append build hash if not a tagged commit
650+
if: startsWith(github.ref, 'refs/tags/v') != true
651+
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
652+
- name: Install combined wheel and run a smoke-test
653+
if: startsWith(github.ref, 'refs/tags/v') != true
654+
env:
655+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
656+
run: |
657+
set -euo pipefail
658+
659+
PYBIN="/opt/python/cp310-cp310/bin/python"
660+
661+
# Resolve the exact dev version (includes commit hash)
662+
ver=$("$PYBIN" -c "import os,sys,pathlib; sys.path.insert(0, str(pathlib.Path('bindings/python').resolve())); import find_version as v; print(v.get_package_dev_version(os.environ['BUILD_COMMIT_HASH']))")
663+
echo "Installing depthai==$ver using $($PYBIN -V)"
664+
665+
# Get the name of the one file in bindings/python/wheelhouse/audited
666+
wheel=$(ls bindings/python/wheelhouse/audited/*.whl)
667+
668+
# Install combined wheel
669+
"$PYBIN" -m ensurepip --upgrade || true
670+
"$PYBIN" -m pip install -U pip
671+
"$PYBIN" -m pip install --force-reinstall $wheel
672+
673+
EXPECTED_VERSION="$ver" "$PYBIN" bindings/python/ci/smoke_depthai.py
595674
- name: Upload combined wheels to artifactory
675+
if: success()
596676
run: cd bindings/python && bash ./ci/upload-artifactory.sh
597677
env:
598678
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
599679
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
600680
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
601-
- name: Upload the combined wheels as an artifact
602-
uses: actions/upload-artifact@v4
603-
with:
604-
name: audited-wheels-combined-linux-arm64
605-
path: bindings/python/wheelhouse/audited/*
606681

607682
combine-windows-x86_64-wheels:
608683
needs: build-windows-x86_64
@@ -627,18 +702,44 @@ jobs:
627702
mkdir -p wheelhouse/audited
628703
echo "Combining repaired wheels into one master wheel"
629704
python ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited --log_level=debug
705+
- name: Upload combined wheels as an artifact
706+
uses: actions/upload-artifact@v4
707+
with:
708+
name: audited-wheels-combined-windows-x86_64
709+
path: bindings/python/wheelhouse/audited/*
710+
- name: Append build hash if not a tagged commit
711+
if: startsWith(github.ref, 'refs/tags/v') != true
712+
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
713+
- name: Install combined wheel and run a smoke-test
714+
if: startsWith(github.ref, 'refs/tags/v') != true
715+
shell: pwsh
716+
env:
717+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
718+
run: |
719+
$env:PYTHONIOENCODING = 'utf-8'
720+
$ErrorActionPreference = "Stop" # Fail on any error
721+
722+
# Resolve the exact dev version (includes commit hash)
723+
$ver = python -c "import os,sys,pathlib; sys.path.insert(0,str(pathlib.Path('bindings/python').resolve())); import find_version as v; print(v.get_package_dev_version(os.environ['BUILD_COMMIT_HASH']))"
724+
Write-Host "Installing depthai==$ver using:"; python -VV
725+
726+
# Get the name of the one file in bindings/python/wheelhouse/audited
727+
$wheel_name = (Get-ChildItem bindings/python/wheelhouse/audited/*.whl).Name
728+
729+
# Install combined wheel
730+
python -m pip install -U pip
731+
python -m pip install --force-reinstall bindings/python/wheelhouse/audited/$wheel_name
732+
733+
# Smoke test (no heredoc; YAML-safe). Fail on import error or version mismatch.
734+
$env:EXPECTED_VERSION = $ver
735+
python bindings/python/ci/smoke_depthai.py
630736
- name: Upload combined wheels to artifactory
737+
if: success()
631738
run: cd bindings/python && bash ./ci/upload-artifactory.sh
632739
env:
633740
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
634741
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
635742
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
636-
- name: Upload the combined wheels as an artifact
637-
uses: actions/upload-artifact@v4
638-
with:
639-
name: audited-wheels-combined-windows-x86_64
640-
path: bindings/python/wheelhouse/audited/*
641-
642743
release:
643744
if: startsWith(github.ref, 'refs/tags/v')
644745
# needs: [pytest, build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-macos-arm64, build-linux-x86_64, build-linux-arm64]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os, sys, traceback, platform
2+
3+
try:
4+
import depthai as dai
5+
except Exception:
6+
traceback.print_exc()
7+
sys.exit(1)
8+
9+
expected = os.environ.get("EXPECTED_VERSION") or os.environ.get("ver")
10+
installed = getattr(dai, "__version__", "<unknown>")
11+
if installed != expected:
12+
print(f"Version mismatch: installed {installed} vs expected {expected}", file=sys.stderr)
13+
sys.exit(1)
14+
15+
print("depthai:", installed)
16+
print("python:", platform.python_version(), "ABI:", sys.implementation.cache_tag)

cmake/Depthai/DepthaiDeviceRVC4Config.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set(DEPTHAI_DEVICE_RVC4_MATURITY "snapshot")
44

55
# "version if applicable"
6-
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+f9017b35dae596e04a91f44622c2b281c15c5d1c")
6+
set(DEPTHAI_DEVICE_RVC4_VERSION "0.0.1+d5316ad7b60416d0a88190f4b3c2dde0bbb50e5a")

cmake/Depthai/DepthaiDeviceSideConfig.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")
33

44
# "full commit hash of device side binary"
5-
set(DEPTHAI_DEVICE_SIDE_COMMIT "0ada9b9800478cf2c7056cea5c2bab2c8f6a2cbd")
5+
set(DEPTHAI_DEVICE_SIDE_COMMIT "f81edb9c2328ee1f80a6f80c3fade0af0076a3ff")
66

77
# "version if applicable"
88
set(DEPTHAI_DEVICE_SIDE_VERSION "")

tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,9 @@ dai_add_test(neural_network_test src/ondevice_tests/neural_network_test.cpp)
341341
target_compile_definitions(neural_network_test PRIVATE BLOB_PATH="${mobilenet_blob}")
342342
dai_set_test_labels(neural_network_test ondevice rvc2_all ci)
343343

344+
dai_add_test(spatial_location_calculator_test src/ondevice_tests/pipeline/node/spatial_location_calculator_test.cpp)
345+
dai_set_test_labels(spatial_location_calculator_test ondevice rvc2_all rvc4 ci)
346+
344347
# Color camera test
345348
dai_add_test(color_camera_node_test src/ondevice_tests/color_camera_node_test.cpp)
346349
dai_set_test_labels(color_camera_node_test ondevice rvc2_all ci)

0 commit comments

Comments
 (0)