Skip to content

Commit 54397df

Browse files
Add build pymomentum in gpu environment
1 parent becb423 commit 54397df

File tree

3 files changed

+3363
-1479
lines changed

3 files changed

+3363
-1479
lines changed

.github/workflows/ci_windows.yml

+31-2
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,46 @@ jobs:
4545
--parallel
4646
4747
pymomentum:
48-
name: py-win
48+
name: py-${{ matrix.pixi_env }}-win
4949
runs-on: windows-latest
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
include:
54+
- pixi_env: "cpu"
55+
- pixi_env: "gpu"
56+
cuda_version: "12.8.0"
57+
env:
58+
FULL_CUDA_VERSION: ${{ matrix.cuda_version }}
5059
steps:
5160
- name: Checkout
5261
uses: actions/checkout@v4
5362

63+
- name: Install CUDA Toolkit
64+
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
65+
uses: Jimver/[email protected]
66+
id: cuda-toolkit
67+
with:
68+
# Available versions: https://github.com/Jimver/cuda-toolkit/blob/v0.2.21/src/links/linux-links.ts
69+
cuda: ${{ matrix.cuda_version }}
70+
71+
- name: Check CUDA Version
72+
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
73+
run: |
74+
nvcc --version
75+
76+
- name: Set Conda environment variables
77+
if: ${{ contains(matrix.pixi_env, 'cuda') || contains(matrix.pixi_env, 'gpu') }}
78+
shell: pwsh
79+
run: |
80+
$majorVersion = $Env:FULL_CUDA_VERSION.Split('.')[0]
81+
"CONDA_OVERRIDE_CUDA=$majorVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
82+
5483
- name: Set up pixi
5584
uses: prefix-dev/[email protected]
5685
with:
5786
cache: true
5887

5988
- name: Build and test PyMomentum
6089
run: |
61-
pixi run test_py
90+
pixi run -e ${{ matrix.pixi_env }} test_py

0 commit comments

Comments
 (0)