Skip to content

Commit 65289d1

Browse files
committed
reorder python CI workflow stages, upload wheels to artifactory after smoketest
1 parent c488823 commit 65289d1

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

.github/workflows/python-main.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -387,21 +387,15 @@ 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 to artifactory
391-
run: cd bindings/python && bash ./ci/upload-artifactory.sh
392-
env:
393-
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
394-
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
395-
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
396-
- name: Upload the combined wheels as an artifact
390+
- name: Upload combined wheels as an artifact
397391
uses: actions/upload-artifact@v4
398392
with:
399393
name: audited-wheels-combined-macos-${{ matrix.os }}
400394
path: bindings/python/wheelhouse/audited/*
401395
- name: Append build hash if not a tagged commit
402396
if: startsWith(github.ref, 'refs/tags/v') != true
403397
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
404-
- name: Install from Artifactory and smoke-test (macOS)
398+
- name: Install combined wheel and run a smoke-test
405399
if: startsWith(github.ref, 'refs/tags/v') != true
406400
env:
407401
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
@@ -420,6 +414,13 @@ jobs:
420414
python -m pip install --force-reinstall $wheel
421415
422416
EXPECTED_VERSION="$ver" python bindings/python/ci/smoke_depthai.py
417+
- name: Upload combined wheels to artifactory
418+
if: success()
419+
run: cd bindings/python && bash ./ci/upload-artifactory.sh
420+
env:
421+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
422+
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
423+
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
423424

424425
# This job builds wheels for x86_64 arch
425426
build-linux-x86_64:
@@ -509,24 +510,15 @@ jobs:
509510
cd bindings/python && mv wheelhouse/audited wheelhouse/audited_pre && mkdir -p wheelhouse/audited
510511
echo "Combining repaired wheels into one master wheel"
511512
python3 ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited
512-
- name: Upload combined wheels to artifactory
513-
run: cd bindings/python && bash ./ci/upload-artifactory.sh
514-
env:
515-
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
516-
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
517-
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
518-
519-
- name: Upload the combined wheels as an artifact
513+
- name: Upload combined wheels as an artifact
520514
uses: actions/upload-artifact@v4
521515
with:
522516
name: audited-wheels-combined-linux-x86_64
523517
path: bindings/python/wheelhouse/audited/*
524-
525518
- name: Append build hash if not a tagged commit
526519
if: startsWith(github.ref, 'refs/tags/v') != true
527520
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
528-
529-
- name: Install from Artifactory and smoke-test (manylinux x86_64)
521+
- name: Install combined wheel and run a smoke-test
530522
if: startsWith(github.ref, 'refs/tags/v') != true
531523
env:
532524
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
@@ -548,6 +540,13 @@ jobs:
548540
549541
# Smoke test: fail hard on any exception or version mismatch
550542
EXPECTED_VERSION="$ver" "$PYBIN" bindings/python/ci/smoke_depthai.py
543+
- name: Upload combined wheels to artifactory
544+
if: success()
545+
run: cd bindings/python && bash ./ci/upload-artifactory.sh
546+
env:
547+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
548+
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
549+
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
551550

552551
# This job builds wheels for ARM64 arch
553552
build-linux-arm64:
@@ -642,21 +641,15 @@ jobs:
642641
cd bindings/python && mv wheelhouse/audited wheelhouse/audited_pre && mkdir -p wheelhouse/audited
643642
echo "Combining repaired wheels into one master wheel"
644643
python3 ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited
645-
- name: Upload combined wheels to artifactory
646-
run: cd bindings/python && bash ./ci/upload-artifactory.sh
647-
env:
648-
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
649-
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
650-
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
651-
- name: Upload the combined wheels as an artifact
644+
- name: Upload combined wheels as an artifact
652645
uses: actions/upload-artifact@v4
653646
with:
654647
name: audited-wheels-combined-linux-arm64
655648
path: bindings/python/wheelhouse/audited/*
656649
- name: Append build hash if not a tagged commit
657650
if: startsWith(github.ref, 'refs/tags/v') != true
658651
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
659-
- name: Install from Artifactory and smoke-test (manylinux aarch64)
652+
- name: Install combined wheel and run a smoke-test
660653
if: startsWith(github.ref, 'refs/tags/v') != true
661654
env:
662655
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
@@ -672,12 +665,19 @@ jobs:
672665
# Get the name of the one file in bindings/python/wheelhouse/audited
673666
wheel=$(ls bindings/python/wheelhouse/audited/*.whl)
674667
675-
# Install from Artifactory snapshot
668+
# Install combined wheel
676669
"$PYBIN" -m ensurepip --upgrade || true
677670
"$PYBIN" -m pip install -U pip
678671
"$PYBIN" -m pip install --force-reinstall $wheel
679672
680673
EXPECTED_VERSION="$ver" "$PYBIN" bindings/python/ci/smoke_depthai.py
674+
- name: Upload combined wheels to artifactory
675+
if: success()
676+
run: cd bindings/python && bash ./ci/upload-artifactory.sh
677+
env:
678+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
679+
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
680+
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
681681

682682
combine-windows-x86_64-wheels:
683683
needs: build-windows-x86_64
@@ -702,28 +702,21 @@ jobs:
702702
mkdir -p wheelhouse/audited
703703
echo "Combining repaired wheels into one master wheel"
704704
python ci/combine_wheels.py --input_folder=wheelhouse/audited_pre --output_folder=wheelhouse/audited --log_level=debug
705-
- name: Upload combined wheels to artifactory
706-
run: cd bindings/python && bash ./ci/upload-artifactory.sh
707-
env:
708-
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
709-
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
710-
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
711-
- name: Upload the combined wheels as an artifact
705+
- name: Upload combined wheels as an artifact
712706
uses: actions/upload-artifact@v4
713707
with:
714708
name: audited-wheels-combined-windows-x86_64
715709
path: bindings/python/wheelhouse/audited/*
716710
- name: Append build hash if not a tagged commit
717711
if: startsWith(github.ref, 'refs/tags/v') != true
718712
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
719-
- name: Install from Artifactory and smoke-test (Windows)
713+
- name: Install combined wheel and run a smoke-test
720714
if: startsWith(github.ref, 'refs/tags/v') != true
721715
shell: pwsh
722716
env:
723717
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
724718
run: |
725719
$env:PYTHONIOENCODING = 'utf-8'
726-
727720
$ErrorActionPreference = "Stop" # Fail on any error
728721
729722
# Resolve the exact dev version (includes commit hash)
@@ -733,13 +726,20 @@ jobs:
733726
# Get the name of the one file in bindings/python/wheelhouse/audited
734727
$wheel_name = (Get-ChildItem bindings/python/wheelhouse/audited/*.whl).Name
735728
736-
# Install from Artifactory snapshot
729+
# Install combined wheel
737730
python -m pip install -U pip
738731
python -m pip install --force-reinstall bindings/python/wheelhouse/audited/$wheel_name
739732
740733
# Smoke test (no heredoc; YAML-safe). Fail on import error or version mismatch.
741734
$env:EXPECTED_VERSION = $ver
742735
python bindings/python/ci/smoke_depthai.py
736+
- name: Upload combined wheels to artifactory
737+
if: success()
738+
run: cd bindings/python && bash ./ci/upload-artifactory.sh
739+
env:
740+
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
741+
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
742+
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
743743
release:
744744
if: startsWith(github.ref, 'refs/tags/v')
745745
# 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

Comments
 (0)