Skip to content

Commit ffa6bdc

Browse files
committed
ci: switch fast-path jobs to system OpenBLAS and split-image tags
Repoint every x86 CI job at the appropriate variant tag introduced in the previous PR and turn on `-DUSE_SYSTEM_OPENBLAS=ON` for the OpenBLAS-backed jobs so they reuse the `libopenblas-dev` package shipped in `vsaglib/vsag:ci-x86-openblas` instead of rebuilding OpenBLAS from source on every run. Image routing: * `pr-ci.yml`, `coverage.yml`, `lint.yml`, `check_compatibility.yml`, `performance.yml`, `generate_old_version_index.yml` → `vsaglib/vsag:ci-x86-openblas`. * `asan_build_and_test.yml`, `tsan_build_and_test.yml`, `asan_with_simd_option.yml`, and the SIMD / TSAN matrices in `daily_test.yml` → `vsaglib/vsag:ci-x86-mkl` (these jobs already build with `VSAG_ENABLE_INTEL_MKL=ON`). * Daily x86 ASan in `daily_test.yml` uses the `-openblas` image but intentionally does NOT set `USE_SYSTEM_OPENBLAS`, so it keeps exercising `ExternalProject_Add(openblas)` end-to-end — that is now the dedicated guard for the from-source build path. `USE_SYSTEM_OPENBLAS=ON` is forwarded via `EXTRA_DEFINED` (existing Makefile plumbing) rather than introducing a new `make` flag, so this change does not touch `Makefile` and does not collide with the in-flight `VSAG_USE_SYSTEM_OPENBLAS` CMake option being added in #2117. CircleCI's `prepare_env_and_create_swap_file` step now also installs `liblapacke-dev` so CMake's `find_path(LAPACKE_INCLUDE NAMES lapacke.h)` probe succeeds against the system OpenBLAS. Release artifacts (`scripts/release/dist.sh`, `docker/Dockerfile.dist_*x86`) and `make pyvsag` are intentionally not changed: they continue to build OpenBLAS from source and statically link it. Refs: #2118 Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com> Assisted-by: OpenCode:claude-opus-4.7
1 parent 49f6e9c commit ffa6bdc

11 files changed

Lines changed: 57 additions & 34 deletions

.circleci/continue_config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ jobs:
4646
command: |
4747
sudo apt update
4848
sudo apt install -y gfortran python3-dev libomp-15-dev gcc make cmake g++ lcov libaio-dev libcurl4-openssl-dev ninja-build
49-
sudo apt-get install -y libopenblas-dev
49+
sudo apt-get install -y libopenblas-dev liblapacke-dev
5050
sudo dd if=/dev/zero of=.swapfile bs=2M count=2048
5151
sudo chmod 600 .swapfile
5252
sudo mkswap .swapfile
5353
sudo swapon .swapfile
5454
- run:
55-
command: export CMAKE_GENERATOR="Ninja" && export VSAG_ENABLE_INTEL_MKL=OFF && export COMPILE_JOBS=4 && make test_parallel
55+
command: export CMAKE_GENERATOR="Ninja" && export VSAG_ENABLE_INTEL_MKL=OFF && export EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON" && export COMPILE_JOBS=4 && make test_parallel
5656
no_output_timeout: 50m
5757
- run:
5858
name: remove_swap_file
@@ -78,13 +78,13 @@ jobs:
7878
command: |
7979
sudo apt update
8080
sudo apt install -y gfortran python3-dev libomp-15-dev gcc make cmake g++ lcov libaio-dev libcurl4-openssl-dev ninja-build
81-
sudo apt-get install -y libopenblas-dev
81+
sudo apt-get install -y libopenblas-dev liblapacke-dev
8282
sudo dd if=/dev/zero of=.swapfile bs=2M count=2048
8383
sudo chmod 600 .swapfile
8484
sudo mkswap .swapfile
8585
sudo swapon .swapfile
8686
- run:
87-
command: export CMAKE_GENERATOR="Ninja" && export VSAG_ENABLE_INTEL_MKL=OFF && export COMPILE_JOBS=4 && make test_parallel
87+
command: export CMAKE_GENERATOR="Ninja" && export VSAG_ENABLE_INTEL_MKL=OFF && export EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON" && export COMPILE_JOBS=4 && make test_parallel
8888
no_output_timeout: 50m
8989
- run:
9090
name: remove_swap_file

