Skip to content

Commit 011d8b9

Browse files
authored
Merge pull request #1317 from luxonis/v3_cleanup
v3 installation & general clean-up
2 parents 789b991 + 05c810a commit 011d8b9

File tree

124 files changed

+1123
-1530
lines changed

Some content is hidden

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

124 files changed

+1123
-1530
lines changed

.github/workflows/bom.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ jobs:
6060
- name: Checkout source code from tag
6161
uses: actions/checkout@v3
6262
with:
63-
ref: ${{ github.event.inputs.depthai }}
63+
ref: ${{ github.event.inputs.depthai }}
6464
path: depthai-core
6565
submodules: 'recursive'
6666

6767
- name: Prepare HIL Framework
68-
run: source scripts/hil/prepare_hil_framework.sh
68+
run: source scripts/hil/prepare_hil_framework.sh
6969

7070
- name: Configure, Build and Test
7171
run: |
@@ -83,7 +83,7 @@ jobs:
8383
export RESERVATION_NAME="https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID#rvc4-depthai-bom"
8484
RESERVATION_OPTION="--reservation-name $RESERVATION_NAME"
8585
fi
86-
86+
8787
if [[ "${{ github.event.inputs.hold_reservation }}" == 'true' ]]; then
8888
HOLD_RESERVATION="--hold-reservation"
8989
fi

.github/workflows/main.workflow.yml

Lines changed: 66 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -6,83 +6,65 @@ on:
66
branches:
77
- main
88
- develop
9-
- rvc3_support
10-
- rvc3_develop
9+
- v3_develop
1110
tags:
1211
- 'v2*'
1312
pull_request:
1413
branches:
1514
- main
1615
- develop
17-
- rvc3_support
18-
- rvc3_develop
16+
- v3_develop
1917

2018
jobs:
2119

2220
style:
23-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-24.04
2422

2523
steps:
26-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2725
with:
2826
submodules: 'recursive'
2927

3028
- name: Install format dependencies
3129
run: |
32-
sudo apt-get install clang-format-10
30+
sudo apt-get update
31+
sudo apt-get install clang-format-18 libopencv-dev libudev-dev
3332
3433
- name: configure
35-
run: cmake . -Bbuild -DDEPTHAI_CLANG_FORMAT=ON -DCLANG_FORMAT_BIN=clang-format-10
34+
run: cmake . -Bbuild -DDEPTHAI_CLANG_FORMAT=ON -DCLANG_FORMAT_BIN=/usr/bin/clang-format-18
3635

3736
- name: check style
3837
run: ci/check_format.sh build
3938

4039

4140
tidy:
42-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-24.04
4342

4443
steps:
45-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
4645
with:
4746
submodules: 'recursive'
4847

4948
- name: Install dependencies
5049
run: |
5150
sudo apt-get update
52-
sudo apt-get install clang-tidy-10
51+
sudo apt-get install clang-tidy-18 libopencv-dev libudev-dev
5352
5453
- name: configure
55-
run: cmake . -Bbuild -DDEPTHAI_CLANG_TIDY=ON -DCLANG_TIDY_BIN=clang-tidy-10
54+
run: cmake . -Bbuild -DDEPTHAI_CLANG_TIDY=ON -DCLANG_TIDY_BIN=/usr/bin/clang-tidy-18
5655

5756
- name: Run clang-tidy
5857
run: cmake --build build --parallel 4
5958

60-
6159
build:
6260
runs-on: ${{ matrix.os }}
6361
strategy:
6462
matrix:
6563
os: [macos-latest, windows-latest, ubuntu-latest]
66-
cmake: ['3.14.x', ''] # Older version (Ubuntu 18.04) and newest
67-
exclude:
68-
- os: windows-latest
69-
cmake: '3.14.x'
64+
cmake: ['3.29.x']
7065

7166
steps:
72-
- name: Cache .hunter folder
73-
if: matrix.os != 'windows-latest'
74-
uses: actions/cache@v3
75-
with:
76-
path: ~/.hunter/
77-
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
78-
- name: Cache .hunter folder
79-
if: matrix.os == 'windows-latest'
80-
uses: actions/cache@v3
81-
with:
82-
path: C:/.hunter/
83-
key: hunter-${{ matrix.os }}-${{ matrix.cmake }}
84-
85-
- uses: actions/checkout@v3
67+
- uses: actions/checkout@v4
8668
with:
8769
submodules: 'recursive'
8870

