Skip to content

Commit 8af6193

Browse files
committed
fixup! ci: add build + release workflow
1 parent ee02afe commit 8af6193

1 file changed

Lines changed: 14 additions & 21 deletions

File tree

.github/workflows/build_release.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -191,36 +191,29 @@ jobs:
191191
192192
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
193193
echo "Linux dependencies:"
194-
# Check if binary is statically linked
195-
LDD_OUTPUT=$(ldd minerd 2>&1)
196-
LDD_EXIT_CODE=$?
197-
198-
# Show what ldd returned
199-
echo "ldd output:"
200-
echo "$LDD_OUTPUT"
201-
echo ""
202-
203-
# Check if binary is statically linked
204-
if echo "$LDD_OUTPUT" | grep -qi "not a dynamic executable\|statically linked"; then
194+
# With -static flag, binary should be statically linked
195+
# Check ldd output for verification
196+
if ldd minerd 2>&1 | grep -qi "not a dynamic executable\|statically linked"; then
205197
echo "SUCCESS: Binary is statically linked"
206-
elif [ $LDD_EXIT_CODE -ne 0 ]; then
207-
# ldd failed, which usually means static binary
208-
echo "SUCCESS: Binary appears to be statically linked (ldd failed, which is expected for static binaries)"
198+
elif ! ldd minerd >/dev/null 2>&1; then
199+
# ldd failed, which means static binary (expected behavior)
200+
echo "SUCCESS: Binary is statically linked (ldd cannot read it, which is expected)"
209201
else
210-
echo "WARNING: Binary appears to have dynamic dependencies"
211-
# Check specifically for problematic libraries - only fail if we see actual library paths/names
212-
# Look for library filenames in ldd output (e.g., "librtmp.so", "libssl.so", "libcrypto.so")
202+
# ldd succeeded, check for problematic libraries
203+
LDD_OUTPUT=$(ldd minerd 2>&1)
204+
echo "ldd output:"
205+
echo "$LDD_OUTPUT"
206+
# Only fail if we see actual .so library files for rtmp/ssl/crypto
213207
if echo "$LDD_OUTPUT" | grep -qiE "(librtmp|libssl|libcrypto)\.so"; then
214208
echo "ERROR: Binary dynamically links to rtmp/ssl/crypto!"
215209
exit 1
216210
else
217-
echo "Note: Binary has some dynamic dependencies (likely system libraries like libc), but not rtmp/ssl/crypto"
211+
echo "Note: Binary may have some system library dependencies, but not rtmp/ssl/crypto"
218212
fi
219213
fi
220-
# Also show file type
214+
# Show file type
221215
echo ""
222-
echo "Binary file type:"
223-
file minerd
216+
file minerd || true
224217
fi
225218
226219
# verify we can boot the binary

0 commit comments

Comments
 (0)