diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 51aba02..8651b71 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -26,8 +26,9 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.19.2 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: stl-reader-wheels-${{ matrix.os }} path: ./wheelhouse/*.whl build_sdist: @@ -36,11 +37,24 @@ 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: @@ -48,10 +62,15 @@ jobs: 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/gh-action-pypi-publish@v1.9.0 with: diff --git a/pyproject.toml b/pyproject.toml index ffa3a77..7c0539a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/setup.py b/setup.py index 2c4b259..82fd5da 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -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"],