.github/workflows/asan_build_and_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Asan Build X86
1212
runs-on: ubuntu-22.04
1313
container:
14-
image: vsaglib/vsag:ci-x86
14+
image: vsaglib/vsag:ci-x86-mkl
1515
volumes:
1616
- /opt:/useless
1717
concurrency:
@@ -88,7 +88,7 @@ jobs:
8888
matrix:
8989
test_type: [ unittests, functests ]
9090
container:
91-
image: vsaglib/vsag:ci-x86
91+
image: vsaglib/vsag:ci-x86-mkl
9292
volumes:
9393
- /opt:/useless
9494
steps:
@@ -162,7 +162,7 @@ jobs:
162162
needs: build_asan_x86
163163
runs-on: ubuntu-22.04
164164
container:
165-
image: vsaglib/vsag:ci-x86
165+
image: vsaglib/vsag:ci-x86-mkl
166166
volumes:
167167
- /opt:/useless
168168
concurrency:

.github/workflows/asan_with_simd_option.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Asan Build Simd
1313
runs-on: ubuntu-22.04
1414
container:
15-
image: vsaglib/vsag:ci-x86
15+
image: vsaglib/vsag:ci-x86-mkl
1616
volumes:
1717
- /opt:/useless
1818
strategy:
@@ -72,7 +72,7 @@ jobs:
7272
group: test-${{ matrix.simd_key }}-${{ matrix.test_type }}-${{ github.event.pull_request.number || github.sha }}
7373
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
7474
container:
75-
image: vsaglib/vsag:ci-x86
75+
image: vsaglib/vsag:ci-x86-mkl
7676
volumes:
7777
- /opt:/useless
7878
steps:

.github/workflows/check_compatibility.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
group: compatibility-${{ github.event.pull_request.number || github.sha }}
1616
cancel-in-progress: ${{ github.event_name == "pull_request" }}
1717
container:
18-
image: vsaglib/vsag:ci-x86
18+
image: vsaglib/vsag:ci-x86-openblas
1919
steps:
2020
- name: Install GitHub CLI
2121
run: |
@@ -38,6 +38,6 @@ jobs:
3838
|| echo "Warning: Failed to download compatibility indexes"
3939
- uses: actions/checkout@v4
4040
- name: Compile Check Compatibility Tools
41-
run: export CMAKE_GENERATOR="Ninja"; make release VSAG_ENABLE_TOOLS=ON
41+
run: export CMAKE_GENERATOR="Ninja" EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON"; make release VSAG_ENABLE_TOOLS=ON
4242
- name: Run Check Compatibility
4343
run: bash ./scripts/check_compatibility.sh

.github/workflows/coverage.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
group: coverage-${{ github.event.pull_request.number || github.sha }}
3636
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
3737
container:
38-
image: vsaglib/vsag:ci-x86
38+
image: vsaglib/vsag:ci-x86-openblas
3939
steps:
4040
- uses: actions/checkout@v4
4141
with:
@@ -54,7 +54,10 @@ jobs:
5454
save: ${{ github.event_name != 'pull_request' }}
5555
key: build-cov-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
5656
- name: Compile with Coverage Flags
57-
run: export CMAKE_GENERATOR="Ninja"; make cov
57+
# `make cov` defaults to the OpenBLAS backend. Use the system-installed
58+
# OpenBLAS in the ci-x86-openblas image instead of building OpenBLAS
59+
# from source every run.
60+
run: export CMAKE_GENERATOR="Ninja" EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON"; make cov
5861
- name: Run Test
5962
run: |
6063
./scripts/testing/test_parallel_bg.sh

