Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-architecture: [x64, x86]
steps:
- name: Cache .hunter folder
uses: actions/cache@v2
Expand All @@ -32,9 +33,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-architecture }}
- name: Append build hash if not a tagged commit
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}'
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -51,7 +53,7 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
steps:
- name: Cache .hunter folder
uses: actions/cache@v2
Expand All @@ -67,14 +69,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Append build hash if not a tagged commit
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}'
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
brew install libusb
python -m pip install delocate
- name: Set macos deployment target
run: echo '::set-env name=MACOSX_DEPLOYMENT_TARGET::10.9'
run: echo "MACOSX_DEPLOYMENT_TARGET=10.9" >> $GITHUB_ENV
- name: Building wheels
run: python -m pip wheel . -w ./wheelhouse/
- name: Auditing wheels
Expand Down Expand Up @@ -111,10 +113,10 @@ jobs:
run: mkdir -p wheelhouse/audited/
- name: Append build hash if not a tagged commit
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}'
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
- name: Building a source distribution
run: |
/opt/python/cp38-cp38/bin/python3.8 setup.py sdist --formats=gztar,zip
/opt/python/cp38-cp38/bin/python3.8 setup.py sdist --formats=gztar
mv dist/* wheelhouse/audited/
- name: Building wheels
run: for PYBIN in /opt/python/cp3*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/; done
Expand All @@ -141,7 +143,7 @@ jobs:
submodules: 'recursive'
- name: Append build hash if not a tagged commit
if: startsWith(github.ref, 'refs/tags/v') != true
run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}'
run: echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
- name: Building wheel
run: python3 -m pip wheel . -w ./wheelhouse/
- name: Auditing wheel
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,13 @@ target_link_libraries(${TARGET_NAME}

# Add bindings revision
target_compile_definitions(${TARGET_NAME} PRIVATE DEPTHAI_PYTHON_BINDINGS_REVISION="${PROJECT_VERSION}")
# Add commit hash, default to "dev"
if(NOT DEPTHAI_PYTHON_COMMIT_HASH)

# Add default commit hash (dev) if not build by CI
if(NOT DEFINED ENV{CI} AND NOT DEPTHAI_PYTHON_COMMIT_HASH)
set(DEPTHAI_PYTHON_COMMIT_HASH dev)
endif()

# Add compile definition for bindings
if(DEPTHAI_PYTHON_COMMIT_HASH)
target_compile_definitions(${TARGET_NAME} PRIVATE DEPTHAI_PYTHON_COMMIT_HASH="${DEPTHAI_PYTHON_COMMIT_HASH}")
endif()
Expand Down
2 changes: 1 addition & 1 deletion depthai-core
Submodule depthai-core updated 0 files