ci: add musl build targets for static Linux binaries

This commit is contained in:
Vladislav Yaroslavlev
2026-02-19 09:43:31 +03:00
parent 301f829c3c
commit b11a767741

View File

@@ -25,10 +25,16 @@ jobs:
include: include:
- target: x86_64-unknown-linux-gnu - target: x86_64-unknown-linux-gnu
artifact_name: telemt artifact_name: telemt
asset_name: telemt-x86_64-linux asset_name: telemt-x86_64-linux-gnu
- target: aarch64-unknown-linux-gnu - target: aarch64-unknown-linux-gnu
artifact_name: telemt artifact_name: telemt
asset_name: telemt-aarch64-linux asset_name: telemt-aarch64-linux-gnu
- target: x86_64-unknown-linux-musl
artifact_name: telemt
asset_name: telemt-x86_64-linux-musl
- target: aarch64-unknown-linux-musl
artifact_name: telemt
asset_name: telemt-aarch64-linux-musl
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -60,6 +66,8 @@ jobs:
run: cargo install cross --git https://github.com/cross-rs/cross run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build Release - name: Build Release
env:
RUSTFLAGS: ${{ contains(matrix.target, 'musl') && '-C target-feature=+crt-static' || '' }}
run: cross build --release --target ${{ matrix.target }} run: cross build --release --target ${{ matrix.target }}
- name: Package binary - name: Package binary