Skip to content

configure C API CI aligned with runtime bindings - #360

Draft
ethanglaser wants to merge 1 commit into
rfsaliev/c-api-cifrom
dev/eglaser/c-api-ci
Draft

configure C API CI aligned with runtime bindings#360
ethanglaser wants to merge 1 commit into
rfsaliev/c-api-cifrom
dev/eglaser/c-api-ci

Conversation

@ethanglaser

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the C API build/packaging and CI to more closely mirror the runtime bindings setup, with explicit LVQ/LeanVec expectations and an integration-style consumer build to validate the exported CMake package and symbol surface.

Changes:

  • Add SVS_REQUIRE_LTO_ARCHIVE and switch LVQ/LeanVec prebuilt downloads to the v0.4.0 release artifacts, with a CMake-version guard for DOWNLOAD_EXTRACT_TIMESTAMP.
  • Tighten the exported C API target so pure-C consumers don’t inherit OpenMP::OpenMP_CXX or a cxx_std_20 requirement.
  • Add C API consumer/integration tests and update the GitHub Actions workflow to build/test/package in the manylinux container, plus stricter LVQ/LeanVec test expectations.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
bindings/cpp/CMakeLists.txt Adds LTO-archive requirement toggle and uses release tarballs with CMake-version-safe FetchContent args.
bindings/c/CMakeLists.txt Prevents leaking C++/OpenMP requirements to consumers; aligns LVQ/LeanVec prebuilt handling with runtime bindings.
bindings/c/tests/consumer/main.c New C-only consumer smoke test for the installed C API package.
bindings/c/tests/consumer/CMakeLists.txt Standalone consumer project using find_package(svs_c_api) and linking svs::svs_c_api.
bindings/c/tests/CMakeLists.txt Adds compile-time expectation flag for LVQ/LeanVec tests based on build config.
bindings/c/tests/c_api_test_utils.h Makes compressed-storage assertions configuration-aware; adds storage_usable().
bindings/c/tests/c_api_storage.cpp Requires SQ storage to always succeed (public build invariant).
bindings/c/tests/c_api_index.cpp Skips build/search for compressed storage when unusable; requires SQ always works.
bindings/c/samples/simple.c Falls back to simple storage when LeanVec/LVQ are unavailable.
bindings/c/samples/save_load.c Same fallback behavior for save/load sample.
bindings/c/samples/dynamic.c Same fallback behavior for dynamic sample.
.github/workflows/build-cpp-runtime-bindings.yml Passes REQUIRE_LTO_ARCHIVE into the runtime bindings container build.
.github/workflows/build-c-api-bindings.yml Reworks C API CI to container build + artifact packaging + integration tests.
.github/scripts/test-c-api-unit.sh Runs unit tests and executes samples in the container.
.github/scripts/test-c-api-bindings.sh Integration test: validates package contents, exported symbols, and consumer build/run.
.github/scripts/build-cpp-runtime-bindings.sh Propagates SVS_REQUIRE_LTO_ARCHIVE into the CMake configure.
.github/scripts/build-c-api-bindings.sh New script to configure/build/install/package C API bindings with LVQ/LeanVec toggles.

Comment on lines +71 to +92
svs_error_free(error);
error = svs_error_create();
report("sq/int8", svs_storage_create_sq(SVS_DATA_TYPE_INT8, error), error);

svs_error_free(error);
error = svs_error_create();
report(
"lvq/int8",
svs_storage_create_lvq(SVS_DATA_TYPE_INT8, SVS_DATA_TYPE_VOID, error),
error
);

svs_error_free(error);
error = svs_error_create();
report(
"leanvec/int8",
svs_storage_create_leanvec(64, SVS_DATA_TYPE_INT8, SVS_DATA_TYPE_INT8, error),
error
);

svs_error_free(error);
return EXIT_SUCCESS;
Comment on lines +136 to +138
svs_error_free(error);
error = svs_error_create();
storage = svs_storage_create_simple(SVS_DATA_TYPE_FLOAT32, error);
Comment on lines +146 to +148
svs_error_free(error);
error = svs_error_create();
storage = svs_storage_create_simple(SVS_DATA_TYPE_FLOAT32, error);
Comment on lines +146 to +148
svs_error_free(error);
error = svs_error_create();
storage = svs_storage_create_simple(SVS_DATA_TYPE_FLOAT32, error);
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.

2 participants