This directory contains GitHub Actions workflows for automated testing of the SAGE DB component.
- Triggers: Pull requests and pushes to
mainandmain-devbranches - Platforms: Ubuntu Latest
- Build Types: Release and Debug
- Features:
- Full build with FAISS support
- Comprehensive test suite including multimodal tests
- Artifact upload for debugging failures
- Conda-based dependency management
- Triggers: Pull requests affecting source code files
- Platforms: Ubuntu Latest (Release only)
- Features:
- Faster execution with cached dependencies
- Essential tests only
- Library dependency verification
- Optimized for quick feedback
The workflows automatically install:
- FAISS CPU version (via conda)
- OpenBLAS (via conda)
- CMake and build tools
- GCC/G++ compilers
Both workflows run:
-
test_sage_db- Core functionality tests including:- Basic vector operations
- Metadata operations
- Batch operations
- Filtered search
- Persistence (save/load)
- Performance benchmarks
-
test_multimodal- Multimodal fusion tests (when enabled)
To run tests locally similar to CI:
# Install dependencies via conda
conda install -y faiss-cpu openblas cmake make gcc_linux-64 gxx_linux-64
# Configure and build
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=ON \
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \
-DFAISS_ROOT="$CONDA_PREFIX"
cmake --build build --parallel
# Run tests
cd build
LD_LIBRARY_PATH=$PWD:$CONDA_PREFIX/lib ctest --output-on-failureIf tests fail:
- Check the uploaded artifacts for detailed logs
- Verify library dependencies with
ldd - Ensure FAISS is properly linked
- Check for any runtime library path issues
When adding new tests:
- Add them to the appropriate
tests/directory - Update
CMakeLists.txtto include the new test - Ensure tests can run in the CI environment
- Test both Release and Debug builds locally before submitting