Skip to content

publish-cvcpkg: build libcvc-cuda's bundle with its recipe's own script - #1153

Merged
transfix merged 5 commits into
masterfrom
tfx/publish-cuda-via-recipe
Nov 13, 2026
Merged

transfix merged 5 commits into
masterfrom
tfx/publish-cuda-via-recipe

Conversation

@transfix

@transfix transfix commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

The libcvc-cuda half of #1136. The publish workflow's two CUDA jobs now build libcvc-cuda with its recipe's own script, as the CPU job builds libcvc in #1136. This branch is cut from #1136's branch and carries its commit, so squash-merging this PR lands #1136's change as well. It merged first, on Joe's call: #1136's own head was blocked by master's writable-data scan failure (#1193).

What changes

cvcpkg/recipes/libcvc-cuda/build.sh and build.ps1 now run libcvc's scripts with CVC_ENABLE_CUDA=ON instead of keeping copies of them. That was the stated design (libcvc's scripts say libcvc-cuda reuses them), but the recipe's matrix ran its own copies. Those had drifted:

  • CVC_ENABLE_GRPC=OFF
  • no WebSocket or XMLRPC
  • no CVC_BUILD_ARISRV=OFF

So cvcpkg build libcvc-cuda built a different SDK from the published one. After the build, the scripts also fail when:

  • CUDA did not enable. With no nvcc, libcvc's CMakeLists quietly builds CPU-only.
  • Device code targets a single GPU architecture.

Both checks used to be workflow steps between configure and build. They now run after the build, because the script configures, builds and installs in one go. They also cover a local cvcpkg build libcvc-cuda.

Linux CUDA job: one step runs the script in place of the inline configure, the CUDA check and the build. It is still inside the nvidia/cuda:12.9.1-devel-ubuntu22.04 container, for the glibc floor. Like the CPU job, it then:

  • greps the configure for the five feature lines (.ari loader, FTXUI, tvision, gRPC, WebSocket);
  • lists the packed bundle's files in the log.

Windows CUDA job: the same, plus what moving from the Visual Studio generator to Ninja (what build.ps1 uses) needs:

  • ninja from the catalog, alongside cmake.
  • VS 2022's developer environment, via ilammy/msvc-dev-cmd@v1 with vsversion: 2022 (as ci-recipe.yml uses it). env-windows.ps1 imports the newest Visual Studio when cl isn't on PATH. VS2026's cl ICEs on libcvc, and CUDA 12's nvcc refuses a newer host compiler. The -G "Visual Studio 17 2022" pin did this before.
  • CVC_JOBS=4 replaces CVC_MSVC_MP=4 as the memory cap on the 16 GB box it shares with the cvcpkg.org builder.
  • -T cuda=$CUDA_PATH is gone. It existed only because MSBuild compiles .cu files through CUDA's VS integration. With Ninja, CMake runs nvcc itself.

The stage is now a full install, not --component libcvc, as on the CPU job. libcvc's script turns off the CLI, ari and arisrv, so nothing extra is staged.

