Skip to content

Commit

Permalink
Merge branch 'v3_develop' of github.com:luxonis/depthai-core into moc…
Browse files Browse the repository at this point in the history
…k_isp
  • Loading branch information
asahtik committed Apr 15, 2024
2 parents 95d7067 + cb48689 commit a0dfa9c
Show file tree
Hide file tree
Showing 960 changed files with 87,823 additions and 3,400 deletions.
44 changes: 42 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
---
Checks: '-*,clang-analyzer-*,clang-diagnostic-*,readability-*,modernize-*,boost-*,bugprone-*,cppcoreguidelines-*,google-*,hicpp-*,performance-*,readability-*,-google-readability-namespace-comments,-readability-inconsistent-declaration-parameter-name,-readability-braces-around-statements,-hicpp-signed-bitwise,-google-runtime-references,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-readability-magic-numbers,-hicpp-explicit-conversions,-hicpp-uppercase-literal-suffix,-readability-uppercase-literal-suffix,-hicpp-no-array-decay,-hicpp-special-member-functions,-bugprone-narrowing-conversions,-modernize-use-nodiscard,-google-readability-braces-around-statements,-hicpp-braces-around-statements,-bugprone-suspicious-semicolon,-readability-named-parameter,-hicpp-named-parameter,-modernize-use-trailing-return-type,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-pro-bounds-constant-array-index'
Checks: >
-*,
clang-analyzer-*,
clang-diagnostic-*,
readability-*,
modernize-*,
boost-*,
bugprone-*,
cppcoreguidelines-*,
google-*,
hicpp-*,
performance-*,
readability-*,
-google-readability-namespace-comments,
-readability-inconsistent-declaration-parameter-name,
-readability-braces-around-statements,
-hicpp-signed-bitwise,
-google-runtime-references,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-readability-magic-numbers,
-hicpp-explicit-conversions,
-hicpp-uppercase-literal-suffix,
-readability-uppercase-literal-suffix,
-hicpp-no-array-decay,
-hicpp-special-member-functions,
-bugprone-narrowing-conversions,
-modernize-use-nodiscard,
-google-readability-braces-around-statements,
-hicpp-braces-around-statements,
-bugprone-suspicious-semicolon,
-readability-named-parameter,
-hicpp-named-parameter,
-modernize-use-trailing-return-type,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-bounds-constant-array-index,
-modernize-concat-nested-namespaces,
# TODO(themarpe) - Gradually bring back errors
#WarningsAsErrors: 'modernize-*,cppcoreguidelines-*,boost-*,performance-*,google-build-using-namespace,readability-else-after-return,google-readability-todo'
WarningsAsErrors: 'bugprone-throw-keyword-missing'
WarningsAsErrors: >
bugprone-throw-keyword-missing,
bugprone-unchecked-optional-access,
HeaderFilterRegex: 'core/.*\.hpp'
AnalyzeTemporaryDtors: false
FormatStyle: .clang-format
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/main.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:
branches:
- main
- develop
- gen2
- gen2_develop
- rvc3_support
- rvc3_develop
tags:
- 'v*'
pull_request:
branches:
- main
- develop
- gen2
- gen2_develop
- rvc3_support
- rvc3_develop

jobs:

Expand Down Expand Up @@ -63,10 +63,10 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
cmake: ['3.10.x', ''] # Older version (Ubuntu 18.04) and newest
cmake: ['3.14.x', ''] # Older version (Ubuntu 18.04) and newest
exclude:
- os: windows-latest
cmake: '3.10.x'
cmake: '3.14.x'

steps:
- name: Cache .hunter folder
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
echo "OpenCV_DIR=C:\tools\opencv\build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build (old CMake, gcc/Clang)
if: matrix.cmake == '3.10.x' && matrix.os != 'windows-latest'
if: matrix.cmake == '3.14.x' && matrix.os != 'windows-latest'
run: |
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 }}
cmake --build build --config Release -- -j4
Expand All @@ -122,7 +122,7 @@ jobs:
# cmake --build build

- name: Build (newest CMake)
if: matrix.cmake != '3.10.x'
if: matrix.cmake != '3.14.x'
run: |
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 }}
cmake --build build --parallel 4 --config Release
Expand Down Expand Up @@ -181,6 +181,9 @@ jobs:
echo "CMAKE_GENERATOR=Visual Studio 17 2022" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CMAKE_GENERATOR_PLATFORM=${{ matrix.platform }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup cmake
uses: jwlawson/[email protected]

- name: Configure ${{ matrix.build-type }}, shared ${{ matrix.shared }}, ${{ matrix.platform }}
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 }}

Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/python-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- main
- develop
tags:
- 'v*'
jobs:

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, [Linux, ARM], [Linux, ARM64]]
include:
- os: ubuntu-latest
arch: amd64
- os: [Linux, ARM]
arch: armv7
- os: [Linux, ARM64]
arch: armv8
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* || rm -rf /github/workspace/*"
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Set Image Name (development)
id: name
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo "LUXONIS_IMAGE_TAG=${{ github.sha }}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Set Image Name (release)
if: startsWith(github.ref, 'refs/tags/v') == true
run: echo "LUXONIS_IMAGE_TAG=${GITHUB_REF#refs/*/}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
file: bindings/python/ci/Dockerfile
tags: luxonis/depthai-library:${{ env.LUXONIS_IMAGE_TAG }}

- name: Cleanup the created image
run: docker image rm luxonis/depthai-library:${{ env.LUXONIS_IMAGE_TAG }}

upload:
needs: [build]
name: Combine into a single multi-arch image and upload tags
runs-on: ubuntu-latest
steps:

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Get Version
id: vars
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}

- name: Build and push (development)
if: startsWith(github.ref, 'refs/tags/v') != true
run: |
docker manifest create \
luxonis/depthai-library:${{ github.sha}} \
--amend luxonis/depthai-library:${{ github.sha }}-amd64 \
--amend luxonis/depthai-library:${{ github.sha }}-armv7 \
--amend luxonis/depthai-library:${{ github.sha }}-armv8
# Push
docker manifest push luxonis/depthai-library:${{ github.sha }}
- name: Build and push (release)
if: startsWith(github.ref, 'refs/tags/v') == true
run: |
docker manifest create \
luxonis/depthai-library:${{ steps.vars.outputs.short_ref }} \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-amd64 \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-armv7 \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-armv8
# Push
docker manifest push luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}
docker manifest create \
luxonis/depthai-library:latest \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-amd64 \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-armv7 \
--amend luxonis/depthai-library:${{ steps.vars.outputs.short_ref }}-armv8
docker manifest push luxonis/depthai-library:latest
Loading

0 comments on commit a0dfa9c

Please sign in to comment.