@@ -100,65 +82,42 @@ jobs:
10082
if: matrix.os == 'ubuntu-latest'
10183
run: |
10284
sudo apt-get update
103-
sudo apt-get install libopencv-dev
85+
sudo apt-get install libopencv-dev libudev-dev
10486
10587
- name: Install dependencies
10688
if: matrix.os == 'windows-latest'
10789
run: |
10890
choco install opencv
10991
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
11092
111-
- name: Build (old CMake, gcc/Clang)
112-
if: matrix.cmake == '3.14.x' && matrix.os != 'windows-latest'
93+
- name: Build
11394
run: |
114-
cmake -H. -Bbuild -D'CMAKE_BUILD_TYPE=Release' -D'HUNTER_CONFIGURATION_TYPES=Release' -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_BUILD_TESTS=ON' ${{ env.CMAKE_ARGS }}
115-
cmake --build build --config Release -- -j4
116-
117-
# CMake binaries unavailable
118-
# - name: Build (old CMake, MSVC)
119-
# if: matrix.cmake == '3.10.x' && matrix.os == 'windows-latest'
120-
# run: |
121-
# cmake -H. -Bbuild -D'DEPTHAI_BUILD_EXAMPLES=ON' -D'DEPTHAI_BUILD_TESTS=ON'
122-
# cmake --build build
123-
124-
- name: Build (newest CMake)
125-
if: matrix.cmake != '3.14.x'
126-
run: |
127-
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D HUNTER_CONFIGURATION_TYPES=Release -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON ${{ env.CMAKE_ARGS }}
95+
cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -D DEPTHAI_BUILD_EXAMPLES=ON -D DEPTHAI_BUILD_TESTS=ON ${{ env.CMAKE_ARGS }}
12896
cmake --build build --parallel 4 --config Release
12997
13098
integration:
13199
runs-on: ${{ matrix.os }}
132100
strategy:
133101
matrix:
134102
os: [macos-latest, windows-latest, ubuntu-latest]
135-
build-type: [Debug, Release]
136-
shared: [true, false]
103+
# TODO(Morato) - add back Debug builds to CI
104+
# build-type: [Debug, Release]
105+
build-type: [Release]
106+
# shared: [true, false]
107+
shared: [true]
137108
platform: [x64]
138-
include:
139-
- platform: Win32
140-
os: windows-latest
141-
shared: true
142-
build-type: Debug
143-
- platform: Win32
144-
os: windows-latest
145-
shared: true
146-
build-type: Release
109+
# TODO(Morato) - add back Win32 and shared builds to CI
110+
# include:
111+
# - platform: Win32
112+
# os: windows-latest
113+
# shared: true
114+
# build-type: Debug
115+
# - platform: Win32
116+
# os: windows-latest
117+
# shared: true
118+
# build-type: Release
147119
steps:
148-
- name: Cache .hunter folder
149-
if: matrix.os != 'windows-latest'
150-
uses: actions/cache@v3
151-
with:
152-
path: ~/.hunter/
153-
key: hunter-${{ matrix.os }}-shared_${{ matrix.shared }}
154-
- name: Cache .hunter folder
155-
if: matrix.os == 'windows-latest'
156-
uses: actions/cache@v3
157-
with:
158-
path: C:/.hunter/
159-
key: hunter-${{ matrix.os }}-shared_${{ matrix.shared }}
160-
161-
- uses: actions/checkout@v3
120+
- uses: actions/checkout@v4
162121
with:
163122
submodules: 'recursive'
164123

@@ -171,7 +130,7 @@ jobs:
171130
if: matrix.os == 'ubuntu-latest'
172131
run: |
173132
sudo apt-get update
174-
sudo apt-get install libopencv-dev
133+
sudo apt-get install libopencv-dev libudev-dev
175134
176135
- name: Install dependencies
177136
if: matrix.os == 'windows-latest'
@@ -183,6 +142,8 @@ jobs:
183142
184143
- name: Setup cmake
185144
uses: jwlawson/[email protected]
145+
with:
146+
cmake-version: '3.29.x'
186147

187148
- name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
188149
run: cmake -S . -B build -D BUILD_SHARED_LIBS=${{ matrix.shared}} -D CMAKE_BUILD_TYPE=${{ matrix.build-type }} -D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/depthai_install ${{ env.CMAKE_ARGS }}
@@ -196,38 +157,38 @@ jobs:
196157

