mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
PARTITION KEY support (#122)
* initial pass at PARTITION KEY support. * unit tests * gha this PR branch * fixup tests * doc internal * fix tests, KNN/rowids in * define SQLITE_INDEX_CONSTRAINT_OFFSET * whoops * update tests, syrupy, use uv * un ignore pyproject.toml * dot * tests/ * type error? * win: .exe, update error name * try fix macos python, paren around expr? * win bash? * dbg :( * explicit error * op * dbg win * win ./tests/.venv/Scripts/python.exe * block UPDATEs on partition key values for now
This commit is contained in:
parent
ee3654701f
commit
6658624172
16 changed files with 1522 additions and 245 deletions
135
.github/workflows/test.yaml
vendored
135
.github/workflows/test.yaml
vendored
|
|
@ -3,6 +3,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
- partition-by
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
|
|
@ -10,16 +11,92 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
python-version: "3.12"
|
||||
enable-cache: true
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make loadable static
|
||||
- run: pip install pytest numpy; make test-loadable
|
||||
- run: uv sync --directory tests
|
||||
- run: make test-loadable python=./tests/.venv/bin/python
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-linux-x86_64-extension
|
||||
path: dist/*
|
||||
build-macos-x86_64-extension:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
enable-cache: true
|
||||
- run: uv python install 3.12
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make loadable static
|
||||
- run: uv sync --directory tests
|
||||
- run: make test-loadable python=./tests/.venv/bin/python
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-x86_64-extension
|
||||
path: dist/*
|
||||
build-macos-aarch64-extension:
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
enable-cache: true
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make loadable static
|
||||
- run: uv sync --directory tests
|
||||
- run: make test-loadable python=./tests/.venv/bin/python
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-aarch64-extension
|
||||
path: dist/*
|
||||
build-windows-x86_64-extension:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
enable-cache: true
|
||||
- run: ./scripts/vendor.sh
|
||||
shell: bash
|
||||
- run: make sqlite-vec.h
|
||||
- run: mkdir dist
|
||||
- run: cl.exe /fPIC -shared /W4 /Ivendor/ /O2 /LD sqlite-vec.c -o dist/vec0.dll
|
||||
- run: uv sync --directory tests
|
||||
- run: make test-loadable python=./tests/.venv/Scripts/python.exe
|
||||
shell: bash
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-windows-x86_64-extension
|
||||
path: dist/*
|
||||
build-linux-aarch64-extension:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: green-coding-solutions/eco-ci-energy-estimation@v4
|
||||
with:
|
||||
task: start-measurement
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
version: "latest"
|
||||
- run: sudo apt-get install gcc-arm-linux-gnueabihf
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make sqlite-vec.h
|
||||
- run: make CC=arm-linux-gnueabihf-gcc loadable static
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-linux-aarch64-extension
|
||||
path: dist/*
|
||||
- uses: green-coding-solutions/eco-ci-energy-estimation@v4
|
||||
with:
|
||||
task: get-measurement
|
||||
label: "all"
|
||||
- uses: green-coding-solutions/eco-ci-energy-estimation@v4
|
||||
with:
|
||||
task: display-results
|
||||
build-android-extensions:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
|
@ -98,58 +175,6 @@ jobs:
|
|||
with:
|
||||
name: sqlite-vec-${{ matrix.platforms.name }}-extension
|
||||
path: dist/*
|
||||
build-macos-x86_64-extension:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make loadable static
|
||||
- run: /usr/local/opt/python@3/libexec/bin/python -m pip install --break-system-packages pytest numpy; make test-loadable python=/usr/local/opt/python@3/libexec/bin/python
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-x86_64-extension
|
||||
path: dist/*
|
||||
build-macos-aarch64-extension:
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make loadable static
|
||||
- run: /opt/homebrew/opt/python3/libexec/bin/python -m pip install pytest numpy --break-system-packages; make test-loadable python=/opt/homebrew/opt/python3/libexec/bin/python
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-aarch64-extension
|
||||
path: dist/*
|
||||
build-windows-x86_64-extension:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- run: ./scripts/vendor.sh
|
||||
shell: bash
|
||||
- run: make sqlite-vec.h
|
||||
- run: mkdir dist
|
||||
- run: cl.exe /fPIC -shared /W4 /Ivendor/ /O2 /LD sqlite-vec.c -o dist/vec0.dll
|
||||
- run: pip install pytest numpy; make test-loadable
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-windows-x86_64-extension
|
||||
path: dist/*
|
||||
build-linux-aarch64-extension:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: sudo apt-get install gcc-arm-linux-gnueabihf
|
||||
- run: ./scripts/vendor.sh
|
||||
- run: make sqlite-vec.h
|
||||
- run: make CC=arm-linux-gnueabihf-gcc loadable static
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-linux-aarch64-extension
|
||||
path: dist/*
|
||||
build-wasm32-emscripten:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue