Skip to content

Commit 7394162

Browse files
committed
Build bundled GEOS only for release builds to speed up CI and dynamically linked builds.
1 parent c0040f1 commit 7394162

File tree

6 files changed

+10
-8
lines changed

6 files changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
run: |
8888
cd crates/cli && \
8989
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
90-
cargo build --target x86_64-unknown-linux-musl --features=vendor-ssl --release --bin trail && \
90+
cargo build --target x86_64-unknown-linux-musl --release --features=vendor-ssl,static-geos --bin trail && \
9191
cd ../.. && \
9292
zip -r -j trailbase_${{ github.ref_name }}_x86_64_linux.zip target/x86_64-unknown-linux-musl/release/trail CHANGELOG.md LICENSE
9393
@@ -123,7 +123,7 @@ jobs:
123123
run: |
124124
cd crates/cli && \
125125
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
126-
cargo build --target aarch64-unknown-linux-musl --features=vendor-ssl --release --bin trail && \
126+
cargo build --target aarch64-unknown-linux-musl --release --features=vendor-ssl,static-geos --bin trail && \
127127
cd ../.. && \
128128
zip -r -j trailbase_${{ github.ref_name }}_arm64_linux.zip target/aarch64-unknown-linux-musl/release/trail CHANGELOG.md LICENSE
129129
@@ -193,7 +193,7 @@ jobs:
193193
- name: Rust Build
194194
run: |
195195
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
196-
cargo build --target aarch64-apple-darwin --release --bin trail && \
196+
cargo build --target aarch64-apple-darwin --release --features=static-geos --bin trail && \
197197
zip -r -j trailbase_${{ github.ref_name }}_arm64_apple_darwin.zip target/aarch64-apple-darwin/release/trail CHANGELOG.md LICENSE
198198
199199
- name: Release binaries
@@ -227,7 +227,7 @@ jobs:
227227
- name: Rust Build
228228
run: |
229229
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
230-
cargo build --target x86_64-apple-darwin --release --bin trail && \
230+
cargo build --target x86_64-apple-darwin --release --features=static-geos --bin trail && \
231231
zip -r -j trailbase_${{ github.ref_name }}_x86_64_apple_darwin.zip target/x86_64-apple-darwin/release/trail CHANGELOG.md LICENSE
232232
233233
- name: Release binaries
@@ -257,7 +257,7 @@ jobs:
257257
run: |
258258
pnpm install && \
259259
CARGO_PROFILE_RELEASE_LTO=fat CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 PNPM_OFFLINE=TRUE \
260-
cargo build --target x86_64-pc-windows-msvc --release --bin trail && \
260+
cargo build --target x86_64-pc-windows-msvc --release --features=static-geos --bin trail && \
261261
zip -r -j trailbase_${{ github.ref_name }}_x86_64_windows.zip target/x86_64-pc-windows-msvc/release/trail.exe CHANGELOG.md LICENSE
262262
263263
- name: Release binaries

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install Dependencies
3636
run: |
3737
sudo apt-get update && \
38-
sudo apt-get install -y --no-install-recommends curl libssl-dev pkg-config libclang-dev protobuf-compiler libprotobuf-dev
38+
sudo apt-get install -y --no-install-recommends curl libssl-dev pkg-config libclang-dev protobuf-compiler libprotobuf-dev libgeos-dev
3939
- uses: actions/setup-python@v5
4040
with:
4141
python-version: '3.13'

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ axum = { version = "^0.8.1", features = ["multipart"] }
7777
base64 = { version = "0.22.1", default-features = false, features = ["alloc", "std"] }
7878
env_logger = { version = "^0.11.8", default-features = false, features = ["auto-color", "humantime"] }
7979
libsqlite3-sys = { version = "0.36.0", default-features = false, features = ["bundled", "preupdate_hook"] }
80-
litegis = { version = "0.0.4", default-features = false, features = ["static"] }
80+
litegis = { version = "0.0.4", default-features = false }
8181
minijinja = { version = "2.1.2", default-features = false }
8282
parking_lot = { version = "0.12.3", default-features = false, features = ["send_guard", "arc_lock"] }
8383
rand = "^0.10.0"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RUN case ${TARGETPLATFORM} in \
4646
"linux/arm64") RUST_TARGET="aarch64-unknown-linux-musl" ;; \
4747
*) RUST_TARGET="x86_64-unknown-linux-musl" ;; \
4848
esac && \
49-
RUST_BACKTRACE=1 PNPM_OFFLINE="TRUE" cargo build --target ${RUST_TARGET} --features=vendor-ssl --release --bin trail && \
49+
RUST_BACKTRACE=1 PNPM_OFFLINE="TRUE" cargo build --target ${RUST_TARGET} --features=vendor-ssl,static-geos --release --bin trail && \
5050
mv target/${RUST_TARGET}/release/trail /app/trail.exe
5151

5252

crates/cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ default = []
1616
swagger = ["dep:utoipa-swagger-ui"]
1717
vendor-ssl = ["dep:openssl"]
1818
ws = ["trailbase/ws"]
19+
static-geos = ["trailbase/static-geos"]
1920

2021
[dependencies]
2122
axum = { version = "^0.8.1", features=["multipart"] }

crates/core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ wasm = ["dep:trailbase-wasm-runtime-host"]
2929
otel = ["dep:axum-tracing-opentelemetry", "dep:init-tracing-opentelemetry"]
3030
# Enable axum's "ws" feature: https://doc.rust-lang.org/cargo/reference/features.html#dependency-features
3131
ws = ["axum/ws"]
32+
static-geos = ["litegis/static"]
3233

3334
[dependencies]
3435
aes-gcm-siv = "0.11.1"

0 commit comments

Comments
 (0)