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_TEST_REQUIRES : pytest hypothesis pandas
88+ CIBW_TEST_COMMAND : pytest {package}/tests
89+ CIBW_BUILD_VERBOSITY : 3
90+
91+ steps :
92+ - uses : actions/checkout@v2
93+ with :
94+ submodules : ' true'
95+
96+ - name : Build wheels
97+ 98+ with :
99+ output-dir : wheelhouse
100+
101+ - name : Upload wheels
102+ uses : actions/upload-artifact@v2
103+ with :
104+ path : ./wheelhouse/*.whl
105+
106+ build_wheels_apple_silicon :
107+ name : Build wheel on macos-latest/universal2+arm64/${{matrix.python_tag}}
108+ runs-on : macos-latest
109+ strategy :
110+ fail-fast : false
111+ matrix :
112+ python_tag : ["cp38-*", "cp39-*"]
113+ env :
114+ CIBW_BUILD : ${{matrix.python_tag}}
115+ CIBW_ARCHS_MACOS : " universal2 arm64"
116+ CIBW_BUILD_VERBOSITY : 3
117+
118+ steps :
119+ - uses : actions/checkout@v2
120+ with :
121+ submodules : ' true'
122+
123+ - name : Build wheels
124+ 125+ with :
126+ output-dir : wheelhouse
127+
128+ - name : Upload wheels
129+ uses : actions/upload-artifact@v2
130+ with :
131+ path : ./wheelhouse/*.whl
132+
133+ build_wheels_manylinux :
134+ name : Build wheels on ubuntu-latest/${{matrix.arch}}/${{matrix.python_tag}}
135+ runs-on : ubuntu-latest
136+ strategy :
137+ fail-fast : false
138+ matrix :
139+ arch : [auto, aarch64, ppc64le, s390x]
140+ python_tag : [ "cp36-*", "cp37-*", "cp38-*", "cp39-*"]
141+ env :
142+ CIBW_ARCHS_LINUX : ${{matrix.arch}}
143+ CIBW_BUILD : ${{matrix.python_tag}}
144+ CIBW_TEST_SKIP : " *-manylinux_{aarch64,ppc64le,s390x}"
145+ CIBW_TEST_REQUIRES : pytest hypothesis pandas
146+ CIBW_TEST_COMMAND : pytest {package}/tests
147+ CIBW_BUILD_VERBOSITY : 3
148+
149+ steps :
150+ - uses : actions/checkout@v2
151+ with :
152+ submodules : ' true'
153+
154+ - uses : docker/setup-qemu-action@v1
155+ name : Set up QEMU
156+
157+ - name : Build wheel
158+ 159+ with :
160+ output-dir : wheelhouse
161+
162+ - name : Upload wheels
163+ uses : actions/upload-artifact@v2
164+ with :
165+ path : ./wheelhouse/*.whl
166+
167+ build_wheels_pypy :
168+ name : Build wheel on ${{ matrix.os }}/auto/pp37-*
169+ runs-on : ${{ matrix.os }}
170+ strategy :
171+ fail-fast : false
172+ matrix :
173+ # numpy ships no wheels for pypy on mac os
174+ os : [ubuntu-latest, windows-latest]
175+ env :
176+ CIBW_BUILD : " pp37-*"
177+ # activate tests when the fix for
178+ # https://foss.heptapod.net/pypy/pypy/-/issues/3413 is released
179+ CIBW_TEST_REQUIRES : pytest hypothesis pandas
180+ CIBW_TEST_COMMAND : pytest {package}/tests
181+ CIBW_BUILD_VERBOSITY : 3
182+
183+ steps :
184+ - uses : actions/checkout@v2
185+ with :
186+ submodules : ' true'
187+
188+ - name : Build wheels
189+ 190+ with :
191+ output-dir : wheelhouse
192+
193+ - name : Upload wheels
194+ uses : actions/upload-artifact@v2
195+ with :
196+ path : ./wheelhouse/*.whl
197+
198+ build_sdist :
199+ name : Build source distribution
200+ runs-on : ubuntu-latest
201+ steps :
202+ - uses : actions/checkout@v2
203+ with :
204+ submodules : ' true'
205+
206+ - uses : actions/setup-python@v2
207+ name : Install Python
208+ with :
209+ python-version : ' 3.7'
210+
211+ - name : Build sdist
212+ run : |
213+ pip3 install build; python3 -m build --sdist
214+ # test whether tarball contains all files required for compiling
215+ pip3 install dist/cydifflib-*.tar.gz
216+ pip3 uninstall cydifflib --yes
217+
218+ - uses : actions/upload-artifact@v2
219+ with :
220+ path : dist/*.tar.gz
221+
222+ deploy-wheels :
223+ if : github.event_name == 'release' && github.event.action == 'published'
224+ needs : [build_legacy, build_windows_27_legacy, build_wheels, build_wheels_apple_silicon, build_wheels_manylinux, build_wheels_pypy, build_sdist]
225+ name : deploy wheels to pypi
226+ runs-on : ubuntu-18.04
227+
228+ steps :
229+ - uses : actions/download-artifact@v2
230+ with :
231+ name : artifact
232+ path : dist
233+
234+ - uses : pypa/gh-action-pypi-publish@master
235+ with :
236+ user : __token__
237+ password : ${{ secrets.pypi_password }}
0 commit comments