File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,25 +12,32 @@ jobs:
1212 strategy :
1313 matrix :
1414 include :
15- - image : ubuntu-latest
16- kernel : linux-x64
15+ # - image: ubuntu-latest
16+ # kernel: linux-x64
1717 - image : windows-latest
1818 kernel : win32-x64
19- - image : macos-13
20- kernel : darwin-x64
21- - image : macos-latest
22- kernel : darwin-arm64
19+ # - image: macos-13
20+ # kernel: darwin-x64
21+ # - image: macos-latest
22+ # kernel: darwin-arm64
2323 name : Build ${{ matrix.kernel }}
2424 runs-on : ${{ matrix.image }}
2525 steps :
2626 - uses : actions/checkout@v3
27- - uses : actions/setup-node@v2
27+ - uses : actions/setup-node@v4
2828 with :
2929 node-version : ' 16'
3030 - run : |
3131 sudo apt-get install -y nvidia-driver-535
3232 sudo apt-get install -y libnvidia-ml-dev
3333 if: matrix.kernel == 'linux-x64'
34+ - uses : conda-incubator/setup-miniconda@v3
35+ with :
36+ activate-environment : nvml-tools
37+ if : matrix.kernel == 'win32-x64'
38+ - run : |
39+ conda install cuda-nvml-dev -c nvidia/label/cuda-12.9.1
40+ if: matrix.kernel == 'win32-x64'
3441 - run : npm run install-dependencies
3542 - run : npm run prebuild
3643 - uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 1010 ],
1111 "include_dirs" : [
1212 "./node_modules/node-addon-api" ,
13- "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.9/include"
13+ "<!(echo %CUDA_PATH%)/include" ,
14+ "<!(echo %CONDA_PREFIX%)/Library/include" ,
1415 ],
1516 "ldflags" : [
1617 "-lpsapi" , # gcc/g++
1718 "-lnvidia-ml" ,
1819 ],
1920 "link_settings" : {
2021 "libraries" : [
21- "psapi.lib" # msvc
22+ "psapi.lib" , # msvc
23+ ],
24+ "variables" : {
25+ 'has_cuda_path' : '<!(if defined CUDA_PATH (echo 1) else (echo 0))' ,
26+ },
27+ "conditions" : [
28+ ['has_cuda_path==1' , { # locally
29+ "libraries" : ["<!(echo %CUDA_PATH%)/lib/x64/nvml.lib" ],
30+ }],
31+ ['has_cuda_path==0' , { # github actions conda
32+ "libraries" : ["<!(echo %CONDA_PREFIX%)/Library/lib/nvml.lib" ],
33+ }],
2234 ]
2335 },
2436 "cflags!" : [ "-fno-exceptions" ],
You can’t perform that action at this time.
0 commit comments