From 9879da51f07331962dd63eb3294611be41b70df2 Mon Sep 17 00:00:00 2001 From: Soheil Alizadeh Date: Wed, 19 Nov 2025 00:36:25 +0100 Subject: [PATCH] enable musl target builds with vendored libgit2 --- .github/workflows/publish.yml | 8 ++++---- packages/cli/Cargo.toml | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6505d22d1e..53540e5636 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -63,10 +63,10 @@ jobs: os: ubuntu-24.04-arm # os: blacksmith-4vcpu-ubuntu-2404 # os: blacksmith-4vcpu-ubuntu-2404 - # - target: x86_64-unknown-linux-musl - # os: ubuntu-24.04 - # - target: aarch64-unknown-linux-musl - # os: ubuntu-24.04-arm + - target: x86_64-unknown-linux-musl + os: ubuntu-24.04 + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm steps: - name: Checkout uses: actions/checkout@v5 diff --git a/packages/cli/Cargo.toml b/packages/cli/Cargo.toml index ddbe943d19..fbffb5166a 100644 --- a/packages/cli/Cargo.toml +++ b/packages/cli/Cargo.toml @@ -81,6 +81,9 @@ reqwest = { workspace = true, features = ["rustls-tls", "trust-dns", "json"] } tower = { workspace = true } git2 = "0.20.2" +[target.'cfg(target_env = "musl")'.dependencies] +git2 = { version = "0.20.2", features = ["vendored-libgit2"] } + # path lookup which = { version = "8.0.0" }