From 162bff2ed0d3fd0759bfa89b4efcee221c2a4d38 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Sun, 22 Sep 2024 09:49:17 +0300 Subject: [PATCH] GitHub actions: Added runners for building with CUDA 12.5.1 and 12.6.0 (on Linux, building those both with ubuntu 20.04 and 24.04) --- .github/action-scripts/install-cuda-ubuntu.sh | 41 +++++++++++-------- .../action-scripts/install-cuda-windows.ps1 | 2 + .github/workflows/cmake-build-linux.yml | 20 +++++++++ .github/workflows/cmake-build-windows.yml | 12 ++++++ 4 files changed, 57 insertions(+), 18 deletions(-) diff --git a/.github/action-scripts/install-cuda-ubuntu.sh b/.github/action-scripts/install-cuda-ubuntu.sh index d36caacb..d81a32f2 100755 --- a/.github/action-scripts/install-cuda-ubuntu.sh +++ b/.github/action-scripts/install-cuda-ubuntu.sh @@ -11,28 +11,10 @@ # -## ------------------- -## Constants -## ------------------- - # @todo - apt repos/known supported versions? # @todo - GCC support matrix? -# List of sub-packages to install. -# @todo - pass this in from outside the script? -# @todo - check the specified subpackages exist via apt pre-install? apt-rdepends cuda-9-0 | grep "^cuda-"? - -# Ideally choose from the list of meta-packages to minimise variance between cuda versions (although it does change too) -CUDA_PACKAGES_IN=( - "command-line-tools" - "nvrtc-dev" - "cudart-dev" - "nvcc" - "profiler-api" - "libnvfatbin" -) - ## ------------------- ## Bash functions ## ------------------- @@ -57,6 +39,7 @@ function version_lt() { [ "$1" = "$2" ] && return 1 || version_le $1 $2 } + ## ------------------- ## Select CUDA version ## ------------------- @@ -94,6 +77,27 @@ if [ -z ${UBUNTU_VERSION} ]; then exit 1 fi +## ------------------- +## List of sub-packages to install +## ------------------- + +# @todo: Use pairs of package name and minimum version (or version range) + +# Ideally choose from the list of meta-packages to minimise variance between cuda versions (although it does change too) +CUDA_PACKAGES_IN=( + "command-line-tools" + "nvrtc-dev" + "cudart-dev" + "nvcc" + "profiler-api" +) + +if version_ge "$CUDA_VERSION_MAJOR_MINOR" "12.4"; then + CUDA_PACKAGES_IN+=( + "libnvfatbin" + "libnvfatbin-dev" + ) +fi ## --------------------------- ## GCC studio support check? @@ -106,6 +110,7 @@ fi ## ------------------------------- CUDA_PACKAGES="" + for package in "${CUDA_PACKAGES_IN[@]}" do : if [[ "${package}" == "profiler-api" ]] && version_lt "$CUDA_VERSION_MAJOR_MINOR" "11.8" ; then diff --git a/.github/action-scripts/install-cuda-windows.ps1 b/.github/action-scripts/install-cuda-windows.ps1 index bbc24895..05304adc 100755 --- a/.github/action-scripts/install-cuda-windows.ps1 +++ b/.github/action-scripts/install-cuda-windows.ps1 @@ -51,6 +51,8 @@ $CUDA_KNOWN_URLS = @{ "12.3.0" = "https://developer.download.nvidia.com/compute/cuda/12.3.0/network_installers/cuda_12.3.0_windows_network.exe"; "12.3.1" = "https://developer.download.nvidia.com/compute/cuda/12.3.1/network_installers/cuda_12.3.1_windows_network.exe"; "12.4.1" = "https://developer.download.nvidia.com/compute/cuda/12.4.1/network_installers/cuda_12.4.1_windows_network.exe"; + "12.5.1" = "https://developer.download.nvidia.com/compute/cuda/12.5.1/network_installers/cuda_12.5.1_windows_network.exe"; + "12.6.0" = "https://developer.download.nvidia.com/compute/cuda/12.6.0/network_installers/cuda_12.6.0_windows_network.exe"; } # @todo - change this to be based on _MSC_VER intead, or invert it to be CUDA keyed instead? diff --git a/.github/workflows/cmake-build-linux.yml b/.github/workflows/cmake-build-linux.yml index feccd2fd..392ffdce 100644 --- a/.github/workflows/cmake-build-linux.yml +++ b/.github/workflows/cmake-build-linux.yml @@ -33,6 +33,26 @@ jobs: # explicit include-based build matrix, of known valid options matrix: include: + - os: ubuntu-24.04 + cuda: "12.6.0" + gcc: 13 + shell: "bash" + cmake-generator: "Unix Makefiles" + - os: ubuntu-24.04 + cuda: "12.5.1" + gcc: 13 + shell: "bash" + cmake-generator: "Unix Makefiles" + - os: ubuntu-20.04 + cuda: "12.6.0" + gcc: 10 + shell: "bash" + cmake-generator: "Unix Makefiles" + - os: ubuntu-20.04 + cuda: "12.5.1" + gcc: 10 + shell: "bash" + cmake-generator: "Unix Makefiles" - os: ubuntu-20.04 cuda: "12.4.1" gcc: 10 diff --git a/.github/workflows/cmake-build-windows.yml b/.github/workflows/cmake-build-windows.yml index 5c13b92d..afeafe56 100644 --- a/.github/workflows/cmake-build-windows.yml +++ b/.github/workflows/cmake-build-windows.yml @@ -30,6 +30,18 @@ jobs: matrix: include: # Windows2019 & VS 2019 supports 10.1+ + - os: windows-2019 + cuda: "12.6.0" + visual-studio: "Visual Studio 16 2019" + shell: "powershell" + os-type: "windows" + cmake-platform-flag: "-A x64" + - os: windows-2019 + cuda: "12.5.1" + visual-studio: "Visual Studio 16 2019" + shell: "powershell" + os-type: "windows" + cmake-platform-flag: "-A x64" - os: windows-2019 cuda: "12.4.1" visual-studio: "Visual Studio 16 2019"