Skip to content

Commit 66254e1

Browse files
committed
fix: need seperate musl setups arm vs x86
1 parent 89405c0 commit 66254e1

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,30 @@ jobs:
154154
sudo apt-get install -y gcc-aarch64-linux-gnu
155155
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
156156
157-
- name: Musl setup
158-
if: contains(matrix.target, 'musl')
157+
- name: Musl setup (x86_64)
158+
if: matrix.target == 'x86_64-unknown-linux-musl'
159159
run: |
160160
sudo apt-get update -y
161161
sudo apt-get install -y clang musl-tools musl-dev
162+
163+
# g++ supports musl
162164
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
165+
166+
rustup target add ${{ matrix.target }}
167+
168+
- name: Musl setup (aarch64)
169+
if: matrix.target == 'aarch64-unknown-linux-musl'
170+
run: |
171+
sudo apt-get update -y
172+
sudo apt-get install -y clang musl-tools musl-dev
173+
174+
# g++ supports musl
175+
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++
176+
177+
# cc-rs uses the wrong defaults for this target so we override them.
163178
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
164179
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
180+
165181
rustup target add ${{ matrix.target }}
166182
167183
- name: Build binaries

0 commit comments

Comments
 (0)