.github/workflows/daily_test.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Asan Build X86
1111
runs-on: ubuntu-22.04
1212
container:
13-
image: vsaglib/vsag:ci-x86
13+
image: vsaglib/vsag:ci-x86-openblas
1414
volumes:
1515
- /opt:/useless
1616
concurrency:
@@ -29,7 +29,14 @@ jobs:
2929
save: false
3030
key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
3131
- name: Make Asan
32-
run: export VSAG_ENABLE_INTEL_MKL=ON CMAKE_GENERATOR="Ninja"; make asan COMPILE_JOBS=4 VSAG_ENABLE_EXAMPLES=ON
32+
# Daily guard for the from-source OpenBLAS build path. We intentionally
33+
# do NOT pass -DUSE_SYSTEM_OPENBLAS=ON here: even though the image
34+
# ships libopenblas-dev, leaving the flag at its default (OFF) means
35+
# CMake downloads and compiles OpenBLAS via ExternalProject_Add, which
36+
# is what release artifacts depend on. PR CI / coverage / lint use the
37+
# system OpenBLAS for speed; this job is the one that keeps the
38+
# source-build path covered.
39+
run: export CMAKE_GENERATOR="Ninja"; make asan COMPILE_JOBS=4 VSAG_ENABLE_EXAMPLES=ON
3340
- name: Clean
3441
run: find ./build -type f -name "*.o" -exec rm -f {} +
3542
- name: Save Test
@@ -85,7 +92,10 @@ jobs:
8592
matrix:
8693
test_type: [ unittests, functests ]
8794
container:
88-
image: vsaglib/vsag:ci-x86
95+
# Matches daily_build_asan_x86: the test binaries were built against the
96+
# from-source OpenBLAS (statically linked), so any image with the rest
97+
# of the runtime would do. We pick ci-x86-openblas for consistency.
98+
image: vsaglib/vsag:ci-x86-openblas
8999
volumes:
90100
- /opt:/useless
91101
steps:
@@ -184,7 +194,7 @@ jobs:
184194
name: Asan Build Simd
185195
runs-on: ubuntu-22.04
186196
container:
187-
image: vsaglib/vsag:ci-x86
197+
image: vsaglib/vsag:ci-x86-mkl
188198
volumes:
189199
- /opt:/useless
190200
strategy:
@@ -240,7 +250,7 @@ jobs:
240250
group: daily_test_simd-${{ matrix.simd_key }}-${{ matrix.test_type }}
241251
cancel-in-progress: true
242252
container:
243-
image: vsaglib/vsag:ci-x86
253+
image: vsaglib/vsag:ci-x86-mkl
244254
volumes:
245255
- /opt:/useless
246256
steps:
@@ -294,7 +304,7 @@ jobs:
294304
group: daily_build_tsan_x86
295305
cancel-in-progress: true
296306
container:
297-
image: vsaglib/vsag:ci-x86
307+
image: vsaglib/vsag:ci-x86-mkl
298308
steps:
299309
- uses: actions/checkout@v4
300310
with:
@@ -327,7 +337,7 @@ jobs:
327337
group: daily_test_tsan_x86
328338
cancel-in-progress: true
329339
container:
330-
image: vsaglib/vsag:ci-x86
340+
image: vsaglib/vsag:ci-x86-mkl
331341
steps:
332342
- uses: actions/checkout@v4
333343
- name: Clean Env

.github/workflows/generate_old_version_index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
contents: write
2020
container:
21-
image: vsaglib/vsag:ci-x86
21+
image: vsaglib/vsag:ci-x86-openblas
2222
steps:
2323
- name: Get Repo
2424
uses: actions/checkout@v4

.github/workflows/lint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
# runs-on: self-hosted
1515
container:
16-
image: vsaglib/vsag:ci-x86
16+
image: vsaglib/vsag:ci-x86-openblas
1717
concurrency:
1818
group: lint-${{ github.event.pull_request.number || github.sha }}
1919
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
@@ -29,4 +29,7 @@ jobs:
2929
save: ${{ github.event_name != 'pull_request' }}
3030
key: build-lint-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
3131
- name: Run lint
32-
run: export CMAKE_GENERATOR="Ninja" && make release && make lint
32+
# `make release` defaults to the OpenBLAS backend. Reuse the system
33+
# OpenBLAS shipped in the ci-x86-openblas image so lint doesn't have
34+
# to rebuild OpenBLAS from source on every run.
35+
run: export CMAKE_GENERATOR="Ninja" EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON" && make release && make lint

