Skip to content

Commit f4f56a7

Browse files
committed
fix: ci
1 parent 4dcd6f9 commit f4f56a7

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,13 +342,18 @@ jobs:
342342
run: |
343343
if ! echo "${{ steps.docker.outputs.IMAGE }}" | grep -q alpine; then
344344
apt-get update && apt-get install -y libc6-dev
345+
# 仅 armv7 安装 libbsd,提供 le16toh 等符号
346+
if [ "${{ matrix.target }}" = "armv7-unknown-linux-gnueabihf" ]; then
347+
apt-get install -y libbsd0
348+
fi
345349
fi
346350
# 安装 pnpm 并清理重新安装依赖项以确保正确的架构模块
347351
npm install -g pnpm
348352
rm -rf node_modules
349-
# 为 ARM 架构设置环境变量
350-
if [[ "${{ matrix.target }}" == "armv7-unknown-linux-gnueabihf" ]]; then
351-
export LD_LIBRARY_PATH=/lib/arm-linux-gnueabihf:$LD_LIBRARY_PATH
353+
# 仅 armv7 设置库路径与预加载
354+
if [ "${{ matrix.target }}" = "armv7-unknown-linux-gnueabihf" ]; then
355+
export LD_LIBRARY_PATH=/lib/arm-linux-gnueabihf:${LD_LIBRARY_PATH}
356+
export LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libbsd.so.0
352357
fi
353358
pnpm install --force
354359
pnpm test

0 commit comments

Comments
 (0)