Skip to content

Commit c43a56d

Browse files
committed
Adding testing to CI
1 parent 827024b commit c43a56d

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

.github/workflows/publish-to-pypi.yaml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
if: startsWith(github.ref, 'refs/tags')
99
strategy:
1010
matrix:
11-
os: [ubuntu-latest, ubuntu-20.04, macos-13, macos-14, windows-latest, macos-latest]
11+
os: [ubuntu-latest, ubuntu-24.04, macos-13, macos-14, windows-latest, macos-latest]
1212

1313
steps:
1414
- uses: actions/checkout@v4
@@ -43,8 +43,51 @@ jobs:
4343
name: artifact-sdist
4444
path: dist/*.tar.gz
4545

46+
test-wheels:
47+
name: Test wheels on ${{ matrix.os }}
48+
needs: [build_wheels]
49+
runs-on: ${{ matrix.os }}
50+
if: startsWith(github.ref, 'refs/tags')
51+
strategy:
52+
matrix:
53+
python-version: ["3.10", "3.11", "3.12"]
54+
os: [ubuntu-latest, ubuntu-24.04, macos-13, macos-14, windows-latest, macos-latest]
55+
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: recursive
60+
61+
- name: Set up Python ${{ matrix.python-version }}
62+
uses: actions/setup-python@v5
63+
with:
64+
python-version: ${{ matrix.python-version }}
65+
66+
- name: Download Python wheels
67+
uses: actions/download-artifact@v4
68+
with:
69+
pattern: artifact-cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
70+
merge-multiple: true
71+
path: wheels
72+
73+
- name: Setup UV
74+
uses: astral-sh/setup-uv@v5
75+
with:
76+
version: "latest"
77+
78+
- name: Install wheel
79+
shell: bash
80+
run: |
81+
wheel_name=$(find wheels -type f -name "*$(echo ${{ matrix.python-version }} | tr -d '.')*")
82+
uv pip install --system "pytest-xdist" "$wheel_name[dev]" --extra-index-url https://download.pytorch.org/whl/cpu
83+
84+
- name: Run tests
85+
shell: bash
86+
run: |
87+
pytest -v .
88+
4689
upload_pypi:
47-
needs: [build_wheels, build_sdist]
90+
needs: [build_wheels, build_sdist, test-wheels]
4891
runs-on: ubuntu-latest
4992
if: startsWith(github.ref, 'refs/tags')
5093
steps:
@@ -57,4 +100,4 @@ jobs:
57100
- uses: pypa/[email protected]
58101
with:
59102
user: __token__
60-
password: ${{ secrets.PYPI_API_TOKEN }}
103+
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import setuptools
55
import sys
66

7-
__version__ = "1.0.8"
7+
__version__ = "1.0.9"
88

99

1010
class get_pybind_include(object):

0 commit comments

Comments
 (0)