Skip to content
Merged
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
47 changes: 11 additions & 36 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,13 @@
# File: .dockerignore
. git
.github
*. md
. gitignore
.env
. env.*

# Build artifacts
*.exe
*.exe~
*.dll
# Exclude from Docker build context (faster COPY, smaller image context)
# Keep .git so COPY . /src leaves a git repo and RUN git submodule update --init works
.gitignore
build
*.o
*.a
*.so
*.dylib
cache-server
*. test
*.out

# Test files
*_test.go
testdata/

# IDE
.vscode/
. idea/
*.swp
*. swo
*~

# OS
.DS_Store
Thumbs.db

# Temp
tmp/
temp/
.cursor
*.md
*.json
out
*.log
data/
.DS_Store
70 changes: 60 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup CMake
uses: lukka/get-cmake@latest
Expand All @@ -21,48 +23,94 @@ jobs:
run: cmake --build build --config Release --parallel

- name: CTest
run: ctest --test-dir build --output-on-failure -C Release
run: ctest --test-dir build --output-on-failure -C Release --timeout 120 -E "recall_test|recovery_test"

tsan:
name: tsan-linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang
run: sudo apt-get update && sudo apt-get install -y clang
with:
submodules: recursive
# Use GCC (default on Ubuntu) + TSan; POMAI_USE_PALLOC=OFF avoids multiple-definition with TSan's new/delete.
- name: Configure (TSAN)
env:
CC: clang
CXX: clang++
run: >-
cmake -S . -B build-tsan -DPOMAI_BUILD_TESTS=ON
cmake -S . -B build-tsan -DPOMAI_BUILD_TESTS=ON -DPOMAI_BUILD_BENCH=OFF -DPOMAI_USE_PALLOC=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_FLAGS='-fsanitize=thread -fno-omit-frame-pointer'
-DCMAKE_CXX_FLAGS='-fsanitize=thread -fno-omit-frame-pointer'
-DCMAKE_C_FLAGS='-fsanitize=thread -fno-omit-frame-pointer -g'
-DCMAKE_CXX_FLAGS='-fsanitize=thread -fno-omit-frame-pointer -g'
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=thread'
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=thread'
- name: Build (TSAN)
run: cmake --build build-tsan --parallel
- name: TSAN workload tests
run: ctest --test-dir build-tsan --output-on-failure -L tsan
run: ctest --test-dir build-tsan --output-on-failure -L tsan --timeout 120

asan:
name: asan-linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# GCC + ASan; POMAI_USE_PALLOC=OFF so ASan can intercept allocator.
- name: Configure (ASan)
run: >-
cmake -S . -B build-asan -DPOMAI_BUILD_TESTS=ON -DPOMAI_BUILD_BENCH=OFF -DPOMAI_USE_PALLOC=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
-DCMAKE_CXX_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g'
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address'
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address'
- name: Build (ASan)
run: cmake --build build-asan --parallel
- name: Run tests (ASan)
run: ctest --test-dir build-asan --output-on-failure -C RelWithDebInfo -E "tsan|crash" --timeout 120

ubsan:
name: ubsan-linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# GCC + UBSan; POMAI_USE_PALLOC=OFF so sanitizer runtimes are used.
- name: Configure (UBSan)
run: >-
cmake -S . -B build-ubsan -DPOMAI_BUILD_TESTS=ON -DPOMAI_BUILD_BENCH=OFF -DPOMAI_USE_PALLOC=OFF
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_FLAGS='-fsanitize=undefined -fno-omit-frame-pointer -g'
-DCMAKE_CXX_FLAGS='-fsanitize=undefined -fno-omit-frame-pointer -g'
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=undefined'
-DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=undefined'
- name: Build (UBSan)
run: cmake --build build-ubsan --parallel
- name: Run tests (UBSan)
run: ctest --test-dir build-ubsan --output-on-failure -C RelWithDebInfo -E "tsan|crash" --timeout 120

python-ffi-smoke:
name: python-ffi-smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: cmake -S . -B build -DPOMAI_BUILD_TESTS=ON
- name: Build shared C ABI
run: cmake --build build --target pomai_c --parallel
- name: Run Python ctypes smoke
run: python3 tests/ffi/python_ctypes_smoke.py
- name: Run RAG smoke
run: python3 scripts/rag_smoke.py

perf-gate:
name: perf-gate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure
run: cmake -S . -B build -DPOMAI_BUILD_TESTS=ON
- name: Build perf harness
Expand All @@ -75,6 +123,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Python deps
run: python3 -m pip install numpy
- name: Configure
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ venv
./build*
.venv-benchmark
benchmarks/cross_engine/output
/build_fuzz
benchmarks/cross_engine/benchmarks
/build_fuzz
/Testing
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "third_party/mimalloc"]
path = third_party/mimalloc
url = https://github.com/microsoft/mimalloc.git
[submodule "third_party/faiss"]
path = third_party/faiss
url = https://github.com/facebookresearch/faiss.git
[submodule "third_party/palloc"]
path = third_party/palloc
url = https://github.com/AutoCookies/palloc.git
Loading
Loading