build: enable hybrid build for dynamic local and static musl CI/CD

This commit is contained in:
2026-01-18 22:59:50 +08:00
parent 4e5fdf3d21
commit 300c013015
4 changed files with 7 additions and 3 deletions

View File

@@ -1,2 +0,0 @@
[build]
# target = "x86_64-unknown-linux-musl"

View File

@@ -40,7 +40,7 @@ jobs:
- name: Build
# 'cross' handles the containerized build environment for the specified target (musl)
run: cross build --release --target ${{ matrix.target }}
run: cross build --release --target ${{ matrix.target }} --features static-musl
- name: Prepare Packaging Assets
run: |

1
Cargo.lock generated
View File

@@ -2488,6 +2488,7 @@ dependencies = [
"httparse",
"ipnet",
"libc",
"openssl",
"pingora",
"serde",
"serde_repr",

View File

@@ -26,6 +26,11 @@ serde_repr = "0.1.20"
pingora = { version = "0.6", features = ["lb", "openssl"] }
ipnet = { version = "2.11.0", features = ["serde"] }
httparse = "1.10.1"
openssl = { version = "0.10", optional = true }
[features]
default = []
static-musl = ["openssl/vendored", "dep:openssl"]
[dev-dependencies]
tempfile = "3"