Skip to content

Commit 7409edd

Browse files
committed
Fix workflow syntax errors
- Remove matrix.enabled condition (not available at job level) - Split platform-specific steps with proper conditionals - Separate GPU vs CPU testing steps - Simplify matrix to only active configurations Signed-off-by: cdunning <[email protected]>
1 parent 31eba44 commit 7409edd

File tree

1 file changed

+44
-60
lines changed

1 file changed

+44
-60
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212
name: Test ${{ matrix.name }}
1313
runs-on: ${{ matrix.runner }}
1414
timeout-minutes: ${{ matrix.timeout }}
15-
if: ${{ matrix.enabled }}
1615
strategy:
1716
fail-fast: false
1817
matrix:
@@ -22,31 +21,11 @@ jobs:
2221
os: linux
2322
gpu: true
2423
timeout: 30
25-
enabled: true
2624
- name: "CPU Linux x86_64"
2725
runner: linux-amd64-gpu-rtxpro6000-latest-1
2826
os: linux
2927
gpu: false
3028
timeout: 15
31-
enabled: true
32-
- name: "CPU Linux aarch64"
33-
runner: ubuntu-latest # TODO: Replace with ARM64 runner
34-
os: linux
35-
gpu: false
36-
timeout: 15
37-
enabled: false
38-
- name: "CPU Windows x86_64"
39-
runner: windows-amd64-gpu-rtxpro6000-latest-1
40-
os: windows
41-
gpu: false
42-
timeout: 15
43-
enabled: false
44-
- name: "GPU Windows x86_64"
45-
runner: windows-amd64-gpu-rtxpro6000-latest-1
46-
os: windows
47-
gpu: true
48-
timeout: 30
49-
enabled: false
5029

5130
steps:
5231
- name: Checkout
@@ -60,51 +39,56 @@ jobs:
6039
docker --version
6140
docker run --rm hello-world
6241
63-
- name: Check Hardware
42+
- name: Check Hardware (Linux)
43+
if: matrix.os == 'linux'
6444
timeout-minutes: 5
65-
shell: ${{ matrix.os == 'windows' && 'pwsh' || 'bash' }}
6645
run: |
67-
if [ "${{ matrix.os }}" = "windows" ]; then
68-
Write-Host "=== Host Hardware Information ==="
69-
if [ "${{ matrix.gpu }}" = "true" ]; then
70-
nvidia-smi
71-
else
72-
Write-Host "CPU-only mode (no GPU access)"
73-
fi
46+
echo "=== Host Hardware Information ==="
47+
lspci | grep -i nvidia || echo "No NVIDIA GPU found via lspci"
48+
if [ "${{ matrix.gpu }}" = "true" ]; then
49+
nvidia-smi || echo "nvidia-smi not available on host"
7450
else
75-
echo "=== Host Hardware Information ==="
76-
lspci | grep -i nvidia || echo "No NVIDIA GPU found via lspci"
77-
if [ "${{ matrix.gpu }}" = "true" ]; then
78-
nvidia-smi || echo "nvidia-smi not available on host"
79-
else
80-
echo "CPU-only mode (same hardware, no --gpus flag)"
81-
fi
82-
if [ "${{ matrix.runner }}" = "ubuntu-latest" ]; then
83-
echo "Architecture: $(uname -m)"
84-
fi
51+
echo "CPU-only mode (same hardware, no --gpus flag)"
52+
fi
53+
if [ "${{ matrix.runner }}" = "ubuntu-latest" ]; then
54+
echo "Architecture: $(uname -m)"
8555
fi
8656
87-
- name: Test CUDA Image
57+
- name: Check Hardware (Windows)
58+
if: matrix.os == 'windows'
59+
timeout-minutes: 5
60+
shell: pwsh
61+
run: |
62+
Write-Host "=== Host Hardware Information ==="
63+
if ("${{ matrix.gpu }}" -eq "true") {
64+
nvidia-smi
65+
} else {
66+
Write-Host "CPU-only mode (no GPU access)"
67+
}
68+
69+
- name: Test CUDA Image with GPU
70+
if: matrix.gpu == true
8871
timeout-minutes: 10
89-
shell: ${{ matrix.os == 'windows' && 'pwsh' || 'bash' }}
9072
run: |
9173
docker pull nvidia/cuda:13.0.2-base-ubuntu24.04
74+
echo "=== Testing with GPU access ==="
75+
docker run --rm --gpus all nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c "
76+
echo 'Container with GPU access:'
77+
nvidia-smi || echo 'nvidia-smi not available in container'
78+
cat /etc/os-release
79+
echo 'CUDA Runtime version:'
80+
cat /usr/local/cuda/version.txt 2>/dev/null || echo 'CUDA version file not found'
81+
" || echo "GPU access failed - may not be available on this runner"
9282
93-
if [ "${{ matrix.gpu }}" = "true" ]; then
94-
echo "=== Testing with GPU access ==="
95-
docker run --rm --gpus all nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c "
96-
echo 'Container with GPU access:'
97-
nvidia-smi || echo 'nvidia-smi not available in container'
98-
cat /etc/os-release
99-
echo 'CUDA Runtime version:'
100-
cat /usr/local/cuda/version.txt 2>/dev/null || echo 'CUDA version file not found'
101-
" || echo "GPU access failed - may not be available on this runner"
102-
else
103-
echo "=== Testing without GPU access (CPU only) ==="
104-
docker run --rm nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c "
105-
echo 'CUDA container test successful (CPU only - no GPU access)'
106-
cat /etc/os-release
107-
which nvcc || echo 'nvcc not in PATH'
108-
nvidia-smi 2>/dev/null || echo 'nvidia-smi not available without --gpus flag (expected)'
109-
"
110-
fi
83+
- name: Test CUDA Image CPU Only
84+
if: matrix.gpu == false
85+
timeout-minutes: 10
86+
run: |
87+
docker pull nvidia/cuda:13.0.2-base-ubuntu24.04
88+
echo "=== Testing without GPU access (CPU only) ==="
89+
docker run --rm nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c "
90+
echo 'CUDA container test successful (CPU only - no GPU access)'
91+
cat /etc/os-release
92+
which nvcc || echo 'nvcc not in PATH'
93+
nvidia-smi 2>/dev/null || echo 'nvidia-smi not available without --gpus flag (expected)'
94+
"

0 commit comments

Comments
 (0)