@@ -184,48 +184,24 @@ jobs:
184184 retention-days : 7
185185 if-no-files-found : error
186186
187- coverage-windows :
188- name : Coverage (Windows)
189- runs-on : " windows-amd64-gpu-a100-latest-1"
187+ # Build Windows wheels on GitHub-hosted runner (has VS, no GPU)
188+ build-wheel-windows :
189+ name : Build Wheels (Windows)
190+ runs-on : windows-2022
190191 permissions :
191- id-token : write
192- contents : write
192+ contents : read
193+ defaults :
194+ run :
195+ shell : bash --noprofile --norc -xeuo pipefail {0}
193196 env :
194197 HOST_PLATFORM : " win-64"
195- ARCH : " amd64"
196198 CUDA_PYTHON_COVERAGE : " 1"
197199 steps :
198200 - name : Checkout ${{ github.event.repository.name }}
199201 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
200202 with :
201203 fetch-depth : 0
202204
203- - name : Setup proxy cache
204- uses : nv-gha-runners/setup-proxy-cache@main
205- continue-on-error : true
206-
207- - name : Update driver
208- env :
209- DRIVER_MODE : " TCC"
210- GPU_TYPE : " a100"
211- run : |
212- ci/tools/install_gpu_driver.ps1
213-
214- - name : Ensure GPU is working
215- run : |
216- nvidia-smi
217-
218- - name : Set environment variables
219- shell : bash --noprofile --norc -xeuo pipefail {0}
220- env :
221- BUILD_CUDA_VER : ${{ env.CUDA_VER }}
222- CUDA_VER : ${{ env.CUDA_VER }}
223- HOST_PLATFORM : ${{ env.HOST_PLATFORM }}
224- LOCAL_CTK : ${{ env.LOCAL_CTK }}
225- PY_VER : ${{ env.PY_VER }}
226- SHA : ${{ github.sha }}
227- run : ./ci/tools/env-vars test
228-
229205 - name : Set up Python
230206 uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
231207 with :
@@ -235,11 +211,10 @@ jobs:
235211 uses : ilammy/msvc-dev-cmd@v1
236212
237213 - name : Set up mini CTK
238- if : ${{ env.LOCAL_CTK == '1' }}
239214 uses : ./.github/actions/fetch_ctk
240215 continue-on-error : false
241216 with :
242- host-platform : ${{ env.HOST_PLATFORM }}
217+ host-platform : win-64
243218 cuda-version : ${{ env.CUDA_VER }}
244219
245220 - name : Patch cuda_bindings for Cython coverage
@@ -268,45 +243,125 @@ jobs:
268243 run : |
269244 python -m venv .venv
270245
271- - name : Build cuda- pathfinder
246+ - name : Build and install cuda. pathfinder
272247 run : |
273- .venv\Scripts\pip install -v .\cuda_pathfinder
248+ .venv/Scripts/pip install wheel setuptools Cython
249+ .venv/Scripts/pip wheel -v --no-deps ./cuda_pathfinder -w ./wheels/
274250
275- - name : Build cuda-python-test-helpers
276- run : |
277- .venv\Scripts\pip install -v .\cuda_python_test_helpers
278-
279- - name : Build cuda-bindings
251+ - name : Build cuda.bindings wheel
280252 run : |
281253 cd cuda_bindings
282- ..\ .venv\ Scripts\ pip install -v . --group test
254+ ../ .venv/ Scripts/ pip wheel -v --no-deps . -w ../wheels/
283255
284- - name : Build cuda- core
256+ - name : Build cuda. core wheel
285257 run : |
258+ export PIP_FIND_LINKS="$(pwd)/wheels"
259+ export PIP_PRE=1
286260 cd cuda_core
287- ..\ .venv\ Scripts\ pip install -v . --group test
261+ ../ .venv/ Scripts/ pip wheel -v --no-deps . -w ../wheels/
288262
289- - name : Install coverage tools
263+ - name : List wheel artifacts
264+ run : |
265+ echo "=== Windows wheel artifacts ==="
266+ ls -lahR ./wheels/
267+
268+ - name : Upload Windows wheel artifacts
269+ uses : actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
270+ with :
271+ name : coverage-windows-wheels
272+ path : ./wheels/*.whl
273+ retention-days : 1
274+ if-no-files-found : error
275+
276+ # Run coverage tests on self-hosted GPU runner (no VS needed, installs pre-built wheels)
277+ coverage-windows :
278+ name : Coverage (Windows)
279+ needs : [build-wheel-windows]
280+ runs-on : " windows-amd64-gpu-a100-latest-1"
281+ permissions :
282+ id-token : write
283+ contents : write
284+ env :
285+ HOST_PLATFORM : " win-64"
286+ ARCH : " amd64"
287+ CUDA_PYTHON_COVERAGE : " 1"
288+ defaults :
289+ run :
290+ shell : bash --noprofile --norc -xeuo pipefail {0}
291+ steps :
292+ - name : Checkout ${{ github.event.repository.name }}
293+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
294+ with :
295+ fetch-depth : 0
296+
297+ - name : Setup proxy cache
298+ uses : nv-gha-runners/setup-proxy-cache@main
299+ continue-on-error : true
300+
301+ - name : Update driver
302+ shell : powershell
303+ env :
304+ DRIVER_MODE : " TCC"
305+ GPU_TYPE : " a100"
306+ run : |
307+ ci/tools/install_gpu_driver.ps1
308+
309+ - name : Ensure GPU is working
310+ run : |
311+ nvidia-smi
312+
313+ - name : Set up Python
314+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
315+ with :
316+ python-version : ${{ env.PY_VER }}
317+
318+ - name : Download Windows wheel artifacts
319+ uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
320+ with :
321+ name : coverage-windows-wheels
322+ path : ./wheels/
323+
324+ - name : List downloaded wheel artifacts
325+ run : |
326+ echo "=== Downloaded wheel artifacts ==="
327+ ls -lahR ./wheels/
328+
329+ - name : Create venv
330+ run : |
331+ python -m venv .venv
332+
333+ - name : Install wheels from build job
334+ run : |
335+ .venv/Scripts/pip install ./wheels/cuda_pathfinder*.whl
336+ echo "Installed cuda.pathfinder"
337+
338+ .venv/Scripts/pip install ./wheels/cuda_bindings*.whl
339+ echo "Installed cuda.bindings"
340+
341+ .venv/Scripts/pip install ./wheels/cuda_core*.whl
342+ echo "Installed cuda.core"
343+
344+ - name : Install test dependencies and coverage tools
290345 run : |
291- .venv\Scripts\pip install coverage pytest-cov Cython
346+ .venv/Scripts/pip install -v ./cuda_python_test_helpers
347+ .venv/Scripts/pip install coverage pytest-cov Cython
348+ .venv/Scripts/pip install --group ./cuda_bindings/pyproject.toml:test
349+ .venv/Scripts/pip install --group ./cuda_core/pyproject.toml:test
292350
293351 - name : Get install root
294352 id : install-root
295- shell : bash
296353 run : |
297354 INSTALL_ROOT=$(.venv/Scripts/python -c 'import cuda; import os; print(os.path.dirname(cuda.__path__[0]))')
298355 echo "INSTALL_ROOT=$INSTALL_ROOT" >> $GITHUB_OUTPUT
299356 echo "Install root: $INSTALL_ROOT"
300357
301358 - name : Run cuda.pathfinder tests
302- shell : bash
303359 continue-on-error : true
304360 run : |
305361 cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
306362 "$GITHUB_WORKSPACE/.venv/Scripts/pytest" -v --cov=./cuda --cov-append --cov-context=test --cov-config="$GITHUB_WORKSPACE/.coveragerc" "$GITHUB_WORKSPACE/cuda_pathfinder/tests"
307363
308364 - name : Run cuda.bindings tests (with 8MB stack)
309- shell : bash
310365 continue-on-error : true
311366 run : |
312367 cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
@@ -342,14 +397,12 @@ jobs:
342397 PYTEST_EOF
343398
344399 - name : Run cuda.core tests
345- shell : bash
346400 continue-on-error : true
347401 run : |
348402 cd "${{ steps.install-root.outputs.INSTALL_ROOT }}"
349403 "$GITHUB_WORKSPACE/.venv/Scripts/pytest" -v --cov=./cuda --cov-append --cov-context=test --cov-config="$GITHUB_WORKSPACE/.coveragerc" "$GITHUB_WORKSPACE/cuda_core/tests"
350404
351405 - name : Copy Windows coverage file to workspace
352- shell : bash
353406 run : |
354407 cp "${{ steps.install-root.outputs.INSTALL_ROOT }}/.coverage" "$GITHUB_WORKSPACE/.coverage.windows"
355408 echo "Copied .coverage.windows to $GITHUB_WORKSPACE"
0 commit comments