ci(release): pre-built binaries for linux, macos and windows - #5
Open
quartzjer wants to merge 1 commit into
Open
ci(release): pre-built binaries for linux, macos and windows#5quartzjer wants to merge 1 commit into
quartzjer wants to merge 1 commit into
Conversation
rf-detr.cpp has no releases, so every consumer builds from source or carries its own binaries. Add the same tag-triggered release workflow the other ggml engines in this family use (ced.cpp, voice-detect.cpp, face-detect.cpp), so a v* tag produces grab-and-run bundles. One self-contained rfdetr-cli per (platform, backend) pair, packaged with LICENSE and README, plus a separate librfdetr + rfdetr_capi.h bundle for the dlopen/FFI consumers the C-API exists for. BUILD_SHARED_LIBS=OFF folds the ggml backends into the binary; GGML_NATIVE=OFF keeps them portable across CPUs, matching ci.yml. Variants: linux x64 cpu/vulkan/cuda and arm64 cpu, macos arm64 metal and x64 cpu, windows x64 cpu/vulkan/cuda. The CUDA bundles carry the cudart/cublas runtime next to the binary with an $ORIGIN rpath. Windows applies the ggml patches explicitly before configure, since the CMake configure-time hook needs bash on PATH. A v* tag creates a draft release if one does not exist yet, so tagging before or after creating the release both work.
|
@mudler The workflow is technically coherent and the contributor validated all nine matrix jobs plus the 18 release assets, but I recommend merging #4 first because every Windows lane depends on it. The maintenance decision is cost: the two CUDA lanes account for roughly 331 of ~350 job-minutes and produce 537 MB Linux bundles. If that release cost is acceptable, this is ready after #4; otherwise trim CUDA before the first tag. |
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.
What
Adds a tag-triggered
release.yml, so pushing av*tag builds every variant and attaches the bundles to that release.It's the same workflow
ced.cpp,voice-detect.cppandface-detect.cppalready use, adapted to this project.face-detect.cppis the closest match, since it's the other one that applies in-tree ggml patches and so needs the explicit patch step on windows.Per
(platform, backend)pair it builds twice and produces two bundles:rfdetr-<ver>-bin-<platform>-<backend>-<arch>— a self-containedrfdetr-cliwithLICENSEandREADME.md.BUILD_SHARED_LIBS=OFFfolds the ggml backends into the binary, andGGML_NATIVE=OFFkeeps it portable across CPUs. That last one is deliberately unlikeci.yml, which setsGGML_NATIVE=ONbecause it only has to run on its own runner.rfdetr-<ver>-lib-<platform>-<backend>-<arch>— the shared library (rfdetr.dllon windows) plusrfdetr_capi.h, for the dlopen/FFI consumers. The windows tokens arewin, notwindows:rfdetr-v0.1.0-solpbc.5-bin-win-cuda-x64.zip.Variants: linux x64 cpu/vulkan/cuda and arm64 cpu, macos arm64 metal and x64 cpu, windows x64 cpu/vulkan/cuda. The linux CUDA bundles carry
libcudart/libcublas/libcublasLtnext to the binary with an$ORIGINrpath; the windows CUDA bundles expect a CUDA install, matching the sibling engines. Every job that can run its own binary does a usage-banner smoke test before packaging. macos x64 is cross-compiled on the arm64 runner, so it's build-only. Av*tag creates a draft release if one doesn't exist yet, so tagging before or after creating the release both work.Why
There are no releases today, so anyone integrating rf-detr.cpp either builds from source or carries their own binaries. We're in the second group, running a self-built
rfdetr-clifrom a fork since May. Our C-API consumers want a bundle, not a toolchain.Nothing here changes how LocalAI consumes this repo; that stays a source build at a commit pin.
Notes
v*tag or a manualworkflow_dispatch, so merging this first turns nothing red immediately. It breaks the first tagged release instead: thereleasejob is gated both ongithub.ref_type == 'tag'and on every build job, so a red windows job means the tag ships no assets at all.binand alibbundle per job: https://github.com/solpbc/rf-detr.cpp/releases/tag/v0.1.0-solpbc.5tests/fixtures/ci/expected_nano-f16.jsonviatests/ci/compare_detections.py. On the macos run the log shows[INFO] GPU backend: Metalwith no fallback warning, so Metal initialized rather than falling back to CPU-only.build-windows (cuda)took 191 minutes andbuild-linux (cuda)140 minutes, so the two of them are about 331 of the run's ~350 job-minutes. Both compile CUDA twice, once for the binary and once for the shared lib. The longest of the rest isbuild-windows (vulkan)at 8m35s. The linux CUDA bundles also land at 537 MB each, bin and lib alike.face-detect.cppdeliberately rather than tuning it. Two places differ because this project differs: the binary is atbuild/bin/rfdetr-cliand the library atbuild-shared/lib/, orbuild-shared/bin/for the dll on windows (this repo setsCMAKE_RUNTIME_OUTPUT_DIRECTORY/CMAKE_LIBRARY_OUTPUT_DIRECTORY, face-detect doesn't), and the shared-lib flag isRFDETR_SHARED.