Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add cibuildwheel build #44

Merged
merged 1 commit into from
Jul 12, 2022
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
52 changes: 52 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and upload to PyPI

on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]

steps:
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch]

jobs:
docs_build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
PYANSYS_OFF_SCREEN: True
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.8
python-version: 3.9

- name: Install and start virtual framebuffer
run: |
Expand Down
81 changes: 0 additions & 81 deletions .github/workflows/testing-and-deployment.yml

This file was deleted.

66 changes: 0 additions & 66 deletions azure-pipelines.yml

This file was deleted.

32 changes: 30 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
[build-system]
requires = ["setuptools >= 40.6.0", "wheel", "numpy", "cython"]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel>=0.33.0",
"cython>=0.29.0",
"oldest-supported-numpy"
]

build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
junit_family= "legacy"
filterwarnings = [
"ignore::FutureWarning",
"ignore::PendingDeprecationWarning",
"ignore::DeprecationWarning",
# bogus numpy ABI warning (see numpy/#432)
"ignore:.*numpy.dtype size changed.*:RuntimeWarning",
"ignore:.*numpy.ufunc size changed.*:RuntimeWarning"
]

[tool.cibuildwheel]
archs = ["auto64"] # 64-bit only
skip = "pp* *musllinux*" # disable PyPy and musl-based wheels
test-requires = "pytest"
test-command = "pytest {project}/tests"

[tool.cibuildwheel.macos]
# https://cibuildwheel.readthedocs.io/en/stable/faq/#apple-silicon
archs = ["x86_64", "universal2"]
test-skip = ["*_arm64", "*_universal2:arm64"]
9 changes: 0 additions & 9 deletions pytest.ini

This file was deleted.

5 changes: 0 additions & 5 deletions requirements_build.txt

This file was deleted.

2 changes: 1 addition & 1 deletion requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==4.0.3
Sphinx==5.0.2
pydata-sphinx-theme
matplotlib
pyvista
Expand Down
Loading