Skip to content

Commit 2122558

Browse files
committed
ci: fix release?
1 parent 3b01075 commit 2122558

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

scripts/build-static.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,25 @@ SIZE=$(du -h "$BINARY" | cut -f1)
9797
echo "Binary size: $SIZE"
9898
echo ""
9999

100-
# Test basic functionality
100+
# Test basic functionality (skip if cross-compiling)
101101
echo "4. Testing binary..."
102-
if "$BINARY" --version; then
102+
103+
# Detect if we're cross-compiling
104+
HOST_ARCH=$(uname -m)
105+
HOST_TARGET=""
106+
case "$HOST_ARCH" in
107+
x86_64)
108+
HOST_TARGET="x86_64-unknown-linux-gnu"
109+
;;
110+
aarch64|arm64)
111+
HOST_TARGET="aarch64-unknown-linux-gnu"
112+
;;
113+
esac
114+
115+
if [ "$TARGET" != "$HOST_TARGET" ]; then
116+
echo "⚠ Skipping execution test (cross-compiling: $HOST_TARGET -> $TARGET)"
117+
echo "✓ Binary built successfully (not tested)"
118+
elif "$BINARY" --version; then
103119
echo "✓ Binary runs successfully"
104120
else
105121
echo "✗ Binary failed to run"

0 commit comments

Comments
 (0)