Skip to content

Commit 800355d

Browse files
authored
Merge pull request #1103 from luxonis/release_v2.30.0.0
Release v2.30.0.0
2 parents 5b3f48c + eae8f6a commit 800355d

File tree

6 files changed

+59
-63
lines changed

6 files changed

+59
-63
lines changed

.github/workflows/docker-hub.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
args: /bin/sh -c "rm -rf /github/workspace/.* || rm -rf /github/workspace/*"
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
with:
3232
submodules: recursive
3333
- name: Login to DockerHub
@@ -46,7 +46,7 @@ jobs:
4646
run: echo "LUXONIS_IMAGE_TAG=${GITHUB_REF#refs/*/}-${{ matrix.arch }}" >> $GITHUB_ENV
4747

4848
- name: Build and push
49-
uses: docker/build-push-action@v3
49+
uses: docker/build-push-action@v4
5050
with:
5151
push: true
5252
file: ci/Dockerfile

.github/workflows/main.yml

Lines changed: 40 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Cache .hunter folder
35-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3636
with:
3737
path: ~/.hunter
3838
key: hunter-ubuntu-latest
3939
- name: List .hunter cache directory
4040
run: ls -a -l ~/.hunter/_Base/ || true
41-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@v4
4242
with:
4343
submodules: 'recursive'
4444
- name: Set up Python
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build target 'pybind11_mkdoc'
5656
run: cmake --build build --target pybind11_mkdoc --parallel 4
5757
- name: Upload docstring artifacts
58-
uses: actions/upload-artifact@v3
58+
uses: actions/upload-artifact@v4
5959
with:
6060
name: docstrings
6161
path: docstrings/
@@ -79,22 +79,22 @@ jobs:
7979
cmake-version: '3.29.x'
8080
- name: Cache .hunter folder
8181
if: matrix.os != 'windows-latest'
82-
uses: actions/cache@v3
82+
uses: actions/cache@v4
8383
with:
8484
path: ~/.hunter/
8585
key: hunter-pytest-${{ matrix.os }}
8686
- name: Cache .hunter folder
8787
if: matrix.os == 'windows-latest'
88-
uses: actions/cache@v3
88+
uses: actions/cache@v4
8989
with:
9090
path: C:/.hunter/
9191
key: hunter-pytest-${{ matrix.os }}
9292

93-
- uses: actions/checkout@v3
93+
- uses: actions/checkout@v4
9494
with:
9595
submodules: 'recursive'
9696

97-
- uses: actions/download-artifact@v3
97+
- uses: actions/download-artifact@v4
9898
with:
9999
name: 'docstrings'
100100
path: docstrings
@@ -136,20 +136,16 @@ jobs:
136136
needs: build-docstrings
137137
strategy:
138138
matrix:
139-
rpi-os: [rpi-buster, rpi-bullseye, rpi-bookworm]
139+
rpi-os: [rpi-bullseye, rpi-bookworm]
140140
runs-on: ${{ matrix.rpi-os }}
141-
env:
142-
# workaround required for cache@v3, https://github.com/actions/cache/issues/1428
143-
# to be removed when upgrading the manylinux image
144-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
145141
steps:
146142
- name: Print home directory
147143
run: echo Home directory inside container $HOME
148-
- uses: actions/checkout@v3
144+
- uses: actions/checkout@v4
149145
with:
150146
submodules: 'recursive'
151147

