1+ name : Build
2+
3+ on :
4+ push :
5+ pull_request :
6+ release :
7+ types :
8+ - published
9+
10+ jobs :
11+ build_legacy :
12+ name : Build wheel for legacy Python versions
13+ runs-on : ${{ matrix.os }}
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ os : [ubuntu-latest, windows-latest, macos-latest]
18+ env :
19+ CIBW_BUILD : cp27-* cp35-* pp27-*
20+ CIBW_BUILD_VERBOSITY : 3
21+
22+ steps :
23+ - uses : actions/checkout@v2
24+ with :
25+ submodules : ' true'
26+
27+ - name : Build wheels
28+ 29+ with :
30+ output-dir : wheelhouse
31+
32+ - name : Upload wheels
33+ uses : actions/upload-artifact@v2
34+ with :
35+ path : ./wheelhouse/*.whl
36+
37+ build_windows_27_legacy :
38+ name : Build wheel on windows-latest/auto/2.7
39+ runs-on : windows-latest
40+
41+ steps :
42+ - uses : actions/checkout@v2
43+ with :
44+ submodules : ' true'
45+
46+ - uses : ilammy/msvc-dev-cmd@v1
47+
48+ - name : Build 64-bit wheel
49+ 50+ with :
51+ output-dir : wheelhouse
52+ env :
53+ CIBW_BUILD : cp27-win_amd64
54+ DISTUTILS_USE_SDK : 1
55+ CIBW_BUILD_VERBOSITY : 3
56+ MSSdk : 1
57+
58+ - uses : ilammy/msvc-dev-cmd@v1
59+ with :
60+ arch : x86
61+
62+ - name : Build 32-bit wheel
63+ 64+ with :
65+ output-dir : wheelhouse
66+ env :
67+ CIBW_BUILD : cp27-win32
68+ DISTUTILS_USE_SDK : 1
69+ CIBW_BUILD_VERBOSITY : 3
70+ MSSdk : 1
71+
72+ - name : Upload wheels
73+ uses : actions/upload-artifact@v2
74+ with :
75+ path : ./wheelhouse/*.whl
76+
77+ build_wheels :
78+ name : Build wheel on ${{ matrix.os }}/auto/${{matrix.python_tag}}
79+ runs-on : ${{ matrix.os }}
80+ strategy :
81+ fail-fast : false
82+ matrix :
83+ python_tag : ["cp37-*", "cp38-*", "cp39-*"]
84+ os : [windows-latest, macos-latest]
85+ env :
86+ CIBW_BUILD : ${{matrix.python_tag}}
87+ CIBW_BUILD_VERBOSITY : 3
88+
89+ steps :
90+ - uses : actions/checkout@v2
91+ with :
92+ submodules : ' true'
93+
94+ - name : Build wheels
95+ 96+ with :
97+ output-dir : wheelhouse
98+
99+ - name : Upload wheels
100+ uses : actions/upload-artifact@v2
101+ with :
102+ path : ./wheelhouse/*.whl
103+
104+ build_wheels_apple_silicon :
105+ name : Build wheel on macos-latest/universal2+arm64/${{matrix.python_tag}}
106+ runs-on : macos-latest
107+ strategy :
108+ fail-fast : false
109+ matrix :
110+ python_tag : ["cp38-*", "cp39-*"]
111+ env :
112+ CIBW_BUILD : ${{matrix.python_tag}}
113+ CIBW_ARCHS_MACOS : " universal2 arm64"
114+ CIBW_BUILD_VERBOSITY : 3
115+
116+ steps :
117+ - uses : actions/checkout@v2
118+ with :
119+ submodules : ' true'
120+
121+ - name : Build wheels
122+ 123+ with :
124+ output-dir : wheelhouse
125+
126+ - name : Upload wheels
127+ uses : actions/upload-artifact@v2
128+ with :
129+ path : ./wheelhouse/*.whl
130+
131+ build_wheels_manylinux :
132+ name : Build wheels on ubuntu-latest/${{matrix.arch}}/${{matrix.python_tag}}
133+ runs-on : ubuntu-latest
134+ strategy :
135+ fail-fast : false
136+ matrix :
137+ arch : [auto, aarch64, ppc64le, s390x]
138+ python_tag : [ "cp36-*", "cp37-*", "cp38-*", "cp39-*"]
139+ env :
140+ CIBW_ARCHS_LINUX : ${{matrix.arch}}
141+ CIBW_BUILD : ${{matrix.python_tag}}
142+ CIBW_BUILD_VERBOSITY : 3
143+
144+ steps :
145+ - uses : actions/checkout@v2
146+ with :
147+ submodules : ' true'
148+
149+ - uses : docker/setup-qemu-action@v1
150+ name : Set up QEMU
151+
152+ - name : Build wheel
153+ 154+ with :
155+ output-dir : wheelhouse
156+
157+ - name : Upload wheels
158+ uses : actions/upload-artifact@v2
159+ with :
160+ path : ./wheelhouse/*.whl
161+
162+ build_wheels_pypy :
163+ name : Build wheel on ${{ matrix.os }}/auto/pp37-*
164+ runs-on : ${{ matrix.os }}
165+ strategy :
166+ fail-fast : false
167+ matrix :
168+ # numpy ships no wheels for pypy on mac os
169+ os : [ubuntu-latest, windows-latest]
170+ env :
171+ CIBW_BUILD : " pp37-*"
172+ CIBW_BUILD_VERBOSITY : 3
173+
174+ steps :
175+ - uses : actions/checkout@v2
176+ with :
177+ submodules : ' true'
178+
179+ - name : Build wheels
180+ 181+ with :
182+ output-dir : wheelhouse
183+
184+ - name : Upload wheels
185+ uses : actions/upload-artifact@v2
186+ with :
187+ path : ./wheelhouse/*.whl
188+
189+ build_sdist :
190+ name : Build source distribution
191+ runs-on : ubuntu-latest
192+ steps :
193+ - uses : actions/checkout@v2
194+ with :
195+ submodules : ' true'
196+
197+ - uses : actions/setup-python@v2
198+ name : Install Python
199+ with :
200+ python-version : ' 3.7'
201+
202+ - name : Build sdist
203+ run : |
204+ pip3 install build; python3 -m build --sdist
205+ # test whether tarball contains all files required for compiling
206+ pip3 install dist/cydifflib-*.tar.gz
207+ pip3 uninstall cydifflib --yes
208+
209+ - uses : actions/upload-artifact@v2
210+ with :
211+ path : dist/*.tar.gz
212+
213+ deploy-wheels :
214+ if : github.event_name == 'release' && github.event.action == 'published'
215+ needs : [build_legacy, build_windows_27_legacy, build_wheels, build_wheels_apple_silicon, build_wheels_manylinux, build_wheels_pypy, build_sdist]
216+ name : deploy wheels to pypi
217+ runs-on : ubuntu-18.04
218+
219+ steps :
220+ - uses : actions/download-artifact@v2
221+ with :
222+ name : artifact
223+ path : dist
224+
225+ - uses : pypa/gh-action-pypi-publish@master
226+ with :
227+ user : __token__
228+ password : ${{ secrets.pypi_password }}
0 commit comments