diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 85d29b22..4d7df1da 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -26,13 +26,14 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - args: - - "" - - "-F geo" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Rust cache uses: Swatinem/rust-cache@v2 + - name: Check + run: cargo check + - name: Check w/ geo + run: cargo check - name: Test - run: cargo test ${{ matrix.args }} + run: cargo test --all-features diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 06e6f7f2..9ede4c73 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -57,3 +57,10 @@ jobs: sudo apt-get install libgdal-dev - name: Test run: cargo test ${{ matrix.args }} + test-cli-with-duckdb: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - name: Test + run: cargo test --no-default-features -F duckdb -F duckdb/bundled diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index a5adb3dc..dfab6267 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -26,20 +26,25 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - args: - - "" - - "-F geo" - - "-F geoarrow" - - "-F geoparquet" - - "-F geoparquet-compression" - - "-F reqwest" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Rust cache uses: Swatinem/rust-cache@v2 + - name: Check + run: cargo check + - name: Check w/ geo + run: cargo check -F geo + - name: Check w/ geoarrow + run: cargo check -F geoarrow + - name: Check w/ geoparquet + run: cargo check -F geoparquet + - name: Check w/ geoparquet-compression + run: cargo check -F geoparquet-compression + - name: Check w/ reqwest + run: cargo check -F reqwest - name: Test - run: cargo test ${{ matrix.args }} + run: cargo test -F geo -F geoarrow -F geoparquet -F geoparquet-compression -F reqwest test-core-with-gdal: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml index 9bd355a0..d7ba2067 100644 --- a/.github/workflows/server.yml +++ b/.github/workflows/server.yml @@ -26,14 +26,16 @@ jobs: - ubuntu-latest - macos-latest - windows-latest - args: - - "" - - "-F axum" - - "-F pgstac" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Rust cache uses: Swatinem/rust-cache@v2 + - name: Check + run: cargo check + - name: Check + run: cargo check -F axum + - name: Check + run: cargo check -F pgstac - name: Test - run: cargo test ${{ matrix.args }} + run: cargo test -F axum -F pgstac diff --git a/cli/Cargo.toml b/cli/Cargo.toml index c07a680a..d7fd7f0e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -13,7 +13,7 @@ rust-version = "1.75" [features] default = ["gdal", "geoparquet", "pgstac"] -duckdb = ["dep:stac-duckdb"] +duckdb = ["dep:stac-duckdb", "dep:duckdb"] gdal = ["stac/gdal"] geoparquet = [ "dep:bytes", @@ -28,6 +28,7 @@ python = ["dep:pyo3", "pgstac", "geoparquet"] axum = "0.7" bytes = { version = "1", optional = true } clap = { version = "4", features = ["derive"] } +duckdb = { version = "1", optional = true } # We have this dependency only to allow us to bundle it geoarrow = { version = "0.3.0-beta.3", optional = true } parquet = { version = "52", optional = true } pyo3 = { version = "0.22", optional = true } diff --git a/cli/src/lib.rs b/cli/src/lib.rs index bb4720a0..f9f1c26d 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -43,6 +43,8 @@ pub use {args::Args, error::Error, format::Format, value::Value}; /// Crate-specific result type. pub type Result = std::result::Result; +#[cfg(feature = "duckdb")] +use duckdb as _; use tracing_subscriber as _; #[cfg(test)]