configure C API CI aligned with runtime bindings - #360
Draft
ethanglaser wants to merge 1 commit into
Draft
Conversation
Contributor
There was a problem hiding this comment.
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_ARCHIVEand switch LVQ/LeanVec prebuilt downloads to thev0.4.0release artifacts, with a CMake-version guard forDOWNLOAD_EXTRACT_TIMESTAMP. - Tighten the exported C API target so pure-C consumers don’t inherit
OpenMP::OpenMP_CXXor acxx_std_20requirement. - 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); |
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.
No description provided.