.github/workflows/performance.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
group: performance-${{ github.event.pull_request.number }}
1414
cancel-in-progress: true
1515
container:
16-
image: vsaglib/vsag:ci-x86
16+
image: vsaglib/vsag:ci-x86-openblas
1717
env:
1818
PERF_DINGDING_ACCESS_TOKEN: ${{ secrets.PERF_DINGDING_ACCESS_TOKEN }}
1919
PERF_DINGDING_SERCRET: ${{ secrets.PERF_DINGDING_SERCRET }}
@@ -25,7 +25,10 @@ jobs:
2525
- name: Download Datasets
2626
run: bash ./scripts/download_annbench_datasets.sh
2727
- name: Build Release
28-
run: make release
28+
# Performance benchmarks already run against OpenBLAS (the default
29+
# backend). Use the pre-installed system OpenBLAS so the BLAS build
30+
# itself doesn't eat into the daily perf window.
31+
run: EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON" make release
2932
- name: Run Perf - Recall 90%, 95%, 99%
3033
run: |
3134
./build-release/tools/eval/eval_performance .github/perf-mini.yml

.github/workflows/pr-ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
if: needs.changes.outputs.cpp == 'true'
7171
runs-on: ubuntu-22.04
7272
container:
73-
image: vsaglib/vsag:ci-x86
73+
image: vsaglib/vsag:ci-x86-openblas
7474
volumes:
7575
- /opt:/useless
7676
steps:
@@ -84,7 +84,11 @@ jobs:
8484
save: ${{ github.event_name != 'pull_request' }}
8585
key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
8686
- name: Make Asan
87-
run: export VSAG_ENABLE_INTEL_MKL=ON CMAKE_GENERATOR="Ninja" CMAKE_EXPORT_COMPILE_COMMANDS=ON; make asan VSAG_ENABLE_EXAMPLES=ON
87+
# PR CI runs against the pre-installed system OpenBLAS shipped in the
88+
# ci-x86-openblas image to keep iteration latency low. The
89+
# build-from-source OpenBLAS path is exercised by the daily x86 ASan
90+
# job in daily_test.yml.
91+
run: export CMAKE_GENERATOR="Ninja" CMAKE_EXPORT_COMPILE_COMMANDS=ON EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON"; make asan VSAG_ENABLE_EXAMPLES=ON
8892
- name: Install clang-tidy 15
8993
run: sudo apt install clang-tidy-15 -y
9094
- name: Run Lint
@@ -144,7 +148,7 @@ jobs:
144148
if: needs.changes.outputs.cpp == 'true'
145149
runs-on: ubuntu-22.04
146150
container:
147-
image: vsaglib/vsag:ci-x86
151+
image: vsaglib/vsag:ci-x86-openblas
148152
volumes:
149153
- /opt:/useless
150154
steps:
@@ -180,7 +184,7 @@ jobs:
180184
if: needs.changes.outputs.cpp == 'true'
181185
runs-on: ubuntu-22.04
182186
container:
183-
image: vsaglib/vsag:ci-x86
187+
image: vsaglib/vsag:ci-x86-openblas
184188
volumes:
185189
- /opt:/useless
186190
steps:
@@ -216,7 +220,7 @@ jobs:
216220
if: needs.changes.outputs.cpp == 'true'
217221
runs-on: ubuntu-22.04
218222
container:
219-
image: vsaglib/vsag:ci-x86
223+
image: vsaglib/vsag:ci-x86-openblas
220224
volumes:
221225
- /opt:/useless
222226
steps:
@@ -248,7 +252,7 @@ jobs:
248252
if: needs.changes.outputs.cpp == 'true'
249253
runs-on: ubuntu-latest
250254
container:
251-
image: vsaglib/vsag:ci-x86
255+
image: vsaglib/vsag:ci-x86-openblas
252256
steps:
253257
- name: Install GitHub CLI
254258
run: |
@@ -271,7 +275,7 @@ jobs:
271275
|| echo "Warning: Failed to download compatibility indexes"
272276
- uses: actions/checkout@v4
273277
- name: Compile Check Compatibility Tools
274-
run: export CMAKE_GENERATOR="Ninja"; make release VSAG_ENABLE_TOOLS=ON
278+
run: export CMAKE_GENERATOR="Ninja" EXTRA_DEFINED="-DUSE_SYSTEM_OPENBLAS=ON"; make release VSAG_ENABLE_TOOLS=ON
275279
- name: Run Check Compatibility
276280
run: bash ./scripts/check_compatibility.sh
277281

0 commit comments

Comments
 (0)