Repository navigation
154 lines (152 loc) · 5.9 KB
/
Copy pathtest.yaml
File metadata and controls
154 lines (152 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: "Test"
on:
push:
branches:
- main
permissions:
contents: read
jobs:
# Quick memory check that the Linux builds wait for (this workflow runs only
# on pushes to main, not on pull requests)
memory-gate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential clang
- run: ./scripts/vendor.sh
- name: Run AddressSanitizer (quick memory check)
run: make test-asan
env:
CC: clang
# `make lint`: clang-format and black, both pinned in tests/uv.lock, so CI
# formats as `make format` does locally with those versions
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- run: uv sync --locked --managed-python --directory tests
- run: PATH="$PWD/tests/.venv/bin:$PATH" make lint python=./tests/.venv/bin/python
build-linux-x86_64-extension:
needs: memory-gate # Require memory tests to pass
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- run: ./scripts/vendor.sh
- run: make loadable static
# Ubuntu's system Python links the system SQLite (3.45.1 on 24.04); uv's
# managed Python bundles a newer one, as on the macOS runners
- run: uv sync --locked --managed-python --directory tests
- run: make test-loadable python=./tests/.venv/bin/python
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: sqlite-vec-linux-x86_64-extension
path: dist/*
# after the upload, so dist/test-unit stays out of the artifact
- run: make test-unit
build-linux-aarch64-extension:
needs: memory-gate # Require memory tests to pass
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- run: ./scripts/vendor.sh
- run: make loadable static
# Ubuntu's system Python links the system SQLite (3.45.1 on 24.04); uv's
# managed Python bundles a newer one, as on the macOS runners
- run: uv sync --locked --managed-python --directory tests
- run: make test-loadable python=./tests/.venv/bin/python
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: sqlite-vec-linux-aarch64-extension
path: dist/*
# after the upload, so dist/test-unit stays out of the artifact
- run: make test-unit
build-macos-x86_64-extension:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- run: uv python install 3.12
- run: ./scripts/vendor.sh
- run: make loadable static
- run: uv sync --locked --directory tests
- run: make test-loadable python=./tests/.venv/bin/python
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: sqlite-vec-macos-x86_64-extension
path: dist/*
build-macos-aarch64-extension:
runs-on: macos-15
env:
# Build as release.yaml and publish.yaml do for darwin-arm64.
MACOSX_DEPLOYMENT_TARGET: "14.0"
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: true
- run: uv python install 3.12
- run: ./scripts/vendor.sh
- run: make loadable static
- run: uv sync --locked --directory tests
- run: make test-loadable python=./tests/.venv/bin/python
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: sqlite-vec-macos-aarch64-extension
path: dist/*
build-windows-x86_64-extension:
runs-on: windows-2022
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
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 --locked --directory tests
- run: make test-loadable python=./tests/.venv/Scripts/python.exe
shell: bash
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: sqlite-vec-windows-x86_64-extension
path: dist/*
test-minimum:
runs-on: macos-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- run: make sqlite-vec.h
- run: make test
working-directory: tests/minimum