Skip to content

Commit ed98a63

Browse files
committed
Produce full static binaries with musl instead of glibc
1 parent 221e116 commit ed98a63

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
include:
19-
- target: x86_64-unknown-linux-gnu
19+
- target: x86_64-unknown-linux-musl
2020
os: ubuntu-latest
21-
- target: aarch64-unknown-linux-gnu
21+
- target: aarch64-unknown-linux-musl
2222
os: ubuntu-latest
2323

2424
steps:
@@ -28,12 +28,16 @@ jobs:
2828
with:
2929
targets: ${{ matrix.target }}
3030

31-
- name: Install cross-compilation tools
32-
if: matrix.target == 'aarch64-unknown-linux-gnu'
31+
- name: Install musl tools
3332
run: |
3433
sudo apt-get update
34+
sudo apt-get install -y musl-tools
35+
36+
- name: Install cross-compilation tools
37+
if: matrix.target == 'aarch64-unknown-linux-musl'
38+
run: |
3539
sudo apt-get install -y gcc-aarch64-linux-gnu
36-
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
40+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
3741
3842
- name: Build
3943
run: cargo build --release --locked --target ${{ matrix.target }}

0 commit comments

Comments
 (0)