-
Notifications
You must be signed in to change notification settings - Fork 160
145 lines (143 loc) · 4.83 KB
/
test.yaml
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
name: "Test"
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build-linux-x86_64-extension:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: ./scripts/vendor.sh
- run: make loadable static
- run: pip install pytest numpy; 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-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: actions/setup-python@v5
with:
python-version: "3.12"
- run: ./scripts/vendor.sh
shell: bash
- run: make loadable static CC=gcc
- run: pip install pytest numpy; make test-loadable CC=gcc
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-windows-x86_64-extension
path: dist/*
build-windows-x86_64-extension-msvc:
if: false
runs-on: windows-latest
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-msvc-extension
path: dist/*
build-wasm32-emscripten:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v12
with:
version: "latest"
- run: ./scripts/vendor.sh
- run: make sqlite-vec.h
- run: make wasm
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-wasm32-emscripten
path: dist/*
build-ncruces-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make sqlite-vec.h
- uses: actions/checkout@v4
with:
repository: ncruces/go-sqlite3
path: go-sqlite3
- run: git apply ../bindings/go/ncruces/go-sqlite3.patch
working-directory: go-sqlite3/
- run: |
mkdir -p tools/
[ -d "tools/wasi-sdk" ] || curl -#L "$WASI_SDK" | tar xzC tools &
[ -d "tools/binaryen" ] || curl -#L "$BINARYEN" | tar xzC tools &
wait
mv "tools/wasi-sdk"* "tools/wasi-sdk"
mv "tools/binaryen"* "tools/binaryen"
sqlite3/download.sh
embed/build.sh
env:
WASI_SDK: "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-23/wasi-sdk-23.0-x86_64-linux.tar.gz"
BINARYEN: "https://github.com/WebAssembly/binaryen/releases/download/version_118/binaryen-version_118-x86_64-linux.tar.gz"
working-directory: go-sqlite3/
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-ncruces-go
path: go-sqlite3/embed/sqlite3.wasm
build-cosmopolitan:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir $HOME/cosmo
curl -L -o cosmocc-$COSMO_VERSION.zip https://github.com/jart/cosmopolitan/releases/download/$COSMO_VERSION/cosmocc-$COSMO_VERSION.zip
unzip cosmocc-$COSMO_VERSION.zip -d $HOME/cosmo
env:
COSMO_VERSION: "3.5.4"
- run: ./scripts/vendor.sh
- run: make cli CC=$HOME/cosmo/bin/cosmocc AR=$HOME/cosmo/bin/cosmoar OMIT_SIMD=1
- uses: actions/upload-artifact@v4
with:
name: sqlite-vec-cosmopolitan
path: dist/*
test-minimum:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: make sqlite-vec.h
- run: make test
working-directory: tests/minimum