@@ -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]
0 commit comments