@@ -25,7 +25,7 @@ stages:
2525 pool :
2626 vmImage : ubuntu-latest
2727 variables :
28- python.version : ' 3.8 '
28+ python.version : ' 3.9 '
2929 steps :
3030 - script : |
3131 pip install -r requirements_style.txt
@@ -38,7 +38,7 @@ stages:
3838 pool :
3939 vmImage : ubuntu-latest
4040 variables :
41- python.version : ' 3.8 '
41+ python.version : ' 3.9 '
4242 steps :
4343 - script : |
4444 pip install -r requirements_style.txt
@@ -53,6 +53,7 @@ stages:
5353 - template : ./.azure-pipelines/azure-pipelines-win.yml
5454
5555- stage : Deploy
56+ displayName : " Deploy Source Wheels and Docs"
5657 condition : and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))
5758 jobs :
5859 - job :
@@ -92,13 +93,14 @@ stages:
9293 - bash : |
9394 source "${HOME}/conda/etc/profile.d/conda.sh"
9495 conda activate discretize-test
95- pip install -e .
96+ pip install --no-build-isolation --editable .
9697 displayName: Build package
9798
9899 - bash : |
99100 source "${HOME}/conda/etc/profile.d/conda.sh"
100101 conda activate discretize-test
101- python setup.py sdist
102+ python -m build --no-isolation --skip-dependency-check --sdist .
103+ ls -la dist
102104 twine upload --skip-existing dist/*
103105 displayName: Deploy source
104106 env:
@@ -129,28 +131,78 @@ stages:
129131 env:
130132 GH_TOKEN: $(gh.token)
131133
132- - job :
133- displayName : Windows Wheels
134- strategy :
135- matrix :
136- win-Python38 :
137- python.version : ' 3.8'
138- win-Python39 :
139- python.version : ' 3.9'
140- win-Python310 :
141- python.version : ' 3.10'
142- pool :
143- vmImage : windows-latest
134+ - job : linux
135+ displayName : Build Linux wheels
136+ pool : { vmImage: 'Ubuntu-20.04' }
137+ steps :
138+ - task : UsePythonVersion@0
139+ - bash :
140+ git fetch --tags
141+ displayName : Fetch tags
142+ - bash : |
143+ set -o errexit
144+ python3 -m pip install --upgrade pip
145+ pip3 install cibuildwheel==2.16.2
146+ pip3 install twine
147+ displayName: Install dependencies
148+ - bash : cibuildwheel --output-dir wheelhouse .
149+ displayName : Build wheels
150+ - script : twine upload --skip-existing wheelhouse/*
151+ displayName : Upload to PYPI
152+ env :
153+ TWINE_USERNAME : $(twine.username)
154+ TWINE_PASSWORD : $(twine.password)
155+ - task : PublishBuildArtifacts@1
156+ inputs : { pathtoPublish: 'wheelhouse' }
157+
158+ - job : macos
159+ displayName : Build Mac wheels
160+ pool : { vmImage: 'macOS-11' }
161+ variables :
162+ CIBW_ARCHS_MACOS : " x86_64 arm64"
144163 steps :
145164 - task : UsePythonVersion@0
146- inputs :
147- versionSpec : ' $(python.version)'
148- - script : pip install numpy cython twine wheel setuptools_scm
149- displayName : Install build dependencies
150- - script : python setup.py bdist_wheel
151- displayName : Build Wheel
152- - script : twine upload --skip-existing dist/*
165+ - bash :
166+ git fetch --tags
167+ displayName : Fetch tags
168+ - bash : |
169+ set -o errexit
170+ python3 -m pip install --upgrade pip
171+ python3 -m pip install cibuildwheel==2.16.2
172+ python3 -m pip install twine
173+ displayName: Install dependencies
174+ - bash : cibuildwheel --output-dir wheelhouse .
175+ displayName : Build wheels
176+ - script : twine upload --skip-existing wheelhouse/*
177+ displayName : Upload to PYPI
178+ env :
179+ TWINE_USERNAME : $(twine.username)
180+ TWINE_PASSWORD : $(twine.password)
181+ - task : PublishBuildArtifacts@1
182+ inputs : { pathtoPublish: wheelhouse }
183+
184+ - job : windows
185+ displayName : Build Windows wheels
186+ pool : { vmImage: 'windows-2019' }
187+ variables :
188+ CIBW_ARCHS_WINDOWS : " AMD64"
189+ steps :
190+ - task : UsePythonVersion@0
191+ - bash :
192+ git fetch --tags
193+ displayName : Fetch tags
194+ - bash : |
195+ set -o errexit
196+ python -m pip install --upgrade pip
197+ pip install cibuildwheel==2.16.2
198+ pip install twine
199+ displayName: Install dependencies
200+ - bash : cibuildwheel --output-dir wheelhouse .
201+ displayName : Build wheels
202+ - script : twine upload --skip-existing wheelhouse/*
153203 displayName : Upload to PYPI
154204 env :
155205 TWINE_USERNAME : $(twine.username)
156206 TWINE_PASSWORD : $(twine.password)
207+ - task : PublishBuildArtifacts@1
208+ inputs : { pathtoPublish: 'wheelhouse' }
0 commit comments