Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Fix HNSW range search result wrong #2496

Fix HNSW range search result wrong

Fix HNSW range search result wrong #2496

Workflow file for this run

name: Unit Test
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- main
pull_request:
# File paths to consider in the event. Optional; defaults to all.
paths:
- "include/**"
- "python/**"
- "src/**"
- "thirdparty/**"
- "benchmark/**"
- "cmake/**"
- ".github/workflows/ut.yaml"
- "CMakeLists.txt"
- "!**.md"
- "tests/**"
jobs:
ut:
name: ut on ubuntu-20.04
runs-on: ubuntu-20.04
timeout-minutes: 60
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Dependency
run: |
sudo apt update \
&& sudo apt install -y cmake g++ gcc libopenblas-dev libcurl4-openssl-dev libaio-dev libdouble-conversion-dev libevent-dev python3 python3-pip lcov \
&& pip3 install conan==1.58.0
- name: Build & Run
run: |
mkdir build && cd build \
&& conan install .. --build=missing -s build_type=Release -o with_ut=True -o with_diskann=True -o with_asan=True -o with_coverage=True \
&& conan build .. \
&& cd .. \
&& ./scripts/run_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v3
with:
name: codecov-result
path: |
./lcov_output.info
*.info
*.out
codecov:
name: Upload Code Coverage
needs: [ut]
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Download code coverage results
uses: actions/[email protected]
with:
name: codecov-result
- name: Display structure of code coverage results
run: |
ls -lah
- name: Upload coverage to Codecov
if: "github.repository == 'milvus-io/knowhere'"
uses: codecov/[email protected]
id: upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov_output.info
name: ubuntu-20.04-unittests
fail_ci_if_error: true
- name: Retry Upload coverage to Codecov
if: "${{ failure() }} && github.repository == 'milvus-io/knowhere'"
uses: codecov/[email protected]
id: retry_upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov_output.info
name: ubuntu-${{ matrix.ubuntu }}-unittests
fail_ci_if_error: true
swig-build:
name: python3 wheel
runs-on: ubuntu-20.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Dependency
run: |
sudo apt update \
&& sudo apt install -y cmake g++ gcc libopenblas-dev libaio-dev libcurl4-openssl-dev libdouble-conversion-dev libevent-dev libgflags-dev python3 python3-pip python3-setuptools \
&& pip3 install conan==1.58.0 pytest faiss-cpu numpy wheel
- name: Build
run: |
mkdir build \
&& cd build \
&& conan install .. --build=missing -o with_diskann=True -s compiler.libcxx=libstdc++11 -s build_type=Release \
&& conan build ..
- name: Swig Build
run: |
cd python && python3 setup.py bdist_wheel
- name: Install pips
run: |
cd python && pip3 install dist/*.whl
- name: Test
run: |
pytest tests/python/test_index_with_random.py