|
67 | 67 | needs: build-docstrings |
68 | 68 | strategy: |
69 | 69 | matrix: |
70 | | - os: [ubuntu-latest, windows-2019, macos-latest] |
| 70 | + os: [ubuntu-latest, windows-latest, macos-latest] |
71 | 71 | runs-on: ${{ matrix.os }} |
72 | 72 | steps: |
73 | 73 | - name: Print home directory |
@@ -239,7 +239,9 @@ jobs: |
239 | 239 | path: ~/.hunter |
240 | 240 | key: hunter-macos-latest |
241 | 241 | - name: List .hunter cache directory |
242 | | - run: ls -a -l ~/.hunter/_Base/ || true |
| 242 | + run: | |
| 243 | + ls -a -l ~/.hunter/_Base/ || true |
| 244 | + echo "PATH=$PATH" |
243 | 245 |
|
244 | 246 | - uses: actions/checkout@v2 |
245 | 247 | with: |
@@ -283,6 +285,63 @@ jobs: |
283 | 285 | ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} |
284 | 286 | ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }} |
285 | 287 |
|
| 288 | + # This job builds wheels for macOS arm64 arch |
| 289 | + build-macos-arm64: |
| 290 | + needs: build-docstrings |
| 291 | + runs-on: [self-hosted, macOS, ARM64] |
| 292 | + steps: |
| 293 | + # Cached locally on runner |
| 294 | + # - name: Cache .hunter folder |
| 295 | + # uses: actions/cache@v2 |
| 296 | + # with: |
| 297 | + # path: ~/.hunter |
| 298 | + # key: hunter-macos-latest |
| 299 | + - name: List .hunter cache directory |
| 300 | + run: | |
| 301 | + ls -a -l ~/.hunter/_Base/ || true |
| 302 | + echo "PATH=$PATH" |
| 303 | +
|
| 304 | + - uses: actions/checkout@v2 |
| 305 | + with: |
| 306 | + submodules: 'recursive' |
| 307 | + |
| 308 | + - uses: actions/download-artifact@v2 |
| 309 | + with: |
| 310 | + name: 'docstrings' |
| 311 | + path: docstrings |
| 312 | + - name: Specify docstring to use while building the wheel |
| 313 | + run: echo "DEPTHAI_PYTHON_DOCSTRINGS_INPUT=$PWD/docstrings/depthai_python_docstring.hpp" >> $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 | + |
| 319 | + # - name: Build and install depthai-core |
| 320 | + # run: | |
| 321 | + # echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV |
| 322 | + # cmake -S depthai-core/ -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake |
| 323 | + # cmake --build build_core --target install --parallel 4 |
| 324 | + # echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV |
| 325 | + |
| 326 | + - name: Build wheels |
| 327 | + run: for PYBIN in {9..10}; do "python3.${PYBIN}" -m pip wheel . -w wheelhouse/ --verbose; done |
| 328 | + |
| 329 | + - name: Auditing wheels |
| 330 | + run: delocate-wheel -v -w wheelhouse/audited wheelhouse/*.whl |
| 331 | + |
| 332 | + - name: Archive wheel artifacts |
| 333 | + uses: actions/upload-artifact@v2 |
| 334 | + with: |
| 335 | + name: audited-wheels |
| 336 | + path: wheelhouse/audited/ |
| 337 | + - name: Deploy wheels to artifactory (if not a release) |
| 338 | + if: startsWith(github.ref, 'refs/tags/v') != true |
| 339 | + run: bash ./ci/upload-artifactory.sh |
| 340 | + env: |
| 341 | + ARTIFACTORY_URL: ${{ secrets.ARTIFACTORY_URL }} |
| 342 | + ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }} |
| 343 | + ARTIFACTORY_PASS: ${{ secrets.ARTIFACTORY_PASS }} |
| 344 | + |
286 | 345 | # This job builds wheels for x86_64 arch |
287 | 346 | build-linux-x86_64: |
288 | 347 | needs: build-docstrings |
@@ -406,7 +465,7 @@ jobs: |
406 | 465 |
|
407 | 466 | release: |
408 | 467 | if: startsWith(github.ref, 'refs/tags/v') |
409 | | - needs: [pytest, build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-linux-x86_64, build-linux-arm64] |
| 468 | + needs: [pytest, build-linux-armhf, build-windows-x86_64, build-macos-x86_64, build-macos-arm64, build-linux-x86_64, build-linux-arm64] |
410 | 469 | runs-on: ubuntu-latest |
411 | 470 |
|
412 | 471 | steps: |
|
0 commit comments