Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/build-c-api-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
name: Build and test C API bindings

on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'bindings/cpp/**'
- 'bindings/python/**'
- '**.md'
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-cpp-runtime-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
name: Build and test C++ Runtime Bindings

on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'bindings/c/**'
- 'bindings/python/**'
- '**.md'
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/build-linux-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@

name: Linux Build and Test on ARM

# Builds only in the merge queue; on pull requests every job is skipped so the required check is satisfied.
on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'bindings/**'
- '**.md'
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand All @@ -35,6 +32,7 @@ concurrency:
jobs:
build:
name: ${{ matrix.cxx }}, ${{ matrix.build_type }}
if: github.event_name != 'pull_request'
runs-on: ubuntu-22.04-arm
strategy:
matrix:
Expand Down Expand Up @@ -74,3 +72,15 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{ runner.temp }}/build/tests
run: ctest -C ${{ matrix.build_type }}

linux-arm-passed:
# Skipped (shown grey) when nothing ran, so the PR page doesn't show a green check for unbuilt work.
name: linux-arm-passed
if: always() && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-22.04
steps:
- name: Require the build to have run and succeeded
run: |
echo "build=${{ needs.build.result }}"
[[ "${{ needs.build.result }}" == success ]]
69 changes: 47 additions & 22 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,9 @@
name: Linux Build and Test

on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'bindings/**'
- '**.md'
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand All @@ -33,26 +29,43 @@ concurrency:
cancel-in-progress: true

jobs:
# Skip the builds on pull requests that only touch paths this workflow ignores.
changes:
name: Detect changes
runs-on: ubuntu-22.04
permissions:
pull-requests: read
outputs:
relevant: ${{ github.event_name != 'pull_request' || steps.filter.outputs.relevant == 'true' }}
steps:
- id: filter
if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ github.token }}
run: |
files=$(gh api --paginate "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files" --jq '.[].filename')
# relevant if any changed file is outside the ignored paths
if grep -qvE '^bindings/|\.md$' <<< "$files"; then echo relevant=true; else echo relevant=false; fi >> "$GITHUB_OUTPUT"

build:
name: ${{ matrix.cxx }}, ${{ matrix.build_type }}, ivf=${{ matrix.ivf }}, asan=${{ matrix.asan }}
name: ${{ matrix.toolchain.cxx }}, ${{ matrix.build_type }}, ivf=${{ matrix.ivf }}, asan=${{ matrix.asan }}
needs: changes
if: needs.changes.outputs.relevant == 'true'
runs-on: ubuntu-22.04
strategy:
matrix:
build_type: [RelWithDebInfo]
ivf: [OFF, ON]
cxx: [g++-11, g++-12, clang++-15]
# cc rides with cxx in one object so the pull request exclusions below can't strand an include.
toolchain:
- {cxx: g++-11, cc: gcc-11}
- {cxx: g++-12, cc: gcc-12}
- {cxx: clang++-15, cc: clang-15}
asan: [OFF]
cmake_extra_args: [-DSVS_BUILD_BINARIES=YES -DSVS_BUILD_EXAMPLES=YES]
ctest_args: ['']
include:
- cxx: g++-11
cc: gcc-11
- cxx: g++-12
cc: gcc-12
- cxx: clang++-15
cc: clang-15
- cxx: clang++-18
cc: clang-18
- toolchain: {cxx: clang++-18, cc: clang-18}
build_type: Debug
ivf: OFF
asan: ON
Expand All @@ -66,9 +79,8 @@ jobs:
-DSVS_BUILD_EXAMPLES=NO
# skip longer-running tests
ctest_args: -LE long
exclude:
- cxx: g++-12
ivf: ON
# Pull requests run g++-11 ivf=ON and ASan; the merge queue runs the full matrix.
exclude: ${{ fromJSON(github.event_name == 'pull_request' && '[{"toolchain":{"cxx":"g++-12","cc":"gcc-12"}},{"toolchain":{"cxx":"clang++-15","cc":"clang-15"}},{"toolchain":{"cxx":"g++-11","cc":"gcc-11"},"ivf":"OFF"}]' || '[{"toolchain":{"cxx":"g++-12","cc":"gcc-12"},"ivf":"ON"}]') }}

