Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rvc3_develop' into rvc3_image_tr…
Browse files Browse the repository at this point in the history
…ansformations
  • Loading branch information
Matevz Morato committed Aug 16, 2023
2 parents f3e55d5 + c458289 commit a95a041
Show file tree
Hide file tree
Showing 170 changed files with 4,700 additions and 811 deletions.
51 changes: 41 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -474,23 +474,17 @@ jobs:
with:
submodules: 'recursive'

# Get tag version
# TODO(themarpe) - Node12, has to be updated
- name: Get tag version
id: tag
uses: battila7/get-version-action@v2

- uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Check if version matches
run: python3.8 -c 'import find_version as v; exit(0) if "${{ steps.tag.outputs.version-without-v }}" == v.get_package_version() else exit(1)'
run: python3.8 -c 'import find_version as v; exit(0) if "${{ github.ref_name }}" == f"v{v.get_package_version()}" else exit(1)'

# Create GitHub release
- uses: actions/create-release@master
id: createRelease
name: Create ${{ steps.tag.outputs.version-without-v }} depthai-core release
name: Create ${{ github.ref_name }} depthai-python release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -505,8 +499,8 @@ jobs:
draft: true

# Deploy to PyPi. Only when a commit is tagged
deploy-pypi:
# Deploy to PyPi and Artifactory. Only when a commit is tagged
deploy:
if: startsWith(github.ref, 'refs/tags/v')
needs: [release]
runs-on: ubuntu-latest
Expand All @@ -526,6 +520,12 @@ jobs:
PYPI_SERVER: ${{ secrets.PYPI_SERVER }}
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Run deploy to Artifactory
run: bash ./ci/upload-artifactory-release.sh
env:
ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }}

notify_robothub:
if: startsWith(github.ref, 'refs/tags/v')
Expand All @@ -539,3 +539,34 @@ jobs:
repository: luxonis/robothub-apps
event-type: depthai-python-release
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

# notify_hil_workflow_linux_x86_64:
# needs: [build-linux-x86_64]
# runs-on: ubuntu-latest
# steps:
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v2
# with:
# token: ${{ secrets.HIL_CORE_DISPATCH_TOKEN }}
# repository: luxonis/depthai-core-hil-tests
# event-type: python-hil-event
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

notify_hil_workflow_linux_x86_64:
needs: [build-linux-x86_64]
runs-on: ubuntu-latest
steps:
- name: Dispatch an action and get the run ID
uses: codex-/return-dispatch@v1
id: return_dispatch
with:
token: ${{ secrets.HIL_CORE_DISPATCH_TOKEN }} # Note this is NOT GITHUB_TOKEN but a PAT
ref: main # or refs/heads/target_branch
repo: depthai-core-hil-tests
owner: luxonis
workflow: regression_test.yml
workflow_inputs: '{"commit": "${{ github.ref }}", "sha": "${{ github.sha }}", "parent_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
workflow_timeout_seconds: 120 # Default: 300

- name: Release
run: echo "https://github.com/luxonis/depthai-core-hil-tests/actions/runs/${{steps.return_dispatch.outputs.run_id}}" >> $GITHUB_STEP_SUMMARY
64 changes: 64 additions & 0 deletions .github/workflows/test-install-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: OS Support

on:
workflow_dispatch:
push:
paths:
- 'docs/source/_static/install_dependencies.sh'
- 'examples/install_requirements.py'
pull_request:
paths:
- 'docs/source/_static/install_dependencies.sh'
- 'examples/install_requirements.py'

