diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52d18de..bf9821c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,5 +20,11 @@ jobs: run: sudo xcode-select -s /Applications/Xcode_26.2.app - name: Run Tests run: swift test - - name: Build Release - run: swift build --configuration release + + linux: + name: Linux + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "Test Swift Package on Linux" + run: swift test diff --git a/Sources/SQLiteVecData/Database+LoadSQLiteVec.swift b/Sources/SQLiteVecData/Database+LoadSQLiteVec.swift index 3463aa2..fffb33b 100644 --- a/Sources/SQLiteVecData/Database+LoadSQLiteVec.swift +++ b/Sources/SQLiteVecData/Database+LoadSQLiteVec.swift @@ -1,6 +1,5 @@ import CSQLiteVec import GRDB -import SQLite3 extension Database { /// Loads the sqlite-vec extension into the current database connection. diff --git a/Sources/StructuredQueriesSQLiteVecCore/EmbeddingVector.swift b/Sources/StructuredQueriesSQLiteVecCore/EmbeddingVector.swift index 67a3251..b6b9b97 100644 --- a/Sources/StructuredQueriesSQLiteVecCore/EmbeddingVector.swift +++ b/Sources/StructuredQueriesSQLiteVecCore/EmbeddingVector.swift @@ -90,7 +90,7 @@ import StructuredQueriesCore rhs.array.span.withUnsafeBytes { rhsPtr in let size = Self.count * MemoryLayout.stride return lhsPtr.baseAddress == rhsPtr.baseAddress - || memcmp(lhsPtr.baseAddress, rhsPtr.baseAddress, size) == 0 + || memcmp(lhsPtr.baseAddress!, rhsPtr.baseAddress!, size) == 0 } } } diff --git a/Tests/SQLiteVecDataTests/Vec0QueryTests.swift b/Tests/SQLiteVecDataTests/Vec0QueryTests.swift index 04df858..b0443e1 100644 --- a/Tests/SQLiteVecDataTests/Vec0QueryTests.swift +++ b/Tests/SQLiteVecDataTests/Vec0QueryTests.swift @@ -3093,8 +3093,9 @@ struct Vec0QueryTests { let records = (0..<50) .map { index in - Embedding( - embedding: [Float(index), Float(index + 1), Float(index + 2)], + let index = Float(index) + return Embedding( + embedding: [index, index + 1, index + 2], label: "item-\(index)" ) }