Skip to content

Commit 0ca2db9

Browse files
utilForeverCopilot
andcommitted
ci: add CUDA 13 nvvm package and fail-fast control
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 203ebe1 commit 0ca2db9

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/scripts/actions/install_cuda_windows.ps1

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ $CUDA_PACKAGES = ""
8888
if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN -contains "crt")) {
8989
$CUDA_PACKAGES_IN += "crt"
9090
}
91+
# CUDA 13+ requires NVVM tooling (cicc) for nvcc compilation.
92+
if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN -contains "nvvm")) {
93+
$CUDA_PACKAGES_IN += "nvvm"
94+
}
9195

9296
# for CUDA >= 11 cudart is a required package.
9397
# if([version]$CUDA_VERSION_FULL -ge [version]"11.0") {
@@ -98,9 +102,9 @@ if ([version]$CUDA_VERSION_FULL -ge [version]"13.0" -and -not ($CUDA_PACKAGES_IN
98102

99103
Foreach ($package in $CUDA_PACKAGES_IN) {
100104
# Make sure the correct package name is used for nvcc.
101-
if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1"){
105+
if($package -eq "nvcc" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1"){
102106
$package="compiler"
103-
} elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -lt [version]"9.1") {
107+
} elseif($package -eq "compiler" -and [version]$CUDA_VERSION_FULL -ge [version]"9.1") {
104108
$package="nvcc"
105109
}
106110
$CUDA_PACKAGES += " $($package)_$($CUDA_MAJOR).$($CUDA_MINOR)"
@@ -140,12 +144,12 @@ if(Test-Path -Path $CUDA_REPO_PKG_LOCAL){
140144

141145
# Invoke silent install of CUDA (via network installer)
142146
Write-Output "Installing CUDA $($CUDA_VERSION_FULL). Subpackages $($CUDA_PACKAGES)"
143-
Start-Process -Wait -FilePath .\"$($CUDA_REPO_PKG_LOCAL)" -ArgumentList "-s $($CUDA_PACKAGES)"
147+
$installerProcess = Start-Process -Wait -PassThru -FilePath .\"$($CUDA_REPO_PKG_LOCAL)" -ArgumentList "-s $($CUDA_PACKAGES)"
144148

145149
# Check the return status of the CUDA installer.
146-
if (!$?) {
147-
Write-Output "Error: CUDA installer reported error. $($LASTEXITCODE)"
148-
exit 1
150+
if ($installerProcess.ExitCode -ne 0) {
151+
Write-Output "Error: CUDA installer reported error. Exit code: $($installerProcess.ExitCode)"
152+
exit $installerProcess.ExitCode
149153
}
150154

151155
# Store the CUDA_PATH in the environment for the current session, to be forwarded in the action.

.github/workflows/windows-cuda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
jobs:
1414
build-windows-cuda:
1515
strategy:
16+
fail-fast: false
1617
matrix:
1718
include:
1819
# Windows Server 2025 + Visual Studio 2026 + CUDA 13.2.0

0 commit comments

Comments
 (0)