mirror of
https://github.com/domcyrus/rustnet.git
synced 2026-04-30 00:40:22 -05:00
fix: use file command to verify static linking in Alpine
This commit is contained in:
@@ -212,7 +212,8 @@ jobs:
|
||||
- name: Verify static linking
|
||||
run: |
|
||||
file target/release/rustnet
|
||||
ldd target/release/rustnet 2>&1 | grep -q "statically linked" || \
|
||||
# Use file command to verify (ldd behaves differently inside Alpine)
|
||||
file target/release/rustnet | grep -q "static-pie linked" || \
|
||||
(echo "ERROR: Binary is not statically linked" && exit 1)
|
||||
|
||||
- name: Create release archive
|
||||
|
||||
@@ -48,8 +48,9 @@ jobs:
|
||||
echo "=== Size ==="
|
||||
ls -lh target/release/rustnet
|
||||
echo ""
|
||||
# Verify it's actually static
|
||||
if ldd target/release/rustnet 2>&1 | grep -q "statically linked"; then
|
||||
# Verify it's actually static using file command
|
||||
# (ldd behaves differently inside Alpine vs glibc systems)
|
||||
if file target/release/rustnet | grep -q "static-pie linked"; then
|
||||
echo "✅ Binary is statically linked!"
|
||||
else
|
||||
echo "❌ ERROR: Binary is NOT statically linked"
|
||||
|
||||
Reference in New Issue
Block a user