mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 00:36:56 +02:00
build fixes, uv for testing
This commit is contained in:
parent
5e4226a257
commit
5fec51c32a
2 changed files with 13 additions and 19 deletions
21
.github/workflows/test.yaml
vendored
21
.github/workflows/test.yaml
vendored
|
|
@ -7,32 +7,32 @@ permissions:
|
|||
contents: read
|
||||
jobs:
|
||||
build-linux-x86_64-extension:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
- uses: astral-sh/setup-uv@v7
|
||||
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
|
||||
- run: make test-loadable
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-linux-x86_64-extension
|
||||
path: dist/*
|
||||
build-macos-x86_64-extension:
|
||||
runs-on: macos-13
|
||||
runs-on: macos-15-intel
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
- uses: astral-sh/setup-uv@v7
|
||||
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
|
||||
- run: make test-loadable
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-x86_64-extension
|
||||
|
|
@ -41,13 +41,13 @@ jobs:
|
|||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
- uses: astral-sh/setup-uv@v7
|
||||
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
|
||||
- run: make test-loadable
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sqlite-vec-macos-aarch64-extension
|
||||
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
- uses: astral-sh/setup-uv@v7
|
||||
with:
|
||||
enable-cache: true
|
||||
- run: ./scripts/vendor.sh
|
||||
|
|
@ -66,7 +66,7 @@ jobs:
|
|||
- 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
|
||||
- run: make test-loadable
|
||||
shell: bash
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
@ -209,6 +209,7 @@ jobs:
|
|||
name: sqlite-vec-pyodide
|
||||
path: vec0.so
|
||||
build-ncruces-go:
|
||||
if: false
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
|
|||
11
Makefile
11
Makefile
|
|
@ -35,13 +35,6 @@ ifdef CONFIG_WINDOWS
|
|||
LOADABLE_EXTENSION=dll
|
||||
endif
|
||||
|
||||
|
||||
ifdef python
|
||||
PYTHON=$(python)
|
||||
else
|
||||
PYTHON=python3
|
||||
endif
|
||||
|
||||
ifndef OMIT_SIMD
|
||||
ifeq ($(shell uname -sm),Darwin x86_64)
|
||||
CFLAGS += -mavx -DSQLITE_VEC_ENABLE_AVX
|
||||
|
|
@ -188,10 +181,10 @@ publish-release:
|
|||
|
||||
# -k test_vec0_update
|
||||
test-loadable: loadable
|
||||
$(PYTHON) -m pytest -vv -s -x tests/test-*.py
|
||||
uv run pytest -vv -s -x tests/test-*.py
|
||||
|
||||
test-loadable-snapshot-update: loadable
|
||||
$(PYTHON) -m pytest -vv tests/test-loadable.py --snapshot-update
|
||||
uv run pytest -vv tests/test-loadable.py --snapshot-update
|
||||
|
||||
test-loadable-watch:
|
||||
watchexec --exts c,py,Makefile --clear -- make test-loadable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue