|
| 1 | +name: Build Wheels |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +jobs: |
| 9 | + build_wheels: |
| 10 | + name: Build wheels on ${{ matrix.os }}-${{ matrix.arch }} |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [ubuntu-24.04, ubuntu-22.04, macos-15] |
| 15 | + arch: [x86_64] |
| 16 | + include: |
| 17 | + - os: ubuntu-24.04-arm |
| 18 | + arch: aarch64 |
| 19 | + - os: ubuntu-22.04-arm |
| 20 | + arch: aarch64 |
| 21 | + - os: macos-15 |
| 22 | + arch: arm64 |
| 23 | + steps: |
| 24 | + - name: Check out repository code |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + submodules: 'recursive' |
| 28 | + |
| 29 | + - name: Build wheels |
| 30 | + uses: pypa/cibuildwheel@v2.22.0 |
| 31 | + with: |
| 32 | + package-dir: py-bindings |
| 33 | + env: |
| 34 | + CIBW_ARCHS_MACOS: ${{ matrix.arch }} |
| 35 | + OMPL_BUILD_ARCH: ${{ matrix.arch }} |
| 36 | + # NOTE: Many combinations of OS, arch, and Python version can be built |
| 37 | + # depending on your patience. For example: |
| 38 | + CIBW_BUILD: cp3{10,11,12,13}-macosx_{x86_64,arm64} cp3{10,11,12,13}-manylinux_x86_64 |
| 39 | + CIBW_BUILD_VERBOSITY: 1 |
| 40 | + CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="14.0" |
| 41 | + |
| 42 | + - uses: actions/upload-artifact@v4 |
| 43 | + with: |
| 44 | + name: wheels-${{ matrix.os }}-${{ matrix.arch }} |
| 45 | + path: wheelhouse |
| 46 | + |
| 47 | + prerelease: |
| 48 | + if: github.ref == 'refs/heads/main' |
| 49 | + runs-on: ubuntu-latest |
| 50 | + concurrency: |
| 51 | + group: push-${{ github.ref_name }}-prerelease |
| 52 | + cancel-in-progress: true |
| 53 | + needs: [build_wheels] |
| 54 | + steps: |
| 55 | + - uses: actions/download-artifact@v4 |
| 56 | + with: |
| 57 | + path: wheelhouse |
| 58 | + pattern: wheels-* |
| 59 | + merge-multiple: true |
| 60 | + |
| 61 | + - name: GitHub release |
| 62 | + uses: ncipollo/release-action@v1.14.0 |
| 63 | + with: |
| 64 | + prerelease: true |
| 65 | + tag: "prerelease" |
| 66 | + name: "Development Build" |
| 67 | + allowUpdates: true |
| 68 | + removeArtifacts: true |
| 69 | + replacesArtifacts: true |
| 70 | + artifacts: "wheelhouse/*" |
0 commit comments