forked from zeromq/pyzmq
-
Notifications
You must be signed in to change notification settings - Fork 1
183 lines (156 loc) · 4.57 KB
/
wheels.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: Release
on:
push:
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
pull_request:
paths:
- pyproject.toml
- setup.py
- buildutils/**
- .github/workflows/wheels.yml
- tools/install_libzmq.sh
- zmq/utils/*.h
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
TWINE_NONINTERACTIVE: "1"
# CIBW_PRERELEASE_PYTHONS: "1"
jobs:
sdist:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: install dependencies
run: |
pip install --upgrade pip build pytest
pip install -r tools/wheel-requirements.txt
- name: build sdist
run: |
python -m build --sdist .
- uses: actions/upload-artifact@v4
with:
name: sdist
path: "dist/*.tar.gz"
if-no-files-found: error
- name: verify sdist files
run:
pytest -v tools/test_sdist.py
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing dist/*.tar.gz
wheel:
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
name: wheel-${{ matrix.name }}
env:
MACOSX_DEPLOYMENT_TARGET: "10.9"
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_SKIP: "${{ matrix.cibw.skip || '' }}"
CIBW_ARCHS_LINUX: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_ARCHS_MACOS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_x86_64_image || '' }}"
strategy:
fail-fast: false
matrix:
include:
# - os: macos-11
# name: mac-cpython
# cibw:
# build: "cp*"
- os: macos-11
name: mac-pypy
cibw:
build: "pp*"
- os: macos-13
name: mac-arm
cibw:
arch: universal2
build: "cp*"
- name: manylinux-x86_64
cibw:
arch: x86_64
build: "*manylinux*"
#
# - name: manylinux-i686
# cibw:
# arch: i686
# build: "*manylinux*"
#
# # additional manylinux variants, not specified in pyproject.toml:
# # build with newer 2_28 for cpython >= 3.10, pypy 3.9
# - name: manylinux-x86_64-2_28
# cibw:
# arch: x86_64
# build: "cp31*-manylinux* pp39-manylinux*"
# manylinux_x86_64_image: manylinux_2_28
#
# - name: musllinux
# cibw:
# build: "*musllinux*"
# - name: win32
# os: windows-2019
# architecture: x86
# cibw:
# build: "cp*win32"
#
# - os: windows-2019
# name: win-pypy
# architecture: x64
# cibw:
# build: "pp*win_amd64"
#
# - os: windows-2019
# name: win_amd64
# architecture: x64
# cibw:
# build: "cp*win_amd64"
steps:
- uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: ${{ matrix.architecture }}
- name: customize mac-arm-64
if: contains(matrix.os, 'macos') && matrix.cibw.arch
run: |
echo 'MACOSX_DEPLOYMENT_TARGET=10.15' >> "$GITHUB_ENV"
- name: install dependencies
run: |
pip install --upgrade setuptools pip wheel
pip install -r tools/wheel-requirements.txt
- name: show environment
run: |
pip freeze
- name: list target wheels
run: |
python -m cibuildwheel . --print-build-identifiers
- name: build wheels
run: |
python -m cibuildwheel .
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.name }}
path: "wheelhouse/*"
if-no-files-found: error
- name: Publish wheels to PyPI
if: startsWith(github.ref, 'refs/tags/')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install twine
twine upload --skip-existing wheelhouse/*