Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: improve build time and ci for sqlite/duckdb dependencies #199

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
run: cargo test --features server-api-ring,scram
- name: Run tests on additional scram+aws-lc-rs feature set
run: cargo test --features scram
- name: Run tests on _duckdb example
run: cargo test --features _duckdb
- name: Run check on duckdb and sqlite example
run: cargo check --all-targets --features _duckdb,_sqlite,_bundled

integration:
name: Integration tests
Expand Down
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,14 @@ server-api-ring = ["server-api", "ring"]
server-api-aws-lc-rs = ["server-api", "aws-lc-rs"]
scram = ["dep:base64", "dep:stringprep", "dep:x509-certificate"]
_duckdb = []
_sqlite = []
_bundled = ["duckdb/bundled", "rusqlite/bundled"]

[dev-dependencies]
tokio = { version = "1.19", features = ["rt-multi-thread", "net", "macros"]}
rusqlite = { version = "0.32.1", features = ["bundled", "column_decltype"] }
rusqlite = { version = "0.32.1", features = ["column_decltype"] }
## for duckdb example
duckdb = { version = "1.0.0", features = ["bundled"] }
duckdb = { version = "1.0.0" }

## for loading custom cert files
rustls-pemfile = "2.0"
Expand Down Expand Up @@ -104,7 +106,7 @@ required-features = ["server-api"]

[[example]]
name = "sqlite"
required-features = ["server-api"]
required-features = ["server-api", "_sqlite"]

[[example]]
name = "duckdb"
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ Examples are provided to demo the very basic usage of `pgwire` on server side:

- `examples/sqlite.rs`: uses an in-memory sqlite database at its core and serves
it with postgresql protocol. This is a full example with both simple and
extended query implementation.
extended query implementation. `cargo run --features _sqlite_ --example
sqlite`
- `examples/duckdb.rs`: similar to sqlite example but with duckdb backend. Note
that not all data types are implemented in this example.
that not all data types are implemented in this example. `cargo run --features
_duckdb_ --example duckdb`
- `examples/gluesql.rs`: uses an in-memory
[gluesql](https://github.com/gluesql/gluesql) at its core and serves
it with postgresql protocol.
Expand Down
Loading