10
10
jobs :
11
11
12
12
build-geos :
13
+ strategy :
14
+ matrix :
15
+ arch :
16
+ [
17
+ " i386" ,
18
+ " amd64" ,
19
+ ]
20
+ max-parallel : 6
21
+ fail-fast : false
13
22
runs-on : ubuntu-latest
14
- container : " tinybases/python:3.6-debian-4"
23
+ container : " tinybases/${{matrix.arch}}- python:3.6-debian-4"
15
24
steps :
16
25
-
17
26
name : Checkout
@@ -43,21 +52,24 @@ jobs:
43
52
run : |
44
53
set -e
45
54
. /etc/profile
46
- cd ${{ env.PKGDIR }}
55
+ cd ${{env.PKGDIR}}
47
56
export MAKEFLAGS="-j 16"
48
57
python -c "import utils; utils.GeosLibrary('3.3.3').build('extern')"
49
58
-
50
59
name : Upload GEOS artifacts
51
60
uses : actions/upload-artifact@v1
52
61
with :
53
- name : artifacts-geos
54
- path : ${{ env.PKGDIR }}/extern
62
+ name : artifacts-geos-${{matrix.arch}}
63
+ path : ${{env.PKGDIR}}/extern
55
64
56
65
build :
57
- needs : build-geos
58
- runs-on : ubuntu-latest
59
66
strategy :
60
67
matrix :
68
+ arch :
69
+ [
70
+ " i386" ,
71
+ " amd64" ,
72
+ ]
61
73
python_version :
62
74
[
63
75
" 2.7" ,
69
81
]
70
82
max-parallel : 6
71
83
fail-fast : false
72
- container : " tinybases/python:${{ matrix.python_version }}-debian-4"
84
+ needs : build-geos
85
+ runs-on : ubuntu-latest
86
+ container : " tinybases/${{matrix.arch}}-python:${{matrix.python_version}}-debian-4"
73
87
steps :
74
88
-
75
89
name : Checkout
78
92
name : Download GEOS artifacts
79
93
uses : actions/download-artifact@v1
80
94
with :
81
- name : artifacts-geos
82
- path : ${{ env.PKGDIR }}/extern
95
+ name : artifacts-geos-${{matrix.arch}}
96
+ path : ${{env.PKGDIR}}/extern
83
97
-
84
98
name : Install GCC toolchain
85
99
run : |
@@ -100,7 +114,7 @@ jobs:
100
114
run : |
101
115
set -e
102
116
. /etc/profile
103
- case "${{ matrix.python_version }}" in
117
+ case "${{matrix.python_version}}" in
104
118
2.[67]|3.[0123456]) pkgvers=1.11.3;;
105
119
*) pkgvers=1.16.6;;
106
120
esac
@@ -113,14 +127,14 @@ jobs:
113
127
python setup.py build -j 16
114
128
cp build/src*/numpy/core/include/numpy/*.h numpy/core/include/numpy/
115
129
cd ..
116
- cp -R ${pkgcode}/numpy/core/include ${{ env.PKGDIR }}/extern
130
+ cp -R ${pkgcode}/numpy/core/include ${{env.PKGDIR}}/extern
117
131
rm -rf ${pkgcode}
118
132
-
119
133
name : Build wheel
120
134
run : |
121
135
set -e
122
136
. /etc/profile
123
- cd ${{ env.PKGDIR }}
137
+ cd ${{env.PKGDIR}}
124
138
export GEOS_DIR=extern
125
139
export NUMPY_INCLUDE_PATH=extern/include
126
140
pip install -r requirements-setup.txt
@@ -129,14 +143,17 @@ jobs:
129
143
name : Upload build artifacts
130
144
uses : actions/upload-artifact@v1
131
145
with :
132
- name : artifacts-build-${{ matrix.python_version }}
133
- path : ${{ env.PKGDIR }}/dist
146
+ name : artifacts-build-${{matrix.arch}}-${{matrix. python_version}}
147
+ path : ${{env.PKGDIR}}/dist
134
148
135
149
repair :
136
- needs : build
137
- runs-on : ubuntu-latest
138
150
strategy :
139
151
matrix :
152
+ arch :
153
+ [
154
+ " i386" ,
155
+ " amd64" ,
156
+ ]
140
157
python_version :
141
158
[
142
159
" 2.7" ,
@@ -148,7 +165,9 @@ jobs:
148
165
]
149
166
max-parallel : 6
150
167
fail-fast : false
151
- container : " tinybases/python:3.6-debian-5"
168
+ needs : build
169
+ runs-on : ubuntu-latest
170
+ container : " tinybases/${{matrix.arch}}-python:3.6-debian-5"
152
171
steps :
153
172
-
154
173
name : Checkout
@@ -157,14 +176,14 @@ jobs:
157
176
name : Download GEOS artifacts
158
177
uses : actions/download-artifact@v1
159
178
with :
160
- name : artifacts-geos
161
- path : ${{ env.PKGDIR }}/extern
179
+ name : artifacts-geos-${{matrix.arch}}
180
+ path : ${{env.PKGDIR}}/extern
162
181
-
163
182
name : Download build artifacts
164
183
uses : actions/download-artifact@v1
165
184
with :
166
- name : artifacts-build-${{ matrix.python_version }}
167
- path : ${{ env.PKGDIR }}/dist
185
+ name : artifacts-build-${{matrix.arch}}-${{matrix. python_version}}
186
+ path : ${{env.PKGDIR}}/dist
168
187
-
169
188
name : Install GCC toolchain
170
189
run : |
@@ -219,22 +238,24 @@ jobs:
219
238
run : |
220
239
set -e
221
240
. /etc/profile
222
- cd ${{ env.PKGDIR }}
241
+ cd ${{env.PKGDIR}}
223
242
export LD_LIBRARY_PATH="$(readlink -f extern/lib)"
224
- auditwheel repair -w dist --plat manylinux1_x86_64 dist/*.whl
243
+ auditwheel repair -w dist dist/*.whl
225
244
-
226
245
name : Upload artifacts
227
246
uses : actions/upload-artifact@v1
228
247
with :
229
- name : artifacts-build-${{ matrix.python_version }}
230
- path : ${{ env.PKGDIR }}/dist
248
+ name : artifacts-build-${{matrix.arch}}-${{matrix. python_version}}
249
+ path : ${{env.PKGDIR}}/dist
231
250
232
251
upload :
233
- if : startsWith(github.event.ref, 'refs/tags/v')
234
- needs : repair
235
- runs-on : ubuntu-latest
236
252
strategy :
237
253
matrix :
254
+ arch :
255
+ [
256
+ " i386" ,
257
+ " amd64" ,
258
+ ]
238
259
python_version :
239
260
[
240
261
" 2.7" ,
@@ -245,7 +266,10 @@ jobs:
245
266
" 3.9" ,
246
267
]
247
268
max-parallel : 1
248
- container : " tinybases/python:${{ matrix.python_version }}-debian-5"
269
+ if : startsWith(github.event.ref, 'refs/tags/v')
270
+ needs : repair
271
+ runs-on : ubuntu-latest
272
+ container : " tinybases/${{matrix.arch}}-python:${{matrix.python_version}}-debian-5"
249
273
environment : Test PyPI
250
274
steps :
251
275
-
@@ -255,8 +279,8 @@ jobs:
255
279
name : Download build artifacts
256
280
uses : actions/download-artifact@v1
257
281
with :
258
- name : artifacts-build-${{ matrix.python_version }}
259
- path : ${{ env.PKGDIR }}/dist
282
+ name : artifacts-build-${{matrix.arch}}-${{matrix. python_version}}
283
+ path : ${{env.PKGDIR}}/dist
260
284
-
261
285
name : Print environment
262
286
run : |
@@ -273,14 +297,14 @@ jobs:
273
297
name : Upload distributables
274
298
env :
275
299
TWINE_USERNAME : __token__
276
- TWINE_PASSWORD : " ${{ secrets.PYPI_TOKEN }}"
277
- TWINE_REPOSITORY_URL : " ${{ secrets.PYPI_REPOSITORY_URL }}"
300
+ TWINE_PASSWORD : " ${{secrets.PYPI_TOKEN}}"
301
+ TWINE_REPOSITORY_URL : " ${{secrets.PYPI_REPOSITORY_URL}}"
278
302
run : |
279
303
set -e
280
304
. /etc/profile
281
305
python -m twine check \
282
- ${{ env.PKGDIR }}/dist/*.tar.gz \
283
- ${{ env.PKGDIR }}/dist/*-manylinux1*.whl
306
+ ${{env.PKGDIR}}/dist/*.tar.gz \
307
+ ${{env.PKGDIR}}/dist/*-manylinux1*.whl
284
308
python -m twine upload --skip-existing \
285
- ${{ env.PKGDIR }}/dist/*.tar.gz \
286
- ${{ env.PKGDIR }}/dist/*-manylinux1*.whl
309
+ ${{env.PKGDIR}}/dist/*.tar.gz \
310
+ ${{env.PKGDIR}}/dist/*-manylinux1*.whl
0 commit comments