diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b276efd..ffdea279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,15 +154,15 @@ jobs: # drivers do not change the rust code # enable `driver_sqlite` to force statically linking libsqlite3 for proj - name: Check with Clippy (bundled) - run: cargo clippy --all-targets --features "gdal-sys/bundled gdal-src gdal-src/driver_sqlite" -- -D warnings + run: cargo clippy --all-targets --features bundled -- -D warnings # we only build tests here as we have disabled features # that are required for running tests - name: Build bundled gdal (minimal features) # we use cargo test --no-run here because # tests do not pass due to missing libgeos but we want to have a complete build (including linking) - run: cargo test --features "gdal-sys/bundled gdal-src gdal-src/driver_sqlite" --no-run + run: cargo test --features bundled --no-run - name: Test bundled (all features) - run: cargo test --features "gdal-sys/bundled gdal-src gdal-src/all_drivers gdal-src/geos_static" + run: cargo test --features bundled_all - name: Check that all files necessary to build gdal are included if: matrix.os != 'macos-13' run: cargo package -p gdal-src -F all_drivers diff --git a/CHANGES.md b/CHANGES.md index 8545701f..ae8834e8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased +### Added + + - Add `bundled` and `bundled_all` feature to the gdal crate for building and statically linking a minimal bundled version of GDAL. + ### Fixed - Bump referenced gdal version to 3.10.3 diff --git a/Cargo.toml b/Cargo.toml index 8bfeaca7..52c2d852 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,8 @@ rust-version = "1.80" default = [] bindgen = ["gdal-sys/bindgen"] array = ["ndarray"] +bundled = ["gdal-sys/bundled", "gdal-src", "gdal-src/driver_sqlite"] +bundled_all = ["gdal-sys/bundled", "gdal-src", "gdal-src/all_drivers", "gdal-src/geos_static"] [dependencies] thiserror = "2.0"