Skip to content

Commit dc00c90

Browse files
committed
fix linux build by importing GRDBSQLite
saw that the linux build failed and wondered if we should rely on the GRDBSQLite package instead of raw SQLite3. From what I understand, that should resolve to SQLite3 on Darwin, but use libsqlite3 on Linux. Also copied over the Linux pieces from [swift-sharing](https://github.com/pointfreeco/swift-sharing/blob/main/.github/workflows/ci.yml) + installing sqlite
1 parent a99d8e5 commit dc00c90

4 files changed

Lines changed: 20 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,20 @@ jobs:
2727
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
2828
- name: Run ${{ matrix.config }} tests
2929
run: swift test -c ${{ matrix.config }}
30+
31+
linux:
32+
name: Linux
33+
strategy:
34+
matrix:
35+
swift:
36+
- '6.0'
37+
runs-on: ubuntu-latest
38+
container: swift:${{ matrix.swift }}
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Install Build Dependencies
42+
run: |
43+
apt-get update
44+
apt-get install -y libsqlite3-dev
45+
- name: Build
46+
run: swift build

Sources/StructuredQueriesGRDBCore/QueryCursor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22
import GRDB
3-
import SQLite3
3+
import GRDBSQLite
44
import StructuredQueriesCore
55

66
/// A cursor of a structured query.

Sources/StructuredQueriesGRDBCore/SQLiteQueryDecoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import SQLite3
1+
import GRDBSQLite
22
import StructuredQueriesCore
33

44
@usableFromInline

Sources/StructuredQueriesGRDBCore/Statement+GRDB.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import GRDB
2-
import SQLite3
2+
import GRDBSQLite
33
import StructuredQueriesCore
44

55
extension StructuredQueriesCore.Statement {

0 commit comments

Comments
 (0)