197158
- name: Upload Win64 shared library
198159
if: matrix.os == 'windows-latest' && matrix.shared && matrix.platform == 'x64'
199-
uses: actions/upload-artifact@v3
200-
with:
201-
name: windows-prebuilt-win64
202-
path: ${{ env.GITHUB_WORKSPACE }}/depthai_install/
203-
204-
- name: Upload Win32 shared library
205-
if: matrix.os == 'windows-latest' && matrix.shared && matrix.platform == 'Win32'
206-
uses: actions/upload-artifact@v3
160+
uses: actions/upload-artifact@v4
207161
with:
208-
name: windows-prebuilt-win32-no-opencv
162+
name: windows-prebuilt-win64-${{ matrix.build-type }}
209163
path: ${{ env.GITHUB_WORKSPACE }}/depthai_install/
210-
211-
- name: Build and test add_subdirectory
212-
run: |
213-
cmake -S tests/integration/ -B tests/integration/build_add_subdirectory -D TEST_FIND_PACKAGE=OFF ${{ env.CMAKE_ARGS }}
214-
cmake --build tests/integration/build_add_subdirectory --config ${{ matrix.build-type }} --parallel 4
215-
cd tests/integration/build_add_subdirectory
216-
ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error
164+
# TODO(Morato) - add back Win32 and shared builds to CI
165+
# - name: Upload Win32 shared library
166+
# if: matrix.os == 'windows-latest' && matrix.shared && matrix.platform == 'Win32'
167+
# uses: actions/upload-artifact@v4
168+
# with:
169+
# name: windows-prebuilt-win32-no-opencv-${{ matrix.build-type }}
170+
# path: ${{ env.GITHUB_WORKSPACE }}/depthai_install/
171+
172+
# - name: Build and test add_subdirectory
173+
# run: |
174+
# cmake -S tests/integration/ -B tests/integration/build_add_subdirectory -D TEST_FIND_PACKAGE=OFF ${{ env.CMAKE_ARGS }}
175+
# cmake --build tests/integration/build_add_subdirectory --config ${{ matrix.build-type }} --parallel 4
176+
# cd tests/integration/build_add_subdirectory
177+
# ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error
217178

218179
- name: Build and test find_package (installed)
219180
run: |
220-
cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/depthai_install/lib/cmake/depthai ${{ env.CMAKE_ARGS }}
181+
cmake -S tests/integration/ -B tests/integration/build_find_package -D TEST_FIND_PACKAGE=ON -D CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/depthai_install/ ${{ env.CMAKE_ARGS }}
221182
cmake --build tests/integration/build_find_package --config ${{ matrix.build-type }} --parallel 4
222183
cd tests/integration/build_find_package
223184
ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error
224185
225-
- name: Build and test find_package (build directory)
226-
run: |
227-
cmake -S tests/integration/ -B tests/integration/build_find_package_2 -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/build ${{ env.CMAKE_ARGS }}
228-
cmake --build tests/integration/build_find_package_2 --config ${{ matrix.build-type }} --parallel 4
229-
cd tests/integration/build_find_package_2
230-
ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error
186+
# - name: Build and test find_package (build directory)
187+
# run: |
188+
# cmake -S tests/integration/ -B tests/integration/build_find_package_2 -D TEST_FIND_PACKAGE=ON -D depthai_DIR=$GITHUB_WORKSPACE/build ${{ env.CMAKE_ARGS }}
189+
# cmake --build tests/integration/build_find_package_2 --config ${{ matrix.build-type }} --parallel 4
190+
# cd tests/integration/build_find_package_2
191+
# ctest -C ${{ matrix.build-type }} --output-on-failure --no-tests=error
231192

232193

233194
release:
@@ -237,7 +198,7 @@ jobs:
237198

238199
# Clone repository
239200
steps:
240-
- uses: actions/checkout@v3
201+
- uses: actions/checkout@v4
241202
with:
242203
submodules: 'recursive'
243204

@@ -251,22 +212,24 @@ jobs:
251212
#- name: Check if version matches
252213
# run: |
253214

254-
- uses: actions/setup-python@v3
215+
- uses: actions/setup-python@v4
255216
with:
256217
python-version: '3.8'
257218
- name: Install dependencies
258219
run: python3.8 -m pip install git-archive-all
259220

260221
- name: Download Win64 artifacts
261-
uses: actions/download-artifact@v3
222+
uses: actions/download-artifact@v4
262223
with:
263-
name: 'windows-prebuilt-win64'
224+
pattern: windows-prebuilt-win64*
225+
merge-multiple: true
264226
path: depthai-core-${{ steps.tag.outputs.version }}-win64
265227

266228
- name: Download Win32 artifacts
267-
uses: actions/download-artifact@v3
229+
uses: actions/download-artifact@v4
268230
with:
269-
name: 'windows-prebuilt-win32-no-opencv'
231+
pattern: windows-prebuilt-win32-no-opencv*
232+
merge-multiple: true
270233
path: depthai-core-${{ steps.tag.outputs.version }}-win32-no-opencv
271234