jobs:
test_linux:
runs-on: ubuntu-latest
strategy:
matrix:
container_image: ["fedora:34", "fedora:35", "fedora:36", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:22.10"]
container:
image: ${{ matrix.container_image }}
steps:
- uses: actions/checkout@v3
- name: Install sudo
if: startsWith(matrix.container_image, 'fedora') == true
run: yum update -y && yum install -y sudo
- name: Install sudo
if: startsWith(matrix.container_image, 'ubuntu') == true
run: apt-get update -qq && apt-get -qq install sudo
- name: Install dependencies
run: |
ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone # Otherwise tzdata installer prompts for user input
sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/source/_static/install_dependencies.sh > tmp_script.sh # Doesn't work on docker
bash tmp_script.sh
- name: Install example requirements
run: |
python3 examples/install_requirements.py
test_macos:
strategy:
matrix:
os: ["macos-11", "macos-12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sed '/udevadm control --reload-rules && sudo udevadm trigger/d' docs/source/_static/install_dependencies.sh > tmp_script.sh
bash tmp_script.sh
- name: Install example requirements
run: |
python3 examples/install_requirements.py
test_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Download chocolatey
shell: pwsh
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
- name: Install dependencies
shell: pwsh
run: choco install cmake git python --version 3.10 -y
- name: Install example requrirements
run: |
python examples/install_requirements.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ wheelhouse/
.venv
env/
venv/
venv_*/
ENV/
env.bak/
venv.bak/
Expand Down
3 changes: 1 addition & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ sphinx:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
formats:
- pdf
formats: []

# Optionally set the version of Python and requirements required to build your docs
python:
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generated/Hunter/config.cmake ${final_hun

include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.322.tar.gz"
SHA1 "cb0ea1f74f4a2c49a807de34885743495fccccbe"
URL "https://github.com/cpp-pm/hunter/archive/v0.24.18.tar.gz"
SHA1 "1292e4d661e1770d6d6ca08c12c07cf34a0bf718"
FILEPATH ${CMAKE_CURRENT_BINARY_DIR}/generated/Hunter/config.cmake # Combined config
)

Expand Down Expand Up @@ -107,6 +107,7 @@ set(SOURCE_LIST
src/pipeline/node/XLinkInBindings.cpp
src/pipeline/node/XLinkOutBindings.cpp
src/pipeline/node/ColorCameraBindings.cpp
src/pipeline/node/CameraBindings.cpp
src/pipeline/node/MonoCameraBindings.cpp
src/pipeline/node/StereoDepthBindings.cpp
src/pipeline/node/NeuralNetworkBindings.cpp
Expand All @@ -129,6 +130,8 @@ set(SOURCE_LIST
src/pipeline/node/WarpBindings.cpp
src/pipeline/node/SyncBindings.cpp
src/pipeline/node/BenchmarkBindings.cpp
src/pipeline/node/UVCBindings.cpp
src/pipeline/node/ToFBindings.cpp

src/pipeline/datatype/ADatatypeBindings.cpp
src/pipeline/datatype/AprilTagConfigBindings.cpp
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include README.md LICENSE CMakeLists.txt pyproject.toml
include find_version.py
include generate_stubs.py
graft cmake
graft generated
graft ci
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ If `TEST_TIMEOUT=0`, the test will run until stopped or it ends.

## Tested platforms

- Windows 10
- Ubuntu 16.04, 18.04;
- Windows 10, Windows 11
- Ubuntu 18.04, 20.04, 22.04;
- Raspbian 10;
- macOS 10.14.6, 10.15.4;

Expand Down
9 changes: 9 additions & 0 deletions ci/upload-artifactory-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

curl -fL https://getcli.jfrog.io | sh

cd wheelhouse/audited/ || exit 1
export PATH_PREFIX=luxonis-python-release-local/depthai

../../jfrog config add --artifactory-url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS
../../jfrog rt u "*" "$PATH_PREFIX/"
2 changes: 1 addition & 1 deletion depthai-core
Submodule depthai-core updated 161 files
2 changes: 1 addition & 1 deletion docs/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath(source_directory / ".." / "_extensions"))
# -- Project information -----------------------------------------------------

project = "DepthAI API Docs"
copyright = u"@build_year@, Luxonis"
html_show_copyright=False
author = "Luxonis"
version = u"@DEPTHAI_PYTHON_VERSION@"
release = version
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ sphinx-autopackagesummary==1.3
autodocsumm==0.2.2
pathlib==1.0.1
jinja2==3.0.3
urllib3==1.26.15 # New urllib version breaks sphinx
-r ./requirements_mkdoc.txt
4 changes: 2 additions & 2 deletions docs/requirements_mkdoc.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
git+https://github.com/luxonis/pybind11_mkdoc.git@47a353ae22a3ca2fe1ca47f47b38613dcfb1043b
numpy # Needed because of xtensor-python
git+https://github.com/luxonis/pybind11_mkdoc.git@59746f8d1645c9f00ebfb534186334d0154b5bd6
numpy # Needed because of xtensor-python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/images/components/disparity_explanation.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/source/_static/images/logo.png
Binary file not shown.
30 changes: 9 additions & 21 deletions docs/source/_static/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing dependencies. Could be a bug in the installer or unsupported platform. Open a bug report over at https://github.com/luxonis/depthai - exited with status $RET at line $LINENO \x1b[0m\n" ; exit $RET' ERR
trap 'RET=$? ; echo -e >&2 "\n\x1b[31mFailed installing dependencies. Could be a bug in the installer or unsupported platform. Open a bug report over at https://github.com/luxonis/depthai - exited with status $RET at line $LINENO \x1b[0m\n" ;
exit $RET' ERR

readonly linux_pkgs=(
python3
Expand Down Expand Up @@ -50,7 +51,7 @@ readonly ubuntu_pkgs_pre22_04=(
libdc1394-22-dev
)

readonly ubuntu_pkgs_22_04=(
readonly ubuntu_pkgs_post22_04=(
"${ubuntu_pkgs[@]}"
libdc1394-dev
)
Expand Down Expand Up @@ -96,26 +97,11 @@ print_and_exec () {
if [[ $(uname) == "Darwin" ]]; then
echo "During Homebrew install, certain commands need 'sudo'. Requesting access..."
sudo true
arch_cmd=
if [[ $(uname -m) == "arm64" ]]; then
arch_cmd="arch -x86_64"
echo "Running in native arm64 mode, will prefix commands with: $arch_cmd"
# Check if able to run with x86_64 emulation
retcode=0
$arch_cmd true || retcode=$?
if [[ $retcode -ne 0 ]]; then
print_action "=== Installing Rosetta 2 - Apple binary translator"
# Prompts the user to agree to license: <A> <Enter>
# Could be automated by adding: --agree-to-license
print_and_exec softwareupdate --install-rosetta
fi
fi
homebrew_install_url="https://raw.githubusercontent.com/Homebrew/install/master/install.sh"
print_action "Installing Homebrew from $homebrew_install_url"
# CI=1 will skip some interactive prompts
CI=1 $arch_cmd /bin/bash -c "$(curl -fsSL $homebrew_install_url)"
print_and_exec $arch_cmd brew install python3 git
print_and_exec python3 -m pip install -U pip
CI=1 /bin/bash -c "$(curl -fsSL $homebrew_install_url)"
print_and_exec brew install git
echo
echo "=== Installed successfully! IMPORTANT: For changes to take effect,"
echo "please close and reopen the terminal window, or run: exec \$SHELL"
Expand All @@ -126,8 +112,8 @@ elif [ -f /etc/os-release ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" || "$ID_LIKE" == "ubuntu" || "$ID_LIKE" == "debian" || "$ID_LIKE" == "ubuntu debian" ]]; then
if [[ ! $(uname -m) =~ ^arm* ]]; then
sudo apt-get update
if [[ "$VERSION_ID" == "22.04" ]]; then
sudo apt-get install -y "${ubuntu_pkgs_22_04[@]}"
if [[ "$VERSION_ID" > "22.04" || "$VERSION_ID" == "22.04" ]]; then
sudo apt-get install -y "${ubuntu_pkgs_post22_04[@]}"
else
sudo apt-get install -y "${ubuntu_pkgs_pre22_04[@]}"
fi
Expand Down Expand Up @@ -177,3 +163,5 @@ else
echo "ERROR: Host not supported"
exit 99
fi

echo "Finished installing global libraries."
Loading

0 comments on commit a95a041

Please sign in to comment.