Skip to content

Commit

Permalink
CI CUDA install: try to make it smaller to avoid disk-space issue
Browse files Browse the repository at this point in the history
Github CI runners have only ~14GB free space. CUDA takes a lot.
Using the "network" method with only a subset of packages may help.

Signed-off-by: Gary Oberbrunner <[email protected]>
  • Loading branch information
garyo committed Dec 29, 2023
1 parent 2fcbc0a commit 7a6ed2a
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: false
- name_prefix: Linux CentOS 7 VFX CY2022
release_prefix: linux-vfx2022
ostype: linux
Expand All @@ -43,6 +44,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: false
- name_prefix: Linux Rocky 8 VFX CY2023
release_prefix: linux-vfx2023
ostype: linux
Expand All @@ -57,6 +59,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: false
- name_prefix: Linux Ubuntu
release_prefix: linux-ubuntu
ostype: linux
Expand All @@ -70,6 +73,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: true
- name_prefix: MacOS
release_prefix: mac
ostype: mac
Expand All @@ -82,6 +86,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: false
- name_prefix: Windows
release_prefix: windows
ostype: windows
Expand All @@ -94,6 +99,7 @@ jobs:
cxx-compiler: clang++
cc-compiler: clang
compiler-desc: Clang
cuda: true
defaults:
run:
shell: bash
Expand Down Expand Up @@ -136,9 +142,22 @@ jobs:

- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
id: cuda-toolkit-linux
if: matrix.ostype == 'linux' && matrix.cuda == true
with:
cuda: '12.1.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
linux-local-args: '["--toolkit"]'

- name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit-win
if: matrix.ostype == 'windows' && matrix.cuda == true
with:
cuda: '12.1.0'
method: 'network'
sub-packages: '["nvcc", "cudart", "visual_studio_integration"]'

# - name: Install system dependencies (CentOS)
# run: |
Expand All @@ -150,9 +169,12 @@ jobs:
- name: Configure project with cmake
run: |
[[ ${{ matrix.cuda }} = true ]] && CUDA=TRUE || CUDA=FALSE
if [[ ${{ matrix.has_cmake_presets }} = true ]]; then
# Sets up to build in e.g. build/Release
cmake --preset $CONAN_PRESET -DBUILD_EXAMPLE_PLUGINS=TRUE .
cmake --preset $CONAN_PRESET -DBUILD_EXAMPLE_PLUGINS=TRUE \
-DOFX_SUPPORTS_OPENGLRENDER=TRUE \
-DOFX_SUPPORTS_CUDARENDER=$CUDA .
else
# VFX ref platforms 2022 & earlier have only cmake 3.19.
# Older cmake (<3.23) does not support presets, so invoke with explicit args.
Expand All @@ -161,6 +183,8 @@ jobs:
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLE_PLUGINS=TRUE
-DOFX_SUPPORTS_OPENGLRENDER=TRUE
-DOFX_SUPPORTS_CUDARENDER=$CUDA
fi
- name: Build with cmake
Expand Down

0 comments on commit 7a6ed2a

Please sign in to comment.