Skip to content

Commit 5358b4f

Browse files
committed
Add public only build+test to pipeline
1 parent 1c8fa51 commit 5358b4f

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

.github/workflows/build-cpp-runtime-bindings.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ concurrency:
3737
jobs:
3838
build-cpp-runtime-bindings:
3939
runs-on: ubuntu-22.04
40+
strategy:
41+
matrix:
42+
include:
43+
- name: "with static library"
44+
enable_lvq_leanvec: "ON"
45+
suffix: ""
46+
- name: "public only"
47+
enable_lvq_leanvec: "OFF"
48+
suffix: "-public-only"
4049

4150
steps:
4251
- uses: actions/checkout@v5
@@ -50,19 +59,28 @@ jobs:
5059
docker run --rm \
5160
-v ${{ github.workspace }}:/workspace \
5261
-w /workspace \
62+
-e ENABLE_LVQ_LEANVEC=${{ matrix.enable_lvq_leanvec }} \
63+
-e SUFFIX=${{ matrix.suffix }} \
5364
svs-manylinux228:latest \
5465
/bin/bash -c "chmod +x docker/x86_64/build-cpp-runtime-bindings.sh && ./docker/x86_64/build-cpp-runtime-bindings.sh"
5566
5667
- name: Upload cpp runtime bindings artifacts
5768
uses: actions/upload-artifact@v4
5869
with:
59-
name: svs-cpp-runtime-bindings
60-
path: svs-cpp-runtime-bindings.tar.gz
70+
name: svs-cpp-runtime-bindings${{ matrix.suffix }}
71+
path: svs-cpp-runtime-bindings${{ matrix.suffix }}.tar.gz
6172
retention-days: 7 # Reduce retention due to size
6273

6374
test:
6475
needs: build-cpp-runtime-bindings
6576
runs-on: ubuntu-22.04
77+
strategy:
78+
matrix:
79+
include:
80+
- name: "with static library"
81+
suffix: ""
82+
- name: "public only"
83+
suffix: "-public-only"
6684

6785
steps:
6886
- uses: actions/checkout@v5
@@ -75,7 +93,7 @@ jobs:
7593
- name: Download shared libraries
7694
uses: actions/download-artifact@v4
7795
with:
78-
name: svs-cpp-runtime-bindings
96+
name: svs-cpp-runtime-bindings${{ matrix.suffix }}
7997
path: runtime_lib
8098

8199
- name: List available artifacts
@@ -88,5 +106,6 @@ jobs:
88106
-v ${{ github.workspace }}:/workspace \
89107
-v ${{ github.workspace }}/runtime_lib:/runtime_lib \
90108
-w /workspace \
109+
-e SUFFIX=${{ matrix.suffix }} \
91110
svs-manylinux228:latest \
92111
/bin/bash -c "chmod +x docker/x86_64/test-cpp-runtime-bindings.sh && ./docker/x86_64/test-cpp-runtime-bindings.sh"

docker/x86_64/build-cpp-runtime-bindings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ mkdir -p /workspace/bindings/cpp/build_cpp_bindings /workspace/install_cpp_bindi
2424

2525
# Build and install runtime bindings library
2626
cd /workspace/bindings/cpp/build_cpp_bindings
27-
CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=/workspace/install_cpp_bindings -DCMAKE_INSTALL_LIBDIR=lib
27+
CC=gcc CXX=g++ cmake .. -DCMAKE_INSTALL_PREFIX=/workspace/install_cpp_bindings -DCMAKE_INSTALL_LIBDIR=lib -DSVS_RUNTIME_ENABLE_LVQ_LEANVEC=${ENABLE_LVQ_LEANVEC:-ON}
2828
cmake --build . -j
2929
cmake --install .
3030

3131
# Create tarball with symlink for compatibility
3232
cd /workspace/install_cpp_bindings && \
3333
ln -s lib lib64 && \
34-
tar -czvf /workspace/svs-cpp-runtime-bindings.tar.gz .
34+
tar -czvf /workspace/svs-cpp-runtime-bindings${SUFFIX}.tar.gz .

docker/x86_64/test-cpp-runtime-bindings.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ conda install -y mkl=2022.2.1 mkl-devel=2022.2.1
3434
# TODO: point to root repo eventually
3535
git clone -b svs-io https://github.com/ahuber21/faiss.git
3636
cd faiss
37-
sed -i "s|set(SVS_URL .*|set(SVS_URL \"file:///runtime_lib/svs-cpp-runtime-bindings${PLATFORM_NAME}.tar.gz\" CACHE STRING \"SVS URL\")|" faiss/CMakeLists.txt
37+
sed -i "s|set(SVS_URL .*|set(SVS_URL \"file:///runtime_lib/svs-cpp-runtime-bindings${SUFFIX}.tar.gz\" CACHE STRING \"SVS URL\")|" faiss/CMakeLists.txt
3838

3939
echo "================================================"
4040
echo " Runnning validation of library against FAISS CI"

0 commit comments

Comments
 (0)