-
-
Notifications
You must be signed in to change notification settings - Fork 0
155 lines (130 loc) · 4.07 KB
/
Copy path_test.yml
File metadata and controls
155 lines (130 loc) · 4.07 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: _Test
on:
workflow_call:
inputs:
os:
description: 'OS to test'
required: true
type: string
version:
description: 'CUDA version to test'
required: true
type: string
method:
description: 'Method to test'
required: true
type: string
debug:
description: 'Enable debug logging'
required: false
type: boolean
default: false
jobs:
Test:
runs-on: ${{ inputs.os }}
env:
ACTIONS_STEP_DEBUG: ${{ inputs.debug }}
ACTIONS_RUNNER_DEBUG: ${{ inputs.debug }}
steps:
- name: Expand Disk Space
if: runner.os == 'Linux'
run: |
df -h
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
echo "-------"
df -h
- name: Checkout
uses: actions/checkout@v7
- name: Setup Vite+
uses: voidzero-dev/setup-vp@v1
with:
cache: true
node-version-file: .node-version
- name: Build
run: vp pack
- name: Test Local Action
id: setup-cuda
uses: ./
with:
version: ${{ inputs.version }}
method: ${{ inputs.method }}
- name: Verify CUDA Installation (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
echo "CUDA Version: ${{ steps.setup-cuda.outputs.version }}"
echo "CUDA Path: ${{ steps.setup-cuda.outputs.cuda-path }}"
echo "PATH: $PATH"
# Check if CUDA_PATH is set
if [ -z "$CUDA_PATH" ]; then
echo "Error: CUDA_PATH is not set"
exit 1
fi
ls $CUDA_PATH
ls $CUDA_PATH/bin
# Check if nvcc exists
if command -v nvcc &> /dev/null; then
echo "nvcc found at: $(which nvcc)"
nvcc --version
else
echo "Error: nvcc not found in PATH"
exit 1
fi
# Verify CUDA path exists
if [ ! -d "$CUDA_PATH" ]; then
echo "Error: CUDA path does not exist: $CUDA_PATH"
exit 1
fi
echo "CUDA installation verified successfully"
- name: Verify CUDA Installation (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
Write-Host "CUDA Version: ${{ steps.setup-cuda.outputs.version }}"
Write-Host "CUDA Path: ${{ steps.setup-cuda.outputs.cuda-path }}"
Write-Host "PATH: $env:PATH"
# Check if CUDA_PATH is set
if (-not $env:CUDA_PATH) {
Write-Error "Error: CUDA_PATH is not set"
exit 1
}
# Check if nvcc exists
if (Get-Command nvcc -ErrorAction SilentlyContinue) {
Write-Host "nvcc found at: $((Get-Command nvcc).Source)"
nvcc --version
} else {
Write-Error "Error: nvcc not found in PATH"
exit 1
}
# Verify CUDA path exists
if (-not (Test-Path $env:CUDA_PATH)) {
Write-Error "Error: CUDA path does not exist: $env:CUDA_PATH"
exit 1
}
Write-Host "CUDA installation verified successfully"
- name: Verify CUDA Installation
shell: bash
run: |
echo "CUDA Version: ${{ steps.setup-cuda.outputs.version }}"
echo "CUDA Path: ${{ steps.setup-cuda.outputs.cuda-path }}"
echo "PATH: $PATH"
# Check if CUDA_PATH is set
if [ -z "$CUDA_PATH" ]; then
echo "Error: CUDA_PATH is not set"
exit 1
fi
# Check if nvcc exists
if command -v nvcc &> /dev/null; then
echo "nvcc found at: $(which nvcc)"
nvcc --version
else
echo "Error: nvcc not found in PATH"
exit 1
fi
# Verify CUDA path exists
if [ ! -d "$CUDA_PATH" ]; then
echo "Error: CUDA path does not exist: $CUDA_PATH"
exit 1
fi
echo "CUDA installation verified successfully"