272235
- name: Create release assets

.github/workflows/python-main.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ jobs:
5959
sudo apt install libusb-1.0-0-dev pkg-config bison autoconf libtool libxi-dev libxtst-dev libxrandr-dev libx11-dev libxft-dev libxext-dev nasm flex libudev-dev automake libltdl-dev
6060
python -m pip install -r bindings/python/docs/requirements_mkdoc.txt
6161
- name: Configure project
62-
run: cmake -S . -B build -DDEPTHAI_BUILD_PYTHON=ON -DDEPTHAI_PYTHON_FORCE_DOCSTRINGS=ON -DDEPTHAI_BASALT_SUPPORT=ON -DDEPTHAI_PCL_SUPPORT=ON -DDEPTHAI_RTABMAP_SUPPORT=ON -DDEPTHAI_PYTHON_DOCSTRINGS_OUTPUT="$PWD/bindings/python/docstrings/depthai_python_docstring.hpp"
62+
run: |
63+
cmake -S . \
64+
-B build \
65+
-DDEPTHAI_VCPKG_INTERNAL_ONLY=OFF \
66+
-DDEPTHAI_BUILD_PYTHON=ON \
67+
-DDEPTHAI_PYTHON_FORCE_DOCSTRINGS=ON \
68+
-DDEPTHAI_BASALT_SUPPORT=ON \
69+
-DDEPTHAI_PCL_SUPPORT=ON \
70+
-DDEPTHAI_RTABMAP_SUPPORT=ON \
71+
-DDEPTHAI_PYTHON_DOCSTRINGS_OUTPUT="$PWD/bindings/python/docstrings/depthai_python_docstring.hpp"
6372
- name: Build target 'pybind11_mkdoc'
6473
run: cmake --build build --target pybind11_mkdoc --parallel 4
6574
- name: Print out vcpkg logs if building port fails
@@ -151,8 +160,14 @@ jobs:
151160
152161
- name: Compile
153162
run: |
154-
cmake -S . -B build -DDEPTHAI_BUILD_PYTHON=ON -D CMAKE_BUILD_TYPE=Release -D DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/bindings/python/docstrings/depthai_python_docstring.hpp -D DEPTHAI_PYTHON_ENABLE_TESTS=ON
155-
cmake --build build --parallel 4
163+
cmake -S . \
164+
-B build \
165+
-DDEPTHAI_VCPKG_INTERNAL_ONLY=OFF \
166+
-DDEPTHAI_BUILD_PYTHON=ON \
167+
-D CMAKE_BUILD_TYPE=Release \
168+
-D DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/bindings/python/docstrings/depthai_python_docstring.hpp \
169+
-D DEPTHAI_PYTHON_ENABLE_TESTS=ON
170+
cmake --build build --parallel 4
156171
- name: Print out vcpkg logs if building port fails
157172
if: failure() # Only run this if the build step fails
158173
run: cd bindings/python && bash ./ci/show_vcpkg_logs.sh
@@ -625,7 +640,7 @@ jobs:
625640
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
626641
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
627642
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}
628-
643+
629644
dispatch-bom-tests:
630645
needs: [build-linux-x86_64, deploy]
631646
runs-on: ubuntu-latest
@@ -671,21 +686,21 @@ jobs:
671686
TOKEN=${{ secrets.BOM_GITHUB_TOKEN }}
672687
OWNER="luxonis"
673688
REPO="luxonis-bom"
674-
689+
675690
echo "STARTING TO WAIT FOR RUN https://github.com/$OWNER/$REPO/actions/runs/$RUN_ID"
676-
691+
677692
STATUS=$(curl -s --header "Authorization: Bearer $TOKEN" "https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID" | jq -r .status)
678-
693+
679694
while [ "$STATUS" != "completed" ]; do
680695
echo "Waiting for the workflow run to complete..."
681696
sleep 60
682697
STATUS=$(curl -s -H "Authorization: Bearer $TOKEN" "https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID" | jq -r .status)
683698
echo "Current status $STATUS"
684699
done
685700
CONCLUSION=$(curl -s -H "Authorization: Bearer $TOKEN" "https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID" | jq -r .conclusion)
686-
701+
687702
echo "Run $RUN_ID is completed. Conclusion is $CONCLUSION"
688-
703+
689704
# Set outputs for the job using GITHUB_OUTPUT file
690705
echo "runner_conclusion=$CONCLUSION" >> $GITHUB_OUTPUT
691706
if [ "$CONCLUSION" != "success" ] && [ "$CONCLUSION" != "skipped" ]; then

0 commit comments

Comments
 (0)