Skip to content

Commit 4e06ddb

Browse files
committed
fix: ci
1 parent d2797c2 commit 4e06ddb

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,15 @@ jobs:
337337
options: -v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}
338338
run: |
339339
if ! echo "${{ steps.docker.outputs.IMAGE }}" | grep -q alpine; then
340-
apt-get update && apt-get install -y libc6-dev
340+
apt-get update && apt-get install -y libc6-dev build-essential
341341
fi
342+
# 检查 le16toh 符号是否可用
343+
echo "Checking for le16toh symbol..."
344+
nm -D /lib/x86_64-linux-gnu/libc.so.6 | grep le16toh || echo "le16toh not found in libc"
345+
# 设置环境变量确保正确的链接
346+
export RUSTFLAGS="-C link-arg=-Wl,--allow-multiple-definition"
347+
# 尝试重新构建原生模块
348+
npm rebuild
342349
npm run test
343350
344351
publish:

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ tree-sitter-json = "0.24.8"
2323
url = "2.5.7"
2424
walkdir = "2"
2525
byteorder = "1.5.0"
26+
libc = "0.2"
2627

2728
[build-dependencies]
2829
napi-build = "2"

0 commit comments

Comments
 (0)