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
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 :
5710058101 with :
59102 user : __token__
60- password : ${{ secrets.PYPI_API_TOKEN }}
103+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments