forked from Jimver/cuda-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (93 loc) · 2.58 KB
/
test.yml
File metadata and controls
108 lines (93 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Test Action
on:
push:
branches:
- master
paths:
- .github/workflows/test.yml
- 'dist/**'
pull_request:
branches:
- master
paths:
- .github/workflows/test.yml
- 'dist/**'
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- windows-2025
- windows-2022
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-24.04-arm
- ubuntu-22.04-arm
method: [local, network]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version-file: .node-version
check-latest: true
- name: Install pnpm
uses: pnpm/action-setup@v5
with:
cache: true
- name: Install dependencies
run: |
pnpm i --frozen-lockfile
- name: Build
run: |
pnpm run build
- name: Run the action on this runner with method ${{matrix.method}}
uses: ./
with:
method: ${{matrix.method}}
log-file-suffix: '${{matrix.method}}-${{matrix.os}}'
- name:
Run the action on this runner with nvcc and libcublas subpackages
(Linux)
if: runner.os == 'Linux' && matrix.method == 'network'
uses: ./
with:
method: ${{matrix.method}}
sub-packages: '["nvcc"]'
non-cuda-sub-packages: '["libcublas"]'
log-file-suffix: 'nvcc-libcublas-${{matrix.method}}-${{matrix.os}}'
- name: Run the action on this runner with nvcc subpackage only (Windows)
if: runner.os == 'Windows'
id: test-action
uses: ./
with:
method: ${{matrix.method}}
sub-packages: '["nvcc"]'
log-file-suffix: 'nvcc-${{matrix.method}}-${{matrix.os}}'
- name: Print output cuda version
run: echo "${{ steps.test-action.outputs.cuda }}"
- name: Print output CUDA_PATH
run: echo "${{ steps.test-action.outputs.CUDA_PATH }}"
- name: Test if nvcc is available
run: nvcc -V
- name: List paths (windows)
if: runner.os == 'Windows'
shell: powershell
run: |
ls $env:CUDA_PATH
ls $env:CUDA_PATH\bin
ls $env:CUDA_PATH\include
- name: List paths (linux)
if: runner.os == 'Linux'
run: |
ls $CUDA_PATH
ls $CUDA_PATH/bin
ls $CUDA_PATH/include