Skip to content

Commit 2eff24c

Browse files
committed
Merge branch 'develop' into dev_mt_wheels_download_test
2 parents 55d853b + dc60731 commit 2eff24c

File tree

58 files changed

+1044
-364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1044
-364
lines changed

.github/workflows/bom.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
type: string
2020
default: "develop"
2121
description: "Version for depthai"
22+
device:
23+
required: false
24+
type: string
25+
default: "stereo"
26+
description: "Which device to test - stereo or rgb"
2227

2328
jobs:
2429
id:
@@ -76,12 +81,9 @@ jobs:
7681
steps:
7782
- uses: actions/checkout@v3
7883

79-
- name: Prepare HIL Framework
80-
run: source scripts/hil/prepare_hil_framework.sh
81-
8284
- name: Configure, Build and Test
8385
run: |
84-
86+
source scripts/hil/prepare_hil_framework.sh ${{ secrets.HIL_PAT_TOKEN }}
8587
if [[ -n "${{ github.event.inputs.reservation_name }}" ]]; then
8688
RESERVATION_OPTION="--reservation-name ${{ github.event.inputs.reservation_name }}"
8789
else
@@ -93,4 +95,11 @@ jobs:
9395
HOLD_RESERVATION="--hold-reservation"
9496
fi
9597
96-
exec hil $HOLD_RESERVATION --models "oak4_pro or oak4_d" $RESERVATION_OPTION --wait --docker-image ${{ secrets.CONTAINER_REGISTRY }}/depthai-core-hil:${{ needs.build_docker_container.outputs.tag }} --commands "source /workspace/venv/bin/activate && cd /workspace/tests && python3 run_tests.py '--rvc4' "
98+
if [[ "${{ github.event.inputs.device }}" == 'stereo' ]]; then
99+
MODELS="oak4_pro or oak4_d"
100+
else
101+
MODELS="oak4_s"
102+
RGB="rgb"
103+
fi
104+
105+
exec hil $HOLD_RESERVATION --models "$MODELS" $RESERVATION_OPTION --wait --docker-image ${{ secrets.CONTAINER_REGISTRY }}/depthai-core-hil:${{ needs.build_docker_container.outputs.tag }} --commands "./tests/run_tests_entrypoint.sh rvc4$RGB"

.github/workflows/main.workflow.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,41 @@ on:
1212
branches:
1313
- main
1414
- develop
15+
types: [opened, synchronize, reopened, labeled]
1516

1617
jobs:
1718

19+
# The precheck job determines whether a workflow should be run in full
20+
precheck:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
should_run: ${{ steps.check.outputs.should_run }}
24+
steps:
25+
- name: Evaluate trigger condition
26+
id: check
27+
run: |
28+
EVENT_NAME="${{ github.event_name }}"
29+
30+
RAW_LABELS='${{ toJson(github.event.pull_request.labels) }}'
31+
if [[ "$RAW_LABELS" == "null" || -z "$RAW_LABELS" ]]; then
32+
LABELS="[]"
33+
else
34+
LABELS="$RAW_LABELS"
35+
fi
36+
37+
SHOULD_RUN="true"
38+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
39+
if ! echo "$LABELS" | jq -r '.[].name' | grep -q "testable"; then
40+
SHOULD_RUN="false"
41+
fi
42+
fi
43+
44+
echo "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
45+
1846
style:
1947
runs-on: ubuntu-24.04
48+
needs: [precheck]
49+
if: needs.precheck.outputs.should_run == 'true'
2050

2151
steps:
2252
- uses: actions/checkout@v4
@@ -37,6 +67,8 @@ jobs:
3767

3868
tidy:
3969
runs-on: ubuntu-24.04
70+
needs: [precheck]
71+
if: needs.precheck.outputs.should_run == 'true'
4072

4173
steps:
4274
- uses: actions/checkout@v4
@@ -56,6 +88,8 @@ jobs:
5688

5789
build:
5890
runs-on: ${{ matrix.os }}
91+
needs: [precheck]
92+
if: needs.precheck.outputs.should_run == 'true'
5993
strategy:
6094
matrix:
6195
os: [macos-latest, windows-latest, ubuntu-latest]
@@ -95,6 +129,8 @@ jobs:
95129
96130
integration:
97131
runs-on: ${{ matrix.os }}
132+
needs: [precheck]
133+
if: needs.precheck.outputs.should_run == 'true'
98134
strategy:
99135
matrix:
100136
os: [macos-latest, windows-latest, ubuntu-latest]

.github/workflows/python-main.yml

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ name: Depthai Python CI/CD
44

