@@ -27,25 +27,25 @@ jobs:
2727 with :
2828 submodules : recursive
2929
30- - name : Setup Python
31- uses : actions/setup-python@v6.2.0
30+ - uses : astral-sh/setup-uv@v7
3231 with :
33- python-version : 3.11
32+ python-version : ' 3.11'
33+
3434
3535 - name : Make sdist
36- run : |
37- python --version
38- pipx --version
39- pipx run build --sdist
36+ run : uv build --sdist
4037
38+ # Test the sdist, NOT the local checkout.
39+ # Use a fresh venv + uv pip install (not uv sync, which would build from source).
4140 - name : Install from sdist
4241 run : |
43- pip install --upgrade pip setuptools wheel
42+ uv venv
4443 cp dist/h3-*.tar.gz h3.tar.gz
45- pip install h3.tar.gz[test]
44+ uv pip install h3.tar.gz[numpy] pytest pytest-cov
4645
4746 - name : Test sdist
48- run : pytest
47+ # run pytest directly from the venv to avoid `uv run` syncing from the local checkout
48+ run : .venv/bin/pytest
4949
5050 - name : Upload artifacts to GitHub
5151 uses : actions/upload-artifact@v6.0.0
8585 build : ' cp*-manylinux_x86_64'
8686 name : Linux Intel glibc 64-bit
8787
88- - os : ubuntu-22.04
89- build : ' cp38-musllinux_x86_64'
90- name : Linux Intel musl 64-bit 3.8
91- - os : ubuntu-22.04
92- build : ' cp39-musllinux_x86_64'
93- name : Linux Intel musl 64-bit 3.9
9488 - os : ubuntu-22.04
9589 build : ' cp310-musllinux_x86_64'
9690 name : Linux Intel musl 64-bit 3.10
@@ -107,12 +101,6 @@ jobs:
107101 build : ' cp314-musllinux_x86_64'
108102 name : Linux Intel musl 64-bit 3.14
109103
110- - os : ubuntu-22.04
111- build : ' cp38-manylinux_aarch64'
112- name : Linux Aarch64 3.8
113- - os : ubuntu-22.04
114- build : ' cp39-manylinux_aarch64'
115- name : Linux Aarch64 3.9
116104 - os : ubuntu-22.04
117105 build : ' cp310-manylinux_aarch64'
118106 name : Linux Aarch64 3.10
@@ -134,7 +122,9 @@ jobs:
134122 with :
135123 submodules : recursive
136124
137- - name : Set MSVC for Windows-x64
125+ - uses : astral-sh/setup-uv@v7
126+
127+ - name : Set MSVC for Windows-x64
138128 uses : microsoft/setup-msbuild@v2
139129 if : matrix.os == 'windows-latest'
140130 with :
@@ -161,14 +151,14 @@ jobs:
161151
162152 - uses : pypa/cibuildwheel@v3.3.1
163153 env :
154+ CIBW_BUILD_FRONTEND : ' build[uv]'
164155 CIBW_TEST_REQUIRES : pytest pytest-cov numpy
165156 CIBW_TEST_COMMAND : pytest {project}/tests
166157 CIBW_ARCHS_LINUX : auto aarch64
167158 CIBW_BUILD : ${{ matrix.build }}
168159
169160 - name : Check with Twine
170- run : |
171- pipx run twine check wheelhouse/*
161+ run : uvx twine check wheelhouse/*
172162
173163 - name : Upload artifacts to GitHub
174164 uses : actions/upload-artifact@v6.0.0
@@ -193,15 +183,19 @@ jobs:
193183 needs : [merge]
194184 runs-on : ubuntu-latest
195185 steps :
186+ - uses : astral-sh/setup-uv@v7
187+ with :
188+ enable-cache : false
189+ ignore-empty-workdir : true
190+
196191 - name : Download merged artifacts
197192 uses : actions/download-artifact@v7.0.0
198193 with :
199194 name : wheels_and_sdist
200195 path : dist
201196
202197 - name : Check all wheels and sdist with Twine
203- run : |
204- pipx run twine check dist/*
198+ run : uvx twine check dist/*
205199
206200 to_pypi :
207201 needs : [check_merged]
0 commit comments