@@ -114,28 +114,94 @@ jobs:
114
114
115
115
- name : Install distribution dependencies
116
116
run : pip install --upgrade twine setuptools wheel
117
- if : matrix.os == 'ubuntu-18.04' && ( matrix.python-version == 3.8 || matrix.python-version == 3.9)
117
+ if : matrix.os == 'ubuntu-18.04' && matrix.python-version == 3.9
118
118
119
119
- name : Create distribution package
120
120
run : python setup.py sdist
121
- if : matrix.os == 'ubuntu-18.04' && ( matrix.python-version == 3.8 || matrix.python-version == 3.9)
121
+ if : matrix.os == 'ubuntu-18.04' && matrix.python-version == 3.9
122
122
123
123
- name : Upload distribution package
124
124
uses : actions/upload-artifact@master
125
125
with :
126
- name : dist-package-${{ matrix.python-version }}
126
+ name : dist
127
+ path : dist
128
+ if : matrix.os == 'ubuntu-18.04' && matrix.python-version == 3.9
129
+
130
+ build-wheels :
131
+ needs : build
132
+ if : github.event_name == 'release'
133
+ runs-on : ${{ matrix.os }}
134
+ strategy :
135
+ fail-fast : false
136
+ matrix :
137
+ python-version : [3.7, 3.8, 3.9]
138
+ os : [ubuntu-18.04, macos-latest, windows-latest]
139
+
140
+ steps :
141
+ - uses : actions/checkout@v1
142
+ with :
143
+ fetch-depth : 9
144
+
145
+ - name : Set up Python ${{ matrix.python-version }}
146
+ uses : actions/setup-python@v1
147
+ with :
148
+ python-version : ${{ matrix.python-version }}
149
+
150
+ - name : Install dependencies
151
+ run : |
152
+ pip install cython==0.29.14 --install-option="--no-cython-compile"
153
+ pip install -r requirements.txt
154
+
155
+ - name : Compile Cython extensions
156
+ run : |
157
+ make clean
158
+
159
+ cython blacksheep/url.pyx
160
+ cython blacksheep/exceptions.pyx
161
+ cython blacksheep/headers.pyx
162
+ cython blacksheep/cookies.pyx
163
+ cython blacksheep/contents.pyx
164
+ cython blacksheep/messages.pyx
165
+ cython blacksheep/scribe.pyx
166
+ cython blacksheep/baseapp.pyx
167
+
168
+ - name : Install build dependencies
169
+ run : |
170
+ python -m pip install --upgrade setuptools pip wheel
171
+
172
+ - name : Build wheels (linux)
173
+ if : startsWith(matrix.os, 'ubuntu')
174
+ uses : docker://quay.io/pypa/manylinux1_x86_64
175
+ env :
176
+ PYTHON_VERSION : ${{ matrix.python-version }}
177
+ with :
178
+ entrypoint : /github/workspace/.github/workflows/build-manylinux-wheels.sh
179
+
180
+ - name : Build wheels (non-linux)
181
+ if : " !startsWith(matrix.os, 'ubuntu')"
182
+ run : |
183
+ python setup.py bdist_wheel
184
+
185
+ - name : Test wheels
186
+ if : |
187
+ !startsWith(matrix.os, 'windows')
188
+ run : |
189
+ pip install --pre blacksheep -f "file:///${GITHUB_WORKSPACE}/dist"
190
+
191
+ - uses : actions/upload-artifact@v1
192
+ with :
193
+ name : dist
127
194
path : dist
128
- if : matrix.os == 'ubuntu-18.04' && (matrix.python-version == 3.8 || matrix.python-version == 3.9)
129
195
130
196
publish :
131
197
runs-on : ubuntu-18.04
132
- needs : build
198
+ needs : [ build, build-wheels]
133
199
if : github.event_name == 'release'
134
200
steps :
135
201
- name : Download a distribution artifact
136
202
uses : actions/download-artifact@v2
137
203
with :
138
- name : dist-package-3.9
204
+ name : dist
139
205
path : dist
140
206
- name : Publish distribution 📦 to Test PyPI
141
207
uses : pypa/gh-action-pypi-publish@master
0 commit comments