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 install sdist from build-and-deploy.yml #10

Merged
merged 4 commits into from
Jul 16, 2024
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
31 changes: 25 additions & 6 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ jobs:
- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: stl-reader-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
Expand All @@ -36,22 +37,40 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'

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

- uses: actions/upload-artifact@v3
- name: Install from sdist
run: pip install dist/stl_reader*.tar.gz

- name: Run tests
run: |
pip install pyvista pytest
pytest -x

- uses: actions/upload-artifact@v4
with:
name: stl-reader-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # upload to PyPI on every tag
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: actions/download-artifact@v4
- name: Flatten directory structure
run: |
mkdir -p dist/
find . -name '*.whl' -exec mv {} dist/ \;
find . -name '*.tar.gz' -exec mv {} dist/ \;

- name: List artifacts
run: ls -R

- uses: pypa/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ filterwarnings = [
"ignore:.*numpy.dtype size changed.*:RuntimeWarning",
"ignore:.*numpy.ufunc size changed.*:RuntimeWarning"
]
testpaths = 'tests'

[tool.cibuildwheel]
archs = ["auto64"] # 64-bit only
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.8",
url="https://github.com/pyvista/stl-reader",
Expand All @@ -76,7 +77,7 @@
]
),
package_data={
"stl_reader": ["*.pyx"], # include all .pyx files in the package
"stl_reader": ["*.pyx", "*.h", "stlfile.c", "_stlfile_wrapper.c"],
},
keywords="read stl",
install_requires=["numpy>1.11.0,<2.0"],
Expand Down
Loading