From 54349d85d794b876037f365b546e2f1f7b09e717 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 28 Jul 2026 15:39:14 +0000 Subject: [PATCH] Compile the C ABI in CI, and export the tap::samplerate alias This repo ships a C ABI under tools/capi that the notebooks drive via ctypes, but SRT_BUILD_CAPI defaults to OFF and CI never turned it on -- so nothing in the pipeline compiled it, and a kernel signature change could break the ABI with CI staying green. AmbiTap and DspTap already build theirs; this brings SampleRateTap in line. Enabled on the Linux and macOS legs only. tools/capi carries no __declspec(dllexport) (unlike DspTap's), so an MSVC build would link a DLL that exports nothing -- it would pass without gating anything. Recorded in the matrix comment and in taphouse's known-divergences list, to be flipped on in the same change that gives the C ABI an export decoration. Also exports `tap::samplerate`, the alias taphouse's namespace convention has documented all along but that this repo never created. `SampleRateTap::SampleRateTap` stays, so existing consumers are unaffected. Note this repo is the family's odd one out twice over on header paths: include/srt/ is an abbreviation matching neither the repo name nor the tap::samplerate namespace. Renaming it breaks every consumer #include, so it stays a migrate-when-touched item (tracked in taphouse's README). Verified locally: configure and build succeed with SRT_WERROR=ON, the shared library links and exports its 8 entry points, and the full suite passes 73/73. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01JhhQ93r2E1QTnCx46YfX8j --- .github/workflows/ci.yml | 11 ++++++++++- CMakeLists.txt | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4dce5b..0427601 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,19 +24,27 @@ jobs: cc: gcc cxx: g++ werror: ON + capi: ON - name: Linux Clang os: ubuntu-latest cc: clang cxx: clang++ werror: ON + capi: ON - name: macOS AppleClang os: macos-latest werror: ON + capi: ON # Warnings stay non-fatal on MSVC until /W4 output has been - # triaged (docs/PERFORMANCE.md "Known debt"). + # triaged (docs/PERFORMANCE.md "Known debt"). capi stays OFF here too: + # tools/capi carries no __declspec(dllexport) (unlike DspTap's), so an + # MSVC build would link a DLL exporting nothing — it would pass without + # gating anything. Turn it ON in the same change that gives the C ABI + # an export decoration. - name: Windows MSVC os: windows-latest werror: OFF + capi: OFF steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: @@ -50,6 +58,7 @@ jobs: cmake -B build -DCMAKE_BUILD_TYPE=Release -DSRT_WERROR=${{ matrix.werror }} + -DSRT_BUILD_CAPI=${{ matrix.capi }} - name: Build run: cmake --build build --config Release -j 4 diff --git a/CMakeLists.txt b/CMakeLists.txt index ae3bdac..1c1995f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,11 @@ add_subdirectory(submodules/dsptap) add_library(SampleRateTap INTERFACE) add_library(SampleRateTap::SampleRateTap ALIAS SampleRateTap) +# The family-wide alias, per the namespace convention in taphouse's README: one +# `tap::` sub-namespace per repo, and the CMake alias matches it. The +# older spelling above stays so existing consumers keep working; prefer +# `tap::samplerate` in new code. +add_library(tap::samplerate ALIAS SampleRateTap) target_include_directories(SampleRateTap INTERFACE $ $)