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