|
6 | 6 | - 'v[0-9]+.[0-9]+.[0-9]$' # only run non-alpha tags
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build: |
10 |
| - name: Build distribution 📦 |
11 |
| - runs-on: macos-latest |
12 |
| - |
| 9 | + make_sdist: |
| 10 | + name: Make SDist |
| 11 | + runs-on: ubuntu-latest |
13 | 12 | steps:
|
14 | 13 | - uses: actions/checkout@v4
|
15 | 14 |
|
16 |
| - - name: Set up Python |
17 |
| - uses: actions/setup-python@v5 |
| 15 | + - name: Build SDist |
| 16 | + run: pipx run build --sdist |
| 17 | + |
| 18 | + - uses: actions/upload-artifact@v4 |
18 | 19 | with:
|
19 |
| - python-version: "3.x" |
| 20 | + name: cibw-sdist |
| 21 | + path: dist/*.tar.gz |
20 | 22 |
|
21 |
| - - name: Install uv |
22 |
| - uses: astral-sh/setup-uv@v4 |
| 23 | + build_wheels-manylinux: |
| 24 | + name: Build wheels on ubuntu-latest |
| 25 | + runs-on: ubuntu-latest |
23 | 26 |
|
24 |
| - - name: Build |
25 |
| - env: |
26 |
| - CFLAGS: -I/opt/homebrew/include |
27 |
| - LDFLAGS: -L/opt/homebrew/lib |
28 |
| - run: | |
29 |
| - uv build --sdist |
30 |
| - uv build --wheel -p 3.9 |
31 |
| - uv build --wheel -p 3.10 |
32 |
| - uv build --wheel -p 3.11 |
33 |
| - uv build --wheel -p 3.12 |
34 |
| - uv build --wheel -p 3.13 |
35 |
| -
|
36 |
| - - name: Store the distribution packages |
37 |
| - uses: actions/upload-artifact@v4 |
38 |
| - with: |
39 |
| - name: python-package-distributions |
40 |
| - path: dist/ |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + |
| 30 | + - name: Build wheels |
| 31 | + |
| 32 | + env: |
| 33 | + CIBW_BEFORE_ALL_LINUX: > |
| 34 | + yum update && |
| 35 | + yum install -y gmp-devel |
| 36 | + CIBW_BUILD: cp39-manylinux* cp310-manylinux* cp311-manylinux* cp312-manylinux* cp313-manylinux* |
| 37 | + CIBW_ENVIRONMENT_LINUX: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" |
| 38 | + |
| 39 | + - uses: actions/upload-artifact@v4 |
| 40 | + with: |
| 41 | + name: cibw-wheels-manylinux |
| 42 | + path: ./wheelhouse/*.whl |
| 43 | + |
| 44 | + # macos-13 is an intel runner |
| 45 | + build_wheels-macos-13: |
| 46 | + name: Build wheels on macos-13 |
| 47 | + runs-on: macos-13 |
| 48 | + |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + |
| 52 | + - name: Build wheels |
| 53 | + |
| 54 | + env: |
| 55 | + CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* |
| 56 | + CIBW_ENVIRONMENT_MACOS: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" |
| 57 | + MACOSX_DEPLOYMENT_TARGET: 13.0 |
| 58 | + |
| 59 | + - uses: actions/upload-artifact@v4 |
| 60 | + with: |
| 61 | + name: cibw-wheels-macos-13 |
| 62 | + path: ./wheelhouse/*.whl |
| 63 | + |
| 64 | + # macos-14 is apple silicon |
| 65 | + build_wheels-macos-14: |
| 66 | + name: Build wheels on macos-14 |
| 67 | + runs-on: macos-14 |
| 68 | + |
| 69 | + steps: |
| 70 | + - uses: actions/checkout@v4 |
| 71 | + |
| 72 | + - name: Build wheels |
| 73 | + |
| 74 | + env: |
| 75 | + CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* |
| 76 | + CIBW_ENVIRONMENT_MACOS: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" |
| 77 | + MACOSX_DEPLOYMENT_TARGET: 14.0 |
| 78 | + |
| 79 | + - uses: actions/upload-artifact@v4 |
| 80 | + with: |
| 81 | + name: cibw-wheels-macos-14 |
| 82 | + path: ./wheelhouse/*.whl |
41 | 83 |
|
42 | 84 | publish-to-pypi:
|
43 | 85 | name: Publish Python 🐍 distribution 📦 to PyPI
|
|
56 | 98 | - name: Download all the dists
|
57 | 99 | uses: actions/download-artifact@v4
|
58 | 100 | with:
|
59 |
| - name: python-package-distributions |
| 101 | + pattern: cibw-* |
60 | 102 | path: dist/
|
| 103 | + merge-multiple: true |
61 | 104 | - name: Publish distribution 📦 to PyPI
|
62 | 105 | uses: pypa/gh-action-pypi-publish@release/v1
|
63 | 106 | with:
|
|
79 | 122 | - name: Download all the dists
|
80 | 123 | uses: actions/download-artifact@v4
|
81 | 124 | with:
|
82 |
| - name: python-package-distributions |
| 125 | + pattern: cibw-* |
83 | 126 | path: dist/
|
| 127 | + merge-multiple: true |
84 | 128 | - name: Sign the dists with Sigstore
|
85 | 129 |
|
86 | 130 | with:
|
|
0 commit comments