From 584952b9ee0b9af678b0c4fb26f85b5fa0f1f7b7 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Thu, 11 Jul 2024 22:45:27 -0700 Subject: [PATCH] test ncruces --- .github/workflows/test.yaml | 18 ++++++++++++++++++ bindings/go/ncruces/go-sqlite3.patch | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ac591dc..5fe1d62 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -89,6 +89,24 @@ jobs: 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: .github/workflows/repro.sh + working-directory: go-sqlite3/ + - run: git apply ../bindings/go/ncruces/go-sqlite3.patch + working-directory: go-sqlite3/ + - run: ./scripts/vendor.sh + - uses: actions/upload-artifact@v4 + with: + name: sqlite-vec-ncruces-go + path: dist/* build-cosmopolitan: runs-on: macos-latest steps: diff --git a/bindings/go/ncruces/go-sqlite3.patch b/bindings/go/ncruces/go-sqlite3.patch index 2071622..f9d070f 100644 --- a/bindings/go/ncruces/go-sqlite3.patch +++ b/bindings/go/ncruces/go-sqlite3.patch @@ -9,7 +9,7 @@ index 36183bb..d202a26 100755 + -DSQLITE_VEC_OMIT_FS=1 \ -DSQLITE_CUSTOM_INCLUDE=sqlite_opt.h \ $(awk '{print "-Wl,--export="$0}' exports.txt) - + diff --git a/embed/sqlite3.wasm b/embed/sqlite3.wasm index 569f0b3..b1d9693 100755 Binary files a/embed/sqlite3.wasm and b/embed/sqlite3.wasm differ @@ -22,9 +22,9 @@ index 4fb926b..49a9ee9 100644 #include "vfs.c" #include "vtab.c" - -+#include "../../../../../sqlite-vec.c" ++#include "../../sqlite-vec.c" sqlite3_destructor_type malloc_destructor = &free; - + __attribute__((constructor)) void init() { @@ -28,4 +28,5 @@ __attribute__((constructor)) void init() { sqlite3_auto_extension((void (*)(void))sqlite3_series_init);