Skip to content

Commit 5a88230

Browse files
committed
fix: pre-cache ARMv7 Node.js binary to avoid cross-compilation
The ARMv7 build was failing because yao-pkg tried to compile Node.js from source on an x64 runner, which lacks ARM cross-compilation tools. Solution: Pre-download the official pre-built ARMv7 binary from yao-pkg/pkg-fetch releases to ~/.pkg-cache before packaging. This allows yao-pkg to skip compilation and use the cached binary directly. Only affects ARMv7 builds - other platforms unchanged.
1 parent 68db31b commit 5a88230

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ jobs:
8282
env:
8383
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8484

85+
- name: Pre-download ARMv7 Node.js Binary (if needed)
86+
if: matrix.arch == 'armv7'
87+
shell: bash
88+
run: |
89+
echo "Pre-caching ARMv7 Node.js binary to avoid cross-compilation..."
90+
91+
# Create pkg cache directory (v3.5 is the pkg-fetch cache version)
92+
mkdir -p ~/.pkg-cache/v3.5
93+
94+
# Download pre-built ARMv7 binary from yao-pkg/pkg-fetch releases
95+
# Using node20.10.0 which has confirmed armv7 support
96+
curl -L -o ~/.pkg-cache/v3.5/built-v20.10.0-linuxstatic-armv7 \
97+
https://github.com/yao-pkg/pkg-fetch/releases/download/node20/built-v20.10.0-linuxstatic-armv7
98+
99+
# Make executable
100+
chmod +x ~/.pkg-cache/v3.5/built-v20.10.0-linuxstatic-armv7
101+
102+
# Verify download
103+
ls -lh ~/.pkg-cache/v3.5/
104+
echo "ARMv7 binary cached successfully"
105+
85106
- name: Set Application Version
86107
shell: bash
87108
run: |

0 commit comments

Comments
 (0)