Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 67 additions & 21 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ stages:
- template: ./.azure-pipelines/azure-pipelines-win.yml

- stage: Deploy
displayName: "Deploy Source Wheels and Docs"
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))
jobs:
- job:
Expand Down Expand Up @@ -130,30 +131,75 @@ stages:
env:
GH_TOKEN: $(gh.token)

- job:
displayName: Windows Wheels
strategy:
matrix:
win-Python38:
python.version: '3.8'
win-Python39:
python.version: '3.9'
win-Python310:
python.version: '3.10'
win-Python311:
python.version: '3.11'
pool:
vmImage: windows-latest
- job: linux
displayName: Build Linux wheels
pool: { vmImage: 'Ubuntu-20.04' }
steps:
- task: UsePythonVersion@0
- bash:
git fetch --tags
displayName: Fetch tags
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
pip3 install cibuildwheel==2.16.2
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
- script: twine upload --skip-existing wheelhouse/*
displayName: Upload to PYPI
env:
TWINE_USERNAME: $(twine.username)
TWINE_PASSWORD: $(twine.password)
- task: PublishBuildArtifacts@1
inputs: { pathtoPublish: 'wheelhouse' }

- job: macos
displayName: Build Mac wheels
pool: { vmImage: 'macOS-11' }
variables:
CIBW_ARCHS_MACOS: "x86_64 arm64"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: pip install build twine
displayName: Install build dependencies
- script: python -m build --wheel .
displayName: Build Wheel
- script: twine upload --skip-existing dist/*
- bash:
git fetch --tags
displayName: Fetch tags
- bash: |
set -o errexit
python3 -m pip install --upgrade pip
python3 -m pip install cibuildwheel==2.16.2
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
- script: twine upload --skip-existing wheelhouse/*
displayName: Upload to PYPI
env:
TWINE_USERNAME: $(twine.username)
TWINE_PASSWORD: $(twine.password)
- task: PublishBuildArtifacts@1
inputs: { pathtoPublish: wheelhouse }

- job: windows
displayName: Build Windows wheels
pool: { vmImage: 'windows-2019' }
variables:
CIBW_ARCHS_WINDOWS: "AMD64"
steps:
- task: UsePythonVersion@0
- bash:
git fetch --tags
displayName: Fetch tags
- bash: |
set -o errexit
python -m pip install --upgrade pip
pip install cibuildwheel==2.16.2
displayName: Install dependencies
- bash: cibuildwheel --output-dir wheelhouse .
displayName: Build wheels
- script: twine upload --skip-existing wheelhouse/*
displayName: Upload to PYPI
env:
TWINE_USERNAME: $(twine.username)
TWINE_PASSWORD: $(twine.password)
- task: PublishBuildArtifacts@1
inputs: { pathtoPublish: 'wheelhouse' }
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ print(get_version())'''
],
check: true
).stdout().strip(),

license: 'MIT',
meson_version: '>= 1.1.0',
default_options: [
Expand Down
12 changes: 11 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,14 @@ Repository = 'http://github.com/simpeg/discretize.git'

[tool.meson-python.args]
# for windows this will prioritize the msvc compilers
setup = ['--vsenv']
setup = ['--vsenv']

[tool.cibuildwheel]
# skip building wheels for python 3.6, 3.7, all pypy versions, and specialty linux
# processors (still does arm builds though).
# skip windows 32bit
skip = "cp36-* cp37-* pp* *_ppc64le *_i686 *_s390x *-win32 cp38-musllinux_x86_64"
build-verbosity = "3"

# test importing discretize to make sure externals are loadable.
test-command = 'python -c "import discretize; print(discretize.__version__)"'