From 7a6ed2a7372c10958496759610298b1432948a2e Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Fri, 29 Dec 2023 09:35:03 -0500 Subject: [PATCH] CI CUDA install: try to make it smaller to avoid disk-space issue 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 --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e77970af..1ecf4a52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -70,6 +73,7 @@ jobs: cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang + cuda: true - name_prefix: MacOS release_prefix: mac ostype: mac @@ -82,6 +86,7 @@ jobs: cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang + cuda: false - name_prefix: Windows release_prefix: windows ostype: windows @@ -94,6 +99,7 @@ jobs: cxx-compiler: clang++ cc-compiler: clang compiler-desc: Clang + cuda: true defaults: run: shell: bash @@ -136,9 +142,22 @@ jobs: - name: Install CUDA Toolkit uses: Jimver/cuda-toolkit@v0.2.11 - 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/cuda-toolkit@v0.2.11 + 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: | @@ -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. @@ -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