From c34696fbb65e331151ece76f4de331c85ac77c7a Mon Sep 17 00:00:00 2001 From: Kevin Date: Mon, 26 Jan 2026 15:13:49 +0800 Subject: [PATCH] feat: Add additional Linux compilation targets for cross-platform compatibility - Add aarch64-unknown-linux-gnu.2.17 target for older glibc compatibility - Add x86_64-unknown-linux-gnu.2.17 target for older glibc compatibility - Add a static compilation aarch64-unknown-linux-musl target to support other Linux deployments - Add a static compilation x86_64-unknown-linux-musl target to support other Linux deployments --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 655f8f4..1c2b59d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,23 +10,61 @@ jobs: include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest + build-tool: cargo - target: x86_64-apple-darwin os: macos-latest + build-tool: cargo - target: aarch64-apple-darwin os: macos-latest + build-tool: cargo - target: x86_64-pc-windows-msvc os: windows-latest - - target: aarch64-pc-windows-msvc + build-tool: cargo + - target: aarch64-pc-windows-msvc os: windows-11-arm - - target: aarch64-unknown-linux-gnu + build-tool: cargo + - target: aarch64-unknown-linux-gnu os: ubuntu-24.04-arm + build-tool: cargo + - target: aarch64-unknown-linux-gnu.2.17 + os: ubuntu-24.04-arm + build-tool: cargo-zigbuild + - target: x86_64-unknown-linux-gnu.2.17 + os: ubuntu-latest + build-tool: cargo-zigbuild + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm + build-tool: cargo-zigbuild + - target: x86_64-unknown-linux-musl + os: ubuntu-latest + build-tool: cargo-zigbuild runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: Install Zig + if: matrix.build-tool == 'cargo-zigbuild' + uses: mlugg/setup-zig@v2 + with: + version: 0.15.2 + + - name: Install cargo-zigbuild + if: matrix.build-tool == 'cargo-zigbuild' + shell: bash + run: | + cargo install --locked cargo-zigbuild + + BASE_TARGET="${{ matrix.target }}" + BASE_TARGET="${BASE_TARGET%.2.17}" + + echo "Using rustup target: $BASE_TARGET" + rustup target add "$BASE_TARGET" + - uses: taiki-e/upload-rust-binary-action@v1 with: bin: csharp-language-server target: ${{ matrix.target }} + build-tool: ${{ matrix.build-tool }} + archive: csharp-language-server-${{ matrix.target }} zip: all token: ${{ secrets.GITHUB_TOKEN }}