Verification

  • Wrapper checks, stub-tested on both platforms (bash; Windows PowerShell 5.1, since pwsh 7 isn't installed on the test machine). A good cache passes. Each of these fails with a message:

    • nvcc not found (CMAKE_CUDA_COMPILER-NOTFOUND)
    • no compiler entry
    • a single architecture (52)
    • a failing inner build
  • Tee-Object keeps the child's exit code.

  • The workflow parses as YAML. Every changed run: block passes bash -n or the PowerShell parser.

  • Dry run 43150296417 (dry_run=true, publish_cuda=true, at 259714b): both CUDA jobs passed.

    Linux (container, prettyhatemachine) Windows (sandipaws)
    Compilers nvcc 12.9.86 with GCC 11.4 nvcc 12.9.86 with MSVC 19.44 (VS 2022 Build Tools)
    CUDA architectures 50;60;70;75;80;90;100;120 50;60;70;75;80;90;100;120
    Configure checks all 5 ENABLED, plus Qhull, Clipper2, CDT, Shewchuk same
    Build job time 15 min 34 min (Ninja, CVC_JOBS=4)
    Bundle vs published 3.7.13+cvc.2 545 → 555 500 → 513

    The 13 files added are the same on both platforms: headers and Ariadne components that landed on master since v3.7.13 (relay_session.h, room_calls.h, det_math.h, param_cli/dsl/table.h, world_grid.h, shore.h, value_cbor.h, contour_tree_params.h, file_handler_registry.h, world_physics.ari, world_source.ari).

    One file is missing, on Linux only: share/licenses/libcvc-cuda/LICENSE. The branch predated ci: install cvcpkg 2.5.13, which packs licence texts #1134, so the Linux job's fetch-cvcpkg installed cvcpkg 2.5.12. That shadowed the 2.5.13 the job pip-installs, and 2.5.13 is the first version that packs licence texts. The Windows job runs the pip-installed 2.5.13, so its bundle has the licence. Master is merged in now (eefb810), so the Linux job installs 2.5.13 as well.

  • After the dry run, 32110ef makes the Windows build step put the catalog's cmake and ninja ahead of the copies in msvc-dev-cmd's PATH, and log which ones it resolved. This is a two-line pwsh change; the dry run does not cover it, but it passes the PowerShell parser. In the dry run, msvc-dev-cmd's vswhere lookup found nothing on sandipaws, so it took the 2022 Build Tools from their standard path. env-windows.ps1 looks only through vswhere, so the step is needed there, not just a pin.

Notes

  • The bundle carries a copy of its recipe under share/libcvc-deps/libcvc-cuda/recipe/. That build.sh is now a wrapper that names ../libcvc/build.sh, which the bundle does not carry. libcvc's build.ps1 already depends on ../_common the same way, and nothing rebuilds from that copy.
  • Not in this PR: libcvc-cuda's recipe.yaml dependency list has drifted from libcvc's. It lacks curl, ftxui, tvision, yaml-cpp, json-schema-validator, nlohmann-json, libopus, ncurses, pocketfft, joltphysics, openmp, qhull, cdt, clipper2 and shewchuk-predicates. The CI build still finds them, because both CUDA jobs install libcvc's closure.

The publish workflow configured libcvc with its own inline cmake line
instead of running cvcpkg/recipes/libcvc/build.sh (build.ps1 on
Windows), and the two drifted apart twice, both times into a published
bundle: +cvc.1 without CVC_USING_XMLRPC (VolumeRover 2.x broke), and
every libcvc through 3.7.5+cvc.2 without the gRPC and WebSocket
transports. The build job now runs the recipe's script, the one
cvcpkg's builders and ci-recipe.yml run, so the flags live in one place.

What the inline configure set that the scripts lacked moved into them:
- CVC_ENABLE_MESHER and CVC_ENABLE_SDF, ON (their defaults), written
  down with the rest of the SDK's feature set;
- on macOS, CMAKE_IGNORE_PREFIX_PATH for both Homebrew prefixes.
DISABLE_CGAL and CVC_BUILD_VOLROVER3 were dropped: the first is ignored
and the second no longer exists.

The workflow installed only the libcvc component; the scripts run a
full install, and `cvcpkg pack --from-prefix` takes everything staged.
With gRPC on, arisrv (default ON) would then put bin/arisrv in the SDK
bundle, the file the arisrv package installs, so the scripts now set
CVC_BUILD_ARISRV=OFF beside the CLI and ari.

build.sh also asks sysctl for the job count on macOS, which has no
nproc, instead of falling back to 4.

The checks that the .ari loader, both terminal backends and both
conference transports are configured move into the build step, after
the script: a stub still fails build-libcvc, so neither the pack nor
the family steps that build ari, arisrv and the rest against stage/ run.
The pack step now prints the bundle's file list, to compare a run's
bundle with what a tag published. The libcvc-cuda jobs keep their inline
configure for now; their comments now point at the scripts.
libcvc-cuda's build.sh and build.ps1 now run libcvc's scripts with
CVC_ENABLE_CUDA=ON instead of keeping copies of them. The copies had drifted:
gRPC off, no WebSocket or XMLRPC, and arisrv not kept out of the install.
After the build they fail when CUDA did not enable (no nvcc: libcvc's
CMakeLists quietly builds CPU-only) or compiled for a single GPU
architecture. Those were two workflow steps.

The publish workflow's CUDA jobs run those scripts in place of their inline
configure, check and build steps, as the CPU job runs libcvc's since the
previous change. Like the CPU job, they also check the configure's feature
lines and list the packed bundle's files in the log.

The Windows CUDA job moves from the Visual Studio generator to Ninja, which is
what build.ps1 uses. So it takes ninja from the catalog with cmake. A
VS 2022 developer environment (ilammy/msvc-dev-cmd, as ci-recipe.yml uses)
keeps env-windows.ps1 from importing a newer Visual Studio. CVC_JOBS=4
replaces CVC_MSVC_MP=4 as its memory cap. -T cuda=$CUDA_PATH is gone: it was
needed only because MSBuild compiles .cu files through CUDA's VS integration.
…inja first

msvc-dev-cmd exports a PATH that also carries Visual Studio's own CMake and
Ninja. The build step now prepends tools\bin itself and logs which cmake and
ninja it resolves, instead of relying on how Actions orders GITHUB_PATH
against an exported PATH.

The dry run (43150296417) showed why the msvc-dev-cmd step is needed: its
vswhere lookup found nothing on the CUDA box, and it took the 2022 Build Tools
from their standard path. env-windows.ps1 looks only through vswhere. The
comment now says so.
@transfix
transfix marked this pull request as ready for review November 12, 2026 06:26
@transfix
transfix enabled auto-merge (squash) November 12, 2026 20:21
@transfix
transfix merged commit 1e0966b into master Nov 13, 2026
34 checks passed
@transfix
transfix deleted the tfx/publish-cuda-via-recipe branch November 13, 2026 00:14
transfix added a commit that referenced this pull request Nov 13, 2026
package-linux / libcvc-release-grpc failed only in tools/singleton_scan, on
cvc::ocean::sea_surface::source's thread_local. The run tested a merge with master b745ea6,
from before #1181 (29ff406) took that thread_local out, and a rerun would test the same
merge. Master since then: #1156, #1153, #1166, #1181, #1165. No conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant