cuda: Add compile test only for CI - #1579
Open
StormBytePP wants to merge 1 commit into
Open
Conversation
Signed-off-by: David C. Manuelda <StormByte@gmail.com>
StormBytePP
force-pushed
the
ci_for_cuda
branch
from
August 13, 2026 13:07
7d18a7e to
12efe54
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CUDA compile check to the
libvmafGitHub Actions workflow so that-Denable_cuda=trueis exercised on every push/PR.This implements the request in #1576: a lightweight CI job that installs the CUDA toolkit +
nv-codec-headers, configures with Meson, and builds/installs. Runners do not have an NVIDIA GPU, so device tests are not run; the goal is to catch configure/compile regressions early.Closes #1576
Build directory (out-of-tree, CUDA jobs only)
Only the CUDA matrix entries configure the build in a temporary directory outside the source tree (e.g.
$RUNNER_TEMP/libvmaf_build). All other jobs keep the existing in-tree layout (libvmaf/build), so tests, tox, and packaging behave as on master.Out-of-tree for CUDA is intentional:
nvcc/clangcustom targets use relative include paths such as-I ./src,-I ../src, etc. Those paths work when the build directory is a subdirectory of the source root, but break when the build dir is fully outside the tree.meson.current_source_dir()/ the build directory, and adjusts related test wiring. Once CUDA: Fix compile, SIGSEGV and tests #1573 is merged, the CUDA CI jobs should stay green for out-of-tree builds as well.So this workflow both guards CUDA support and documents why out-of-tree builds matter for the CUDA path, without disrupting the rest of the matrix.
What the CUDA jobs do
Two matrix entries on
ubuntu-latest(x86_64):linux-x86_64-gcc-cuda-Denable_nvcc=true)linux-x86_64-clang-cuda-Denable_nvcc=false)Both:
-Denable_cuda=truenvidia-openand fail on CPU-only runners)ffnvcodec/dynlink_cuda.his availablemeson setup+ninja installonly (no GPU tests)$RUNNER_TEMP/libvmaf_build)Existing non-CUDA jobs are unchanged (in-tree build, tests, tox, packaging).
Notes
-Denable_nvcc. Toolkit and Clang versions on the runner may need occasional bumps when Ubuntu/NVIDIA package sets change.Jimver/cuda-toolkitpurely for convenience (precise version control + compile-only packages).If the maintainers prefer to avoid external actions, this can be trivially replaced with a manual installation via
apt(or the official NVIDIA runfile) on Ubuntu. Just let me know and I’ll update it.Test plan
libvmaf/build)meson setup+ninja install(out-of-tree)meson setup+ninja install(out-of-tree)