steps:
- uses: actions/checkout@v6
Expand All @@ -83,7 +95,7 @@ jobs:
printenv >> $GITHUB_ENV

- name: Install Clang 18
if: matrix.cxx == 'clang++-18'
if: matrix.toolchain.cxx == 'clang++-18'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
Expand All @@ -92,8 +104,8 @@ jobs:
- name: Configure build
working-directory: ${{ runner.temp }}
env:
CXX: ${{ matrix.cxx }}
CC: ${{ matrix.cc }}
CXX: ${{ matrix.toolchain.cxx }}
CC: ${{ matrix.toolchain.cc }}
TEMP_WORKSPACE: ${{ runner.temp }}
run: |
cmake -B${TEMP_WORKSPACE}/build -S${GITHUB_WORKSPACE} \
Expand All @@ -119,3 +131,16 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{ runner.temp }}/build/examples/cpp
run: ctest -C ${{ matrix.build_type }}

# Fixed-name required check; matrix job names can't be required because they change with the matrix.
linux-passed:
# Skipped (shown grey) when nothing ran; still runs if change detection itself failed.
name: linux-passed
if: always() && (needs.changes.result != 'success' || needs.changes.outputs.relevant == 'true')
needs: [changes, build]
runs-on: ubuntu-22.04
steps:
- name: Require every job to have run and succeeded
run: |
echo "changes=${{ needs.changes.result }} build=${{ needs.build.result }}"
[[ "${{ needs.changes.result }}" == success && "${{ needs.build.result }}" == success ]]
22 changes: 16 additions & 6 deletions .github/workflows/build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@

name: MacOS Build and Test

# Builds only in the merge queue; on pull requests every job is skipped so the required check is satisfied.
on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'bindings/**'
- '**.md'
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand All @@ -35,6 +32,7 @@ concurrency:
jobs:
build:
name: ${{ matrix.cxx }}, ${{ matrix.build_type }}
if: github.event_name != 'pull_request'
runs-on: macos-latest
strategy:
matrix:
Expand Down Expand Up @@ -87,3 +85,15 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{ runner.temp }}/build/tests
run: ctest -C ${{ matrix.build_type }}

macos-passed:
# Skipped (shown grey) when nothing ran, so the PR page doesn't show a green check for unbuilt work.
name: macos-passed
if: always() && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-22.04
steps:
- name: Require the build to have run and succeeded
run: |
echo "build=${{ needs.build.result }}"
[[ "${{ needs.build.result }}" == success ]]
5 changes: 2 additions & 3 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
name: CIBuildWheel

on:
push:
branches:
- main
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ name: pre-commit

on:
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:

jobs:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/skywalking-eyes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ on:
pull_request:
branches:
- main
push:
branches:
- main
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions: read-all
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

# Scalable Vector Search

[![Linux Build and Test](https://github.com/intel/ScalableVectorSearch/actions/workflows/build-linux.yml/badge.svg?event=push)](https://github.com/intel/ScalableVectorSearch/actions/workflows/build-linux.yml)
[![CIBuildWheel](https://github.com/intel/ScalableVectorSearch/actions/workflows/cibuildwheel.yml/badge.svg?event=push)](https://github.com/intel/ScalableVectorSearch/actions/workflows/cibuildwheel.yml)
[![Linux Build and Test](https://github.com/intel/ScalableVectorSearch/actions/workflows/build-linux.yml/badge.svg?event=merge_group)](https://github.com/intel/ScalableVectorSearch/actions/workflows/build-linux.yml)
[![CIBuildWheel](https://github.com/intel/ScalableVectorSearch/actions/workflows/cibuildwheel.yml/badge.svg?event=merge_group)](https://github.com/intel/ScalableVectorSearch/actions/workflows/cibuildwheel.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-silver.svg)](https://github.com/intel/ScalableVectorSearch/blob/main/LICENSE)

**Scalable Vector Search (SVS)** is a performance library for vector [similarity search](https://en.wikipedia.org/wiki/Similarity_search).
Expand Down
Loading