Skip to content

Commit 89fd1e8

Browse files
authored
Merge pull request #1495 from luxonis/release/3.1.0
Release/3.1.0
2 parents 5b4daba + 7a53ddd commit 89fd1e8

File tree

224 files changed

+2515
-715
lines changed

Some content is hidden

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

224 files changed

+2515
-715
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: 41 additions & 9 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:
@@ -239,7 +271,7 @@ jobs:
239271
run: |
240272
python -m pip install --upgrade pip
241273
- name: Building wheels
242-
run: cd bindings/python && python -m pip wheel . -w ./wheelhouse/ --verbose
274+
run: cd bindings/python && python -m pip wheel . -w ./wheelhouse/ --no-deps --verbose
243275
- name: Print out vcpkg logs if building port fails
244276
if: failure() # Only run this if the build step fails
245277
run: cd bindings/python && bash ./ci/show_vcpkg_logs.sh
@@ -323,7 +355,7 @@ jobs:
323355
brew install nasm
324356
python -m pip install delocate
325357
- name: Building wheels
326-
run: cd bindings/python && python -m pip wheel . -w ./wheelhouse/ --verbose
358+
run: cd bindings/python && python -m pip wheel . -w ./wheelhouse/ --no-deps --verbose
327359
- name: Print out vcpkg logs if building port fails
328360
if: failure() # Only run this if the build step fails
329361
run: cd bindings/python && bash ./ci/show_vcpkg_logs.sh
@@ -422,7 +454,7 @@ jobs:
422454
mv dist/* wheelhouse/audited/
423455
- name: Build wheels
424456
run: |
425-
cd bindings/python && for PYBIN in /opt/python/${{ matrix.python-set }}/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
457+
cd bindings/python && for PYBIN in /opt/python/${{ matrix.python-set }}/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --no-deps --verbose; done
426458
- name: Print out vcpkg logs if building port fails
427459
if: failure() # Only run this if the build step fails
428460
run: cd bindings/python && bash ./ci/show_vcpkg_logs.sh
@@ -526,7 +558,7 @@ jobs:
526558
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
527559
- name: Building wheels
528560
run: |
529-
cd bindings/python && for PYBIN in /opt/python/${{ matrix.python-set }}/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
561+
cd bindings/python && for PYBIN in /opt/python/${{ matrix.python-set }}/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --no-deps --verbose; done
530562
- name: Print out vcpkg logs if building port fails
531563
if: failure() # Only run this if the build step fails
532564
run: cd bindings/python && bash ./ci/show_vcpkg_logs.sh

.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: 52 additions & 38 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,62 +21,74 @@ 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

47-
windows_rvc2_rvc4_test:
48-
runs-on: ['self-hosted', 'windows', 'hil-test']
49-
env:
50-
LOCALAPPDATA: "C:/actions-runner/vcpkg_cache"
51-
steps:
52-
- uses: actions/checkout@v3
53-
with:
54-
submodules: 'recursive'
55-
56-
- name: Configure, Build and Test
57-
run: |
58-
$isPR = "${{ github.head_ref }}" -ne ""
59-
$extraFlags = ""
60-
61-
if (-not $isPR) {
62-
$extraFlags = @(
63-
'-DDEPTHAI_BUILD_EXAMPLES=ON',
64-
'-DDEPTHAI_BUILD_PYTHON=ON',
65-
'-DDEPTHAI_PYTHON_ENABLE_TESTS=ON',
66-
'-DDEPTHAI_TEST_EXAMPLES=ON',
67-
'-DDEPTHAI_PYTHON_TEST_EXAMPLES=ON',
68-
'-DDEPTHAI_PYTHON_ENABLE_EXAMPLES=ON'
69-
) -join ' '
70-
}
71-
72-
$cmakeConfigureCommand = "cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -DDEPTHAI_VCPKG_INTERNAL_ONLY=OFF -DVCPKG_OVERLAY_TRIPLETS=./cmake/triplets/release -DDEPTHAI_BUILD_TESTS=ON $extraFlags"
73-
Write-Host "Running: $cmakeConfigureCommand"
74-
Invoke-Expression $cmakeConfigureCommand
85+
run_windows_tests:
86+
needs: [precheck]
87+
if: needs.precheck.outputs.should_run == 'true'
88+
uses: ./.github/workflows/test_child_windows.yml
89+
with:
90+
luxonis_os_versions_to_test: "['1.18.3']"
91+
secrets:
92+
CONTAINER_REGISTRY: ${{ secrets.CONTAINER_REGISTRY }}
93+
HIL_PAT_TOKEN: ${{ secrets.HIL_PAT_TOKEN }}
7594

76-
$cmakeBuildCommand = "cmake --build build --parallel 4 --config Release"
77-
Write-Host "Running: $cmakeBuildCommand"
78-
Invoke-Expression $cmakeBuildCommand
79-
cd tests
80-
python run_tests.py

0 commit comments

Comments
 (0)