3131 - name : Cache .hunter folder
3232 uses : actions/cache@v2
3333 with :
34- path : ~/.hunter/
35- key : hunter-clang
34+ path : ~/.hunter
35+ key : hunter-macos-latest
36+ - name : List .hunter cache directory
37+ run : ls -a -l ~/.hunter/_Base/ || true
3638 - uses : actions/checkout@v2
3739 with :
3840 submodules : ' recursive'
@@ -83,14 +85,22 @@ jobs:
8385 if : startsWith(github.ref, 'refs/tags/v') != true
8486 run : echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
8587 - name : Building wheel
86- run : python3 -m pip wheel . -w ./wheelhouse/
88+ run : python3 -m pip wheel . -w ./wheelhouse/ --verbose
8789 - name : Auditing wheel
8890 run : for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat linux_armv7l -w wheelhouse/audited/; done
8991 - name : Archive wheel artifacts
9092 uses : actions/upload-artifact@v2
9193 with :
9294 name : audited-wheels
9395 path : wheelhouse/audited/
96+ - name : Deploy wheels to artifactory (if not a release)
97+ if : startsWith(github.ref, 'refs/tags/v') != true
98+ run : bash ./ci/upload-artifactory.sh
99+ env :
100+ ARTIFACTORY_URL : ${{ secrets.ARTIFACTORY_URL }}
101+ ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
102+ ARTIFACTORY_PASS : ${{ secrets.ARTIFACTORY_PASS }}
103+
94104
95105 # This job builds wheels for Windows x86_64 arch
96106 build-windows-x86_64 :
@@ -104,7 +114,7 @@ jobs:
104114 - name : Cache .hunter folder
105115 uses : actions/cache@v2
106116 with :
107- path : ~ /.hunter/
117+ path : C: /.hunter
108118 key : hunter-msvc
109119 - uses : actions/checkout@v2
110120 with :
@@ -129,12 +139,19 @@ jobs:
129139 run : |
130140 python -m pip install --upgrade pip
131141 - name : Building wheels
132- run : python -m pip wheel . -w ./wheelhouse/
142+ run : python -m pip wheel . -w ./wheelhouse/audited/ --verbose
133143 - name : Archive wheel artifacts
134144 uses : actions/upload-artifact@v2
135145 with :
136146 name : audited-wheels
137- path : wheelhouse/
147+ path : wheelhouse/audited/
148+ - name : Deploy wheels to artifactory (if not a release)
149+ if : startsWith(github.ref, 'refs/tags/v') != true
150+ run : bash ./ci/upload-artifactory.sh
151+ env :
152+ ARTIFACTORY_URL : ${{ secrets.ARTIFACTORY_URL }}
153+ ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
154+ ARTIFACTORY_PASS : ${{ secrets.ARTIFACTORY_PASS }}
138155
139156 # This job builds wheels for macOS x86_64 arch
140157 build-macos-x86_64 :
@@ -147,8 +164,11 @@ jobs:
147164 - name : Cache .hunter folder
148165 uses : actions/cache@v2
149166 with :
150- path : ~/.hunter/
151- key : hunter-clang
167+ path : ~/.hunter
168+ key : hunter-macos-latest
169+ - name : List .hunter cache directory
170+ run : ls -a -l ~/.hunter/_Base/ || true
171+
152172 - uses : actions/checkout@v2
153173 with :
154174 submodules : ' recursive'
@@ -175,14 +195,21 @@ jobs:
175195 - name : Set macos deployment target
176196 run : echo "MACOSX_DEPLOYMENT_TARGET=10.9" >> $GITHUB_ENV
177197 - name : Building wheels
178- run : python -m pip wheel . -w ./wheelhouse/
198+ run : python -m pip wheel . -w ./wheelhouse/ --verbose
179199 - name : Auditing wheels
180200 run : ci/repair-whl-macos.sh `pwd`/wheelhouse/* `pwd`/wheelhouse/audited
181201 - name : Archive wheel artifacts
182202 uses : actions/upload-artifact@v2
183203 with :
184204 name : audited-wheels
185205 path : wheelhouse/audited/
206+ - name : Deploy wheels to artifactory (if not a release)
207+ if : startsWith(github.ref, 'refs/tags/v') != true
208+ run : bash ./ci/upload-artifactory.sh
209+ env :
210+ ARTIFACTORY_URL : ${{ secrets.ARTIFACTORY_URL }}
211+ ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
212+ ARTIFACTORY_PASS : ${{ secrets.ARTIFACTORY_PASS }}
186213
187214 # This job builds wheels for x86_64 arch
188215 build-linux-x86_64 :
@@ -196,7 +223,7 @@ jobs:
196223 - name : Cache .hunter folder
197224 uses : actions/cache@v2
198225 with :
199- path : ~/.hunter/
226+ path : ~/.hunter
200227 key : hunter-x86_64
201228 - uses : actions/checkout@v2
202229 with :
@@ -217,69 +244,97 @@ jobs:
217244 - name : Specify docstring to use while building the wheel
218245 run : echo "DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/docstrings/depthai_python_docstring.hpp" >> $GITHUB_ENV
219246
247+ - name : Build and install depthai-core
248+ run : |
249+ cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
250+ cmake --build build_core --parallel --target install
251+ echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
252+
220253 - name : Append build hash if not a tagged commit
221254 if : startsWith(github.ref, 'refs/tags/v') != true
222255 run : echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
223- - name : Building a source distribution
256+
257+ - name : Building source distribution
224258 run : |
225259 /opt/python/cp38-cp38/bin/python3.8 setup.py sdist --formats=gztar
226260 mv dist/* wheelhouse/audited/
227- - name : Building wheels
228- run : for PYBIN in /opt/python/cp3*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/; done
229- - name : Auditing wheels
261+ - name : Build wheels
262+ run : for PYBIN in /opt/python/cp3*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose ; done
263+ - name : Audit wheels
230264 run : for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
231265 - name : Archive wheel artifacts
232266 uses : actions/upload-artifact@v2
233267 with :
234268 name : audited-wheels
235269 path : wheelhouse/audited/
270+ - name : Deploy wheels to artifactory (if not a release)
271+ if : startsWith(github.ref, 'refs/tags/v') != true
272+ run : bash ./ci/upload-artifactory.sh
273+ env :
274+ ARTIFACTORY_URL : ${{ secrets.ARTIFACTORY_URL }}
275+ ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
276+ ARTIFACTORY_PASS : ${{ secrets.ARTIFACTORY_PASS }}
236277
237-
238- # # Run tests
239- # tests:
240- # runs-on: luxonis-arm-tests
241- # needs: [build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-linux-x86_64]
242- # steps:
243- # - uses: actions/checkout@v2
244- # with:
245- # submodules: 'recursive'
246- # - uses: actions/download-artifact@v2
247- # with:
248- # name: audited-wheels
249- # path: wheels/depthai/
250- # - name: List files
251- # run: ls -lah
252- # - name: install DepthAI
253- # run: python3.7 -m pip install depthai --no-index --find-links file://`pwd`/wheels/depthai/
254- # - name: Run tests
255- # run: python3.7 tests/test.py
256-
257- # Deploy to artifactory
258- deploy-artifacts :
259- if : startsWith(github.ref, 'refs/tags/v') != true
260- runs-on : ubuntu-latest
261- needs : [build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-linux-x86_64]
278+ # This job builds wheels for ARM64 arch
279+ build-linux-arm64 :
280+ needs : build-docstrings
281+ runs-on : [self-hosted, linux, ARM64]
282+ container :
283+ image : quay.io/pypa/manylinux2014_aarch64
284+ env :
285+ PLAT : manylinux2014_aarch64
286+ # Mount local hunter cache directory, instead of transfering to Github and back
287+ volumes :
288+ - /.hunter:/github/home/.hunter
262289 steps :
263290 - uses : actions/checkout@v2
264291 with :
265292 submodules : ' recursive'
293+ - name : Installing libusb1-devel dependency
294+ run : yum install -y --disableplugin=fastestmirror libusb1-devel
295+ - name : Installing cmake dependency
296+ run : |
297+ /opt/python/cp38-cp38/bin/python3.8 -m pip install cmake
298+ ln -s /opt/python/cp38-cp38/bin/cmake /bin/
299+ - name : Create folder structure
300+ run : mkdir -p wheelhouse/audited/
301+
266302 - uses : actions/download-artifact@v2
303+ with :
304+ name : ' docstrings'
305+ path : docstrings
306+ - name : Specify docstring to use while building the wheel
307+ run : echo "DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/docstrings/depthai_python_docstring.hpp" >> $GITHUB_ENV
308+
309+ - name : Build and install depthai-core
310+ run : |
311+ cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
312+ cmake --build build_core --parallel --target install
313+ echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV
314+
315+ - name : Append build hash if not a tagged commit
316+ if : startsWith(github.ref, 'refs/tags/v') != true
317+ run : echo "BUILD_COMMIT_HASH=${{github.sha}}" >> $GITHUB_ENV
318+ - name : Building wheels
319+ run : for PYBIN in /opt/python/cp3*/bin; do "${PYBIN}/pip" wheel . -w ./wheelhouse/ --verbose; done
320+ - name : Auditing wheels
321+ run : for whl in wheelhouse/*.whl; do auditwheel repair "$whl" --plat $PLAT -w wheelhouse/audited/; done
322+ - name : Archive wheel artifacts
323+ uses : actions/upload-artifact@v2
267324 with :
268325 name : audited-wheels
269326 path : wheelhouse/audited/
270- - name : List files
271- run : ls -lah wheelhouse/audited/
272- - name : Run deploy to artifacts
327+ - name : Deploy wheels to artifactory (if not a release)
328+ if : startsWith(github.ref, 'refs/tags/v') != true
273329 run : bash ./ci/upload-artifactory.sh
274330 env :
275331 ARTIFACTORY_URL : ${{ secrets.ARTIFACTORY_URL }}
276332 ARTIFACTORY_USER : ${{ secrets.ARTIFACTORY_USER }}
277333 ARTIFACTORY_PASS : ${{ secrets.ARTIFACTORY_PASS }}
278334
279-
280335 release :
281336 if : startsWith(github.ref, 'refs/tags/v')
282- needs : [build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-linux-x86_64]
337+ needs : [build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-linux-x86_64, build-linux-arm64 ]
283338 runs-on : ubuntu-latest
284339
285340 steps :
@@ -301,7 +356,7 @@ jobs:
301356 # Create GitHub release
302357 - uses : actions/create-release@master
303358 id : createRelease
304- name : Create ${{ steps.releaseNote .outputs.version }} depthai-core release
359+ name : Create ${{ steps.tag .outputs.version-without-v }} depthai-core release
305360 env :
306361 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
307362 with :
@@ -337,5 +392,3 @@ jobs:
337392 PYPI_SERVER : ${{ secrets.PYPI_SERVER }}
338393 PYPI_USER : ${{ secrets.PYPI_USER }}
339394 PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
340-
341-
0 commit comments