152-
- uses: actions/download-artifact@v3
148+
- uses: actions/download-artifact@v4
153149
with:
154150
name: 'docstrings'
155151
path: docstrings
@@ -169,9 +165,9 @@ jobs:
169165
mkdir -p wheelhouse/audited/
170166
for whl in wheelhouse/preaudited/*linux_armv6l*.whl; do cp "$whl" wheelhouse/audited/$(basename $whl); done
171167
- name: Archive wheel artifacts
172-
uses: actions/upload-artifact@v3
168+
uses: actions/upload-artifact@v4
173169
with:
174-
name: audited-wheels
170+
name: audited-wheels-${{ matrix.rpi-os }}
175171
path: wheelhouse/audited/
176172
- name: Deploy wheels to artifactory (if not a release)
177173
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -193,15 +189,15 @@ jobs:
193189
fail-fast: false
194190
steps:
195191
- name: Cache .hunter folder
196-
uses: actions/cache@v3
192+
uses: actions/cache@v4
197193
with:
198194
path: C:/.hunter
199195
key: hunter-msvc
200-
- uses: actions/checkout@v3
196+
- uses: actions/checkout@v4
201197
with:
202198
submodules: 'recursive'
203199

204-
- uses: actions/download-artifact@v3
200+
- uses: actions/download-artifact@v4
205201
with:
206202
name: 'docstrings'
207203
path: docstrings
@@ -227,9 +223,9 @@ jobs:
227223
- name: Building wheels
228224
run: python -m pip wheel . -w ./wheelhouse/audited/ --verbose
229225
- name: Archive wheel artifacts
230-
uses: actions/upload-artifact@v3
226+
uses: actions/upload-artifact@v4
231227
with:
232-
name: audited-wheels
228+
name: audited-wheels-windows-${{ matrix.python-version }}-${{ matrix.python-architecture }}
233229
path: wheelhouse/audited/
234230
- name: Deploy wheels to artifactory (if not a release)
235231
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -249,7 +245,7 @@ jobs:
249245
runs-on: ${{ matrix.os }}
250246
steps:
251247
- name: Cache .hunter folder
252-
uses: actions/cache@v3
248+
uses: actions/cache@v4
253249
with:
254250
path: ~/.hunter
255251
key: hunter-macos-latest
@@ -258,11 +254,11 @@ jobs:
258254
ls -a -l ~/.hunter/_Base/ || true
259255
echo "PATH=$PATH"
260256
261-
- uses: actions/checkout@v3
257+
- uses: actions/checkout@v4
262258
with:
263259
submodules: 'recursive'
264260

265-
- uses: actions/download-artifact@v3
261+
- uses: actions/download-artifact@v4
266262
with:
267263
name: 'docstrings'
268264
path: docstrings
@@ -288,9 +284,9 @@ jobs:
288284
- name: Auditing wheels
289285
run: ci/repair-whl-macos.sh `pwd`/wheelhouse/* `pwd`/wheelhouse/audited
290286
- name: Archive wheel artifacts
291-
uses: actions/upload-artifact@v3
287+
uses: actions/upload-artifact@v4
292288
with:
293-
name: audited-wheels
289+
name: audited-wheels-macos-${{ matrix.python-version }}-${{ matrix.os }}
294290
path: wheelhouse/audited/
295291
- name: Deploy wheels to artifactory (if not a release)
296292
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -304,21 +300,17 @@ jobs:
304300
build-linux-x86_64:
305301
needs: build-docstrings
306302
runs-on: ubuntu-latest
307-
env:
308-
# workaround required for cache@v3, https://github.com/actions/cache/issues/1428
309-
# to be removed when upgrading the manylinux image
310-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
311303
container:
312-
image: quay.io/pypa/manylinux2014_x86_64:latest
304+
image: quay.io/pypa/manylinux_2_28_x86_64:latest
313305
env:
314-
PLAT: manylinux2014_x86_64
306+
PLAT: manylinux_2_28_x86_64
315307
steps:
316308
- name: Cache .hunter folder
317-
uses: actions/cache@v3
309+
uses: actions/cache@v4
318310
with:
319311
path: ~/.hunter
320312
key: hunter-x86_64
321-
- uses: actions/checkout@v3
313+
- uses: actions/checkout@v4
322314
with:
323315
submodules: 'recursive'
324316
- name: Installing libusb1-devel dependency
@@ -330,7 +322,7 @@ jobs:
330322
- name: Create folder structure
331323
run: mkdir -p wheelhouse/audited/
332324

333-
- uses: actions/download-artifact@v3
325+
- uses: actions/download-artifact@v4
334326
with:
335327
name: 'docstrings'
336328
path: docstrings
@@ -356,9 +348,9 @@ jobs:
356348
- name: Audit wheels
357349
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
358350
- name: Archive wheel artifacts
359-
uses: actions/upload-artifact@v3
351+
uses: actions/upload-artifact@v4
360352
with:
361-
name: audited-wheels
353+
name: audited-wheels-linux-x86_64
362354
path: wheelhouse/audited/
363355
- name: Deploy wheels to artifactory (if not a release)
364356
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -372,19 +364,15 @@ jobs:
372364
build-linux-arm64:
373365
needs: build-docstrings
374366
runs-on: [self-hosted, linux, ARM64]
375-
env:
376-
# workaround required for cache@v3, https://github.com/actions/cache/issues/1428
377-
# to be removed when upgrading the manylinux image
378-
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
379367
container:
380-
image: quay.io/pypa/manylinux2014_aarch64:latest
368+
image: quay.io/pypa/manylinux_2_28_aarch64:latest
381369
env:
382-
PLAT: manylinux2014_aarch64
370+
PLAT: manylinux_2_28_aarch64
383371
# Mount local hunter cache directory, instead of transfering to Github and back
384372
volumes:
385373
- /.hunter:/github/home/.hunter
386374
steps:
387-
- uses: actions/checkout@v3
375+
- uses: actions/checkout@v4
388376
with:
389377
submodules: 'recursive'
390378
- name: Installing libusb1-devel dependency
@@ -396,7 +384,7 @@ jobs:
396384
- name: Create folder structure
397385
run: mkdir -p wheelhouse/audited/
398386

399-
- uses: actions/download-artifact@v3
387+
- uses: actions/download-artifact@v4
400388
with:
401389
name: 'docstrings'
402390
path: docstrings
@@ -417,9 +405,9 @@ jobs:
417405
- name: Auditing wheels
418406
run: for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
419407
- name: Archive wheel artifacts
420-
uses: actions/upload-artifact@v3
408+
uses: actions/upload-artifact@v4
421409
with:
422-
name: audited-wheels
410+
name: audited-wheels-linux-arm64
423411
path: wheelhouse/audited/
424412
- name: Deploy wheels to artifactory (if not a release)
425413
if: startsWith(github.ref, 'refs/tags/v') != true
@@ -435,7 +423,7 @@ jobs:
435423
runs-on: ubuntu-latest
436424

437425
steps:
438-
- uses: actions/checkout@v3
426+
- uses: actions/checkout@v4
439427
with:
440428
submodules: 'recursive'
441429

@@ -470,12 +458,13 @@ jobs:
470458
needs: [release]
471459
runs-on: ubuntu-latest
472460
steps:
473-
- uses: actions/checkout@v3
461+
- uses: actions/checkout@v4
474462
with:
475463
submodules: 'recursive'
476-
- uses: actions/download-artifact@v3
464+
- uses: actions/download-artifact@v4
477465
with:
478-
name: audited-wheels
466+
pattern: audited-wheels*
467+
merge-multiple: true
479468
path: wheelhouse/audited/
480469
- name: List files
481470
run: ls -lah

.github/workflows/test-install-dependencies.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
container:
2323
image: ${{ matrix.container_image }}
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Install sudo
2727
if: startsWith(matrix.container_image, 'fedora') == true
2828
run: yum update -y && yum install -y sudo
@@ -40,7 +40,7 @@
4040
sudo apt-get install -y python3-venv
4141
python3 -m venv .env
4242
. .env/bin/activate
43-
pip install --upgrade pip
43+
pip install --upgrade pip
4444
python3 examples/install_requirements.py
4545
shell: bash
4646
- name: Install example requirements
@@ -53,7 +53,7 @@
5353
os: ["macos-12", "macos-13", "macos-14"]
5454
runs-on: ${{ matrix.os }}
5555
steps:
56-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
5757
- name: Install dependencies
5858
run: |
5959
sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/install_dependencies.sh > tmp_script.sh
@@ -62,13 +62,13 @@
6262
run: |
6363
python3 -m venv .env
6464
. .env/bin/activate
65-
pip install --upgrade pip
65+
pip install --upgrade pip
6666
python3 examples/install_requirements.py
6767
shell: bash
6868
test_windows:
6969
runs-on: windows-latest
7070
steps:
71-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
7272
- uses: actions/setup-python@v4
7373
with:
7474
python-version: "3.10"
@@ -81,4 +81,4 @@
8181
- name: Install example requirements
8282
run: |
8383
python examples/install_requirements.py
84-
84+

src/DeviceBindings.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "depthai-shared/device/CrashDump.hpp"
1010

1111
// std::chrono bindings
12+
#include <XLink/XLinkPublicDefines.h>
1213
#include <pybind11/chrono.h>
1314
// py::detail
1415
#include <pybind11/detail/common.h>
@@ -41,8 +42,14 @@ static auto deviceSearchHelper(Args&&... args){
4142
auto numConnected = DEVICE::getAllAvailableDevices().size();
4243
if(numConnected > 0) {
4344
throw std::runtime_error("No available devices (" + std::to_string(numConnected) + " connected, but in use)");
44-
} else {
45-
throw std::runtime_error("No available devices");
45+
}
46+
auto numDevicesAnyPlatform = dai::XLinkConnection::getAllConnectedDevices(X_LINK_ANY_STATE, false, X_LINK_ANY_PLATFORM).size();
47+
auto numDevicesRVC2 = dai::XLinkConnection::getAllConnectedDevices(
48+
X_LINK_ANY_STATE, false, X_LINK_MYRIAD_X)
49+
.size();
50+
auto nonRVC2Devices = numDevicesAnyPlatform - numDevicesRVC2;
51+
if(nonRVC2Devices > 0) {
52+
throw std::runtime_error("No available RVC2 devices found, but found " + std::to_string(nonRVC2Devices) + " non RVC2 device[s]. To use RVC4 devices, please update DepthAI to version v3.x or newer.");
4653
}
4754
}
4855

src/XLinkBindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ void XLinkBindings::bind(pybind11::module &m, void *pCallstack)
133133
.def(py::init<const DeviceInfo &, std::vector<std::uint8_t> >())
134134
.def(py::init<const DeviceInfo &, std::string>())
135135
.def(py::init<const DeviceInfo &>())
136-
.def_static("getAllConnectedDevices", &XLinkConnection::getAllConnectedDevices, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevices") = true)
136+
.def_static("getAllConnectedDevices", &XLinkConnection::getAllConnectedDevices, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevices") = true, py::arg("platform") = X_LINK_MYRIAD_X)
137137
.def_static("getFirstDevice", &XLinkConnection::getFirstDevice, py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevice") = true)
138138
.def_static("getDeviceByMxId", &XLinkConnection::getDeviceByMxId, py::arg("mxId"), py::arg("state") = X_LINK_ANY_STATE, py::arg("skipInvalidDevice") = true)
139139
.def_static("bootBootloader", &XLinkConnection::bootBootloader, py::arg("devInfo"))

0 commit comments

Comments
 (0)