Skip to content

Commit 544f6bb

Browse files
Merge pull request #14 from intellistream/test
add CICD
2 parents 397b392 + d2f0605 commit 544f6bb

521 files changed

Lines changed: 87313 additions & 1178 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,25 @@ dist/
2121
*.egg-info/
2222
algorithms_impl/build/
2323
algorithms_impl/*/build/
24+
algorithms_impl/build-release/
25+
algorithms_impl/vsag/build/
26+
algorithms_impl/vsag/build-release/
27+
algorithms_impl/vsag/wheelhouse/
28+
algorithms_impl/vsag/.venv/
29+
algorithms_impl/PyCANDYAlgo*.so
2430

2531
# 数据文件(太大)
2632
raw_data/
2733
results/
34+
datasets/
2835
*.data
2936
*.fvecs
3037
*.ivecs
3138
*.bvecs
3239
*.hdf5
3340
*.h5
41+
*.index
42+
*.bin
3443

3544
# 日志
3645
logs/

.github/workflows/build-test.yml

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Build and Test All Modules
2+
3+
on:
4+
push:
5+
branches: [ main, main-dev, test ]
6+
pull_request:
7+
branches: [ main, main-dev, test ]
8+
workflow_dispatch: # 允许手动触发
9+
10+
jobs:
11+
build-all:
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Cache pip packages
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-torch-numpy
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Cache CMake build
34+
uses: actions/cache@v4
35+
with:
36+
path: |
37+
algorithms_impl/build
38+
algorithms_impl/vsag/build-release
39+
algorithms_impl/gti/GTI/build
40+
algorithms_impl/ipdiskann/build
41+
algorithms_impl/plsh/build
42+
key: ${{ runner.os }}-cmake-all-${{ hashFiles('algorithms_impl/CMakeLists.txt') }}
43+
restore-keys: |
44+
${{ runner.os }}-cmake-all-
45+
46+
- name: Install system dependencies
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y \
50+
build-essential \
51+
cmake \
52+
git \
53+
pkg-config \
54+
libunwind-dev \
55+
libgflags-dev \
56+
libgoogle-glog-dev \
57+
libfmt-dev \
58+
libboost-all-dev \
59+
libomp-dev \
60+
libnuma-dev \
61+
libaio-dev \
62+
libeigen3-dev \
63+
libspdlog-dev
64+
65+
- name: Install Intel MKL
66+
run: |
67+
wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add -
68+
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
69+
sudo apt-get update
70+
sudo apt-get install -y intel-oneapi-mkl-devel || echo "MKL installation warning (non-fatal)"
71+
72+
- name: Run deployment script
73+
run: |
74+
chmod +x deploy.sh
75+
./deploy.sh --skip-system-deps
76+
timeout-minutes: 60
77+
78+
- name: Verify PyCANDYAlgo import
79+
run: |
80+
source sage-db-bench/bin/activate
81+
echo "=== Test PyCANDYAlgo Import ==="
82+
python3 -c "import PyCANDYAlgo; print('PyCANDYAlgo:', PyCANDYAlgo.__version__)"
83+
84+
- name: Verify VSAG (pyvsag) import
85+
run: |
86+
source sage-db-bench/bin/activate
87+
echo "=== Test pyvsag Import ==="
88+
python3 -c "import pyvsag; print('pyvsag:', pyvsag.__version__)" || echo "pyvsag: SKIPPED (optional)"
89+
90+
- name: Verify GTI (gti_wrapper) import
91+
run: |
92+
source sage-db-bench/bin/activate
93+
echo "=== Test gti_wrapper Import ==="
94+
python3 -c "import gti_wrapper; print('gti_wrapper: OK')" || echo "gti_wrapper: SKIPPED (optional)"
95+
96+
- name: Verify IP-DiskANN (ipdiskann) import
97+
run: |
98+
source sage-db-bench/bin/activate
99+
echo "=== Test ipdiskann Import ==="
100+
python3 -c "import ipdiskann; print('ipdiskann: OK')" || echo "ipdiskann: SKIPPED (optional)"
101+
102+
- name: Verify PLSH (plsh_python) import
103+
run: |
104+
source sage-db-bench/bin/activate
105+
echo "=== Test plsh_python Import ==="
106+
python3 -c "import plsh_python; print('plsh_python: OK')" || echo "plsh_python: SKIPPED (optional)"
107+
108+
- name: Test core dependencies
109+
run: |
110+
source sage-db-bench/bin/activate
111+
python3 -c "import numpy; import torch; print('numpy:', numpy.__version__); print('torch:', torch.__version__)"
112+
113+
- name: Upload build logs on failure
114+
if: failure()
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: build-logs
118+
path: |
119+
algorithms_impl/build/cmake_config.log
120+
algorithms_impl/build/CMakeFiles/CMakeError.log
121+
algorithms_impl/build/CMakeFiles/CMakeOutput.log
122+
algorithms_impl/vsag/build-release/CMakeFiles/CMakeError.log
123+
algorithms_impl/gti/GTI/build/CMakeFiles/CMakeError.log
124+
algorithms_impl/ipdiskann/build/CMakeFiles/CMakeError.log
125+
algorithms_impl/plsh/build/CMakeFiles/CMakeError.log
126+
retention-days: 7
127+
128+
lint:
129+
runs-on: ubuntu-22.04
130+
131+
steps:
132+
- name: Checkout code
133+
uses: actions/checkout@v4
134+
135+
- name: Set up Python 3.10
136+
uses: actions/setup-python@v5
137+
with:
138+
python-version: '3.10'
139+
140+
- name: Install linting tools
141+
run: pip install flake8
142+
143+
- name: Run flake8 (syntax errors only)
144+
run: |
145+
flake8 bench/ datasets/ --count --select=E9,F63,F7,F82 --show-source --statistics || true

.github/workflows/ci.yml

Lines changed: 0 additions & 97 deletions
This file was deleted.

.github/workflows/cmake.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.gitignore

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,41 @@ commit_info
4949
commit.sh
5050
data/
5151
raw_data/
52-
DiskANN/
52+
/DiskANN/
53+
!algorithms_impl/DiskANN/
5354
results/
54-
algorithms_impl/build
55+
algorithms_impl/build
56+
57+
# Python 虚拟环境
58+
.venv/
59+
sage-db-bench/
60+
venv/
61+
env/
62+
ENV/
63+
64+
# Python 缓存和构建产物
65+
*.pyc
66+
*.pyo
67+
*.egg-info/
68+
__pycache__/
69+
.pytest_cache/
70+
71+
# 算法构建产物
72+
algorithms_impl/build/
73+
algorithms_impl/build-release/
74+
algorithms_impl/vsag/build/
75+
algorithms_impl/vsag/build-release/
76+
algorithms_impl/vsag/wheelhouse/
77+
algorithms_impl/vsag/.venv/
78+
algorithms_impl/gti/GTI/build/
79+
algorithms_impl/ipdiskann/build/
80+
algorithms_impl/plsh/build/
81+
algorithms_impl/*.so
82+
algorithms_impl/*.log
83+
84+
# 测试和日志
85+
*.log
86+
test_report_*.txt
87+
.coverage
88+
htmlcov/SAGE-DB-Bench/
89+
temp/

0 commit comments

Comments
 (0)