From bf0886b3b7b9a88ce5d275de6420c77c0b392ad3 Mon Sep 17 00:00:00 2001 From: Alex Garcia Date: Sat, 20 Apr 2024 14:13:16 -0700 Subject: [PATCH] gha: vendor scripts --- .github/workflows/test.yaml | 4 ++++ scripts/vendor.sh | 8 ++++++++ sqlite-vec.c | 4 ++++ 3 files changed, 16 insertions(+) create mode 100755 scripts/vendor.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a2a87b..892b3f7 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,6 +10,7 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 + - run: ./scripts/vendor.sh - run: make loadable - run: pip install pytest numpy; make test-loadable - uses: actions/upload-artifact@v3 @@ -20,6 +21,7 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v3 + - run: ./scripts/vendor.sh - run: make loadable - run: /usr/local/opt/python@3/libexec/bin/python -m pip install pytest numpy; make test-loadable python=/usr/local/opt/python@3/libexec/bin/python - uses: actions/upload-artifact@v3 @@ -30,6 +32,7 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v3 + - run: ./scripts/vendor.sh - run: make loadable CFLAGS="-target arm64-apple-macos11" - uses: actions/upload-artifact@v3 with: @@ -39,6 +42,7 @@ jobs: runs-on: windows-2019 steps: - uses: actions/checkout@v3 + - run: ./scripts/vendor.sh - run: make loadable - run: pip install pytest numpy; make test-loadable - uses: actions/upload-artifact@v3 diff --git a/scripts/vendor.sh b/scripts/vendor.sh new file mode 100755 index 0000000..0706aa5 --- /dev/null +++ b/scripts/vendor.sh @@ -0,0 +1,8 @@ +#!/bin/bash +mkdir -p vendor +curl -o sqlite-amalgamation.zip https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip +unzip -d +unzip sqlite-amalgamation.zip +mv sqlite-amalgamation-3450300/* vendor/ +rmdir sqlite-amalgamation-3450300 +rm sqlite-amalgamation.zip diff --git a/sqlite-vec.c b/sqlite-vec.c index 5438da8..5758cef 100644 --- a/sqlite-vec.c +++ b/sqlite-vec.c @@ -12,6 +12,10 @@ #include "sqlite3ext.h" SQLITE_EXTENSION_INIT1 +typedef u_int8_t uint8_t; +typedef u_int16_t uint16_t; +typedef u_int64_t uint64_t; + #ifndef UNUSED_PARAMETER #define UNUSED_PARAMETER(X) (void)(X) #endif