55
on:
66
workflow_dispatch:
7-
pull_request:
8-
branches:
9-
- develop
107
push:
118
branches:
12-
- develop*
9+
- main
10+
- develop
1311
tags:
14-
- 'v*'
12+
- 'v*'
13+
pull_request:
14+
branches:
15+
- main
16+
- develop
17+
types: [opened, synchronize, reopened, labeled]
1518

1619
###################################
1720
###################################
@@ -22,9 +25,38 @@ env:
2225
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2326
jobs:
2427

28+
# The precheck job determines whether a workflow should be run in full
29+
precheck:
30+
runs-on: ubuntu-latest
31+
outputs:
32+
should_run: ${{ steps.check.outputs.should_run }}
33+
steps:
34+
- name: Evaluate trigger condition
35+
id: check
36+
run: |
37+
EVENT_NAME="${{ github.event_name }}"
38+
39+
RAW_LABELS='${{ toJson(github.event.pull_request.labels) }}'
40+
if [[ "$RAW_LABELS" == "null" || -z "$RAW_LABELS" ]]; then
41+
LABELS="[]"
42+
else
43+
LABELS="$RAW_LABELS"
44+
fi
45+
46+
SHOULD_RUN="true"
47+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
48+
if ! echo "$LABELS" | jq -r '.[].name' | grep -q "testable"; then
49+
SHOULD_RUN="false"
50+
fi
51+
fi
52+
53+
echo "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
54+
2555
# Job which builds docstrings for the rest of the wheel builds
2656
build-docstrings:
2757
runs-on: ubuntu-latest
58+
needs: [precheck]
59+
if: needs.precheck.outputs.should_run == 'true'
2860
env:
2961
VCPKG_BINARY_SOURCES: "clear;files,/home/runner/.vcpkg,readwrite"
3062
steps:
@@ -254,7 +286,7 @@ jobs:
254286
EXTRA_DLL_PATH=$(find ./build -type d -name "temp.win*" -exec ls -d {} \; | head -n 1)/Release/Release
255287
echo "delvewheel extra dll path: $EXTRA_DLL_PATH"
256288
for wheel in ./wheelhouse/*.whl; do
257-
delvewheel repair "$wheel" --add-path "$EXTRA_DLL_PATH" -w wheelhouse/audited
289+
delvewheel repair "$wheel" --add-path "$EXTRA_DLL_PATH" --include vcruntime140.dll --include vcruntime140_1.dll --include ucrtbase.dll -w wheelhouse/audited
258290
done
259291
- name: Archive wheel artifacts
260292
uses: actions/upload-artifact@v4
@@ -361,6 +393,11 @@ jobs:
361393
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
362394
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
363395
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/*
364401
- name: Append build hash if not a tagged commit
365402
if: startsWith(github.ref, 'refs/tags/v') != true
366403
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
@@ -495,6 +532,12 @@ jobs:
495532
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
496533
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
497534
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
535+
536+
- name: Upload the combined wheels as an artifact
537+
uses: actions/upload-artifact@v4
538+
with:
539+
name: audited-wheels-combined-linux-x86_64
540+
path: bindings/python/wheelhouse/audited/*
498541

499542
- name: Append build hash if not a tagged commit
500543
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -637,6 +680,11 @@ jobs:
637680
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
638681
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
639682
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
683+
- name: Upload the combined wheels as an artifact
684+
uses: actions/upload-artifact@v4
685+
with:
686+
name: audited-wheels-combined-linux-arm64
687+
path: bindings/python/wheelhouse/audited/*
640688
- name: Append build hash if not a tagged commit
641689
if: startsWith(github.ref, 'refs/tags/v') != true
642690
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
@@ -707,6 +755,11 @@ jobs:
707755
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
708756
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
709757
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
758+
- name: Upload the combined wheels as an artifact
759+
uses: actions/upload-artifact@v4
760+
with:
761+
name: audited-wheels-combined-windows-x86_64
762+
path: bindings/python/wheelhouse/audited/*
710763
- name: Append build hash if not a tagged commit
711764
if: startsWith(github.ref, 'refs/tags/v') != true
712765
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
@@ -764,7 +817,7 @@ jobs:
764817
submodules: 'recursive'
765818
- uses: actions/download-artifact@v4
766819
with:
767-
pattern: audited-wheels*
820+
pattern: audited-wheels-combined-*
768821
merge-multiple: true
769822
path: bindings/python/wheelhouse/audited/
770823
- name: List files

.github/workflows/stability.workflow.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ jobs:
3838
runs-on: ['self-hosted', 'testbed-runner']
3939
timeout-minutes: 1450 # 24h & 10minutes
4040
steps:
41-
42-
- uses: actions/checkout@v3
4341

44-
- name: Prepare HIL Framework
45-
run: source scripts/hil/prepare_hil_framework.sh
42+
- uses: actions/checkout@v3
4643

4744
- name: Test
4845
run: |
46+
source scripts/hil/prepare_hil_framework.sh ${{ secrets.HIL_PAT_TOKEN }}
4947
if [[ -n "${{ github.event.inputs.testbed }}" ]]; then
5048
TESTBED_OPTION="--testbed ${{ github.event.inputs.testbed }}"
5149
fi
@@ -58,5 +56,5 @@ jobs:
5856
if [[ -n "${{ github.event.inputs.luxonis_os }}" ]]; then
5957
UPDATE_LUXONIS_OS="--rvc4-os-version ${{ github.event.inputs.luxonis_os }}"
6058
fi
61-
59+
6260
exec hil $HOLD_RESERVATION --models "oak4_pro or oak4_d" $TESTBED_OPTION $RESERVATION_OPTION $UPDATE_LUXONIS_OS --wait --sync-workspace --stability-test --stability-name depthai-stability --commands 'cd /tmp/depthai-core || exit' 'scripts/hil/run_hil_stability.sh ${{ github.event.inputs.depthai }}'

.github/workflows/test.workflow.yml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ on:
44
workflow_dispatch:
55
push:
66
branches:
7-
- develop
87
- main
8+
- develop
99
tags:
1010
- 'v*'
1111
pull_request:
1212
branches:
13+
- main
1314
- develop
15+
types: [opened, synchronize, reopened, labeled]
1416

1517
# Only allow latest run on same branch to be tested
1618
concurrency:
@@ -19,32 +21,70 @@ concurrency:
1921

2022
jobs:
2123

24+
# The precheck job determines whether a workflow should be run in full
25+
precheck:
26+
runs-on: ubuntu-latest
27+
outputs:
28+
should_run: ${{ steps.check.outputs.should_run }}
29+
steps:
30+
- name: Evaluate trigger condition
31+
id: check
32+
run: |
33+
EVENT_NAME="${{ github.event_name }}"
34+
35+
RAW_LABELS='${{ toJson(github.event.pull_request.labels) }}'
36+
if [[ "$RAW_LABELS" == "null" || -z "$RAW_LABELS" ]]; then
37+
LABELS="[]"
38+
else
39+
LABELS="$RAW_LABELS"
40+
fi
41+
42+
SHOULD_RUN="true"
43+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
44+
if ! echo "$LABELS" | jq -r '.[].name' | grep -q "testable"; then
45+
SHOULD_RUN="false"
46+
fi
47+
fi
48+
49+
echo "should_run=$SHOULD_RUN" >> "$GITHUB_OUTPUT"
50+
2251
run_vanilla_tests:
52+
needs: [precheck]
53+
if: needs.precheck.outputs.should_run == 'true'
2354
uses: ./.github/workflows/test_child.yml
2455
with:
2556
flavor: "vanilla"
26-
luxonis_os_versions_to_test: "['debug-1.6.0', '1.14.1', '1.15.0']"
27-
luxonis_os_versions_to_test_rgb: "['1.15.0']"
57+
luxonis_os_versions_to_test: "['1.14.1', '1.15.0', '1.18.3']"
58+
luxonis_os_versions_to_test_rgb: "['1.18.3']"
2859
secrets:
2960
CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }}
61+
HIL_PAT_TOKEN: ${{ secrets.HIL_PAT_TOKEN }}
3062

3163
run_tsan_tests:
64+
needs: [precheck]
65+
if: needs.precheck.outputs.should_run == 'true'
3266
uses: ./.github/workflows/test_child.yml
3367
with:
3468
flavor: "tsan"
35-
luxonis_os_versions_to_test: "['1.15.0']"
69+
luxonis_os_versions_to_test: "['1.18.3']"
3670
secrets:
3771
CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }}
72+
HIL_PAT_TOKEN: ${{ secrets.HIL_PAT_TOKEN }}
3873

3974
run_asan-ubsan_tests:
75+
needs: [precheck]
76+
if: needs.precheck.outputs.should_run == 'true'
4077
uses: ./.github/workflows/test_child.yml
4178
with:
4279
flavor: "asan-ubsan"
43-
luxonis_os_versions_to_test: "['1.15.0']"
80+
luxonis_os_versions_to_test: "['1.18.3']"
4481
secrets:
4582
CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }}
83+
HIL_PAT_TOKEN: ${{ secrets.HIL_PAT_TOKEN }}
4684

4785
windows_rvc2_rvc4_test:
86+
needs: [precheck]
87+
if: needs.precheck.outputs.should_run == 'true'
4888
runs-on: ['self-hosted', 'windows', 'hil-test']
4989
env:
5090
LOCALAPPDATA: "C:/actions-runner/vcpkg_cache"

0 commit comments

Comments
 (0)