fix(ci): drop 'file' from verify step (not installed in maven base image)
CI / Build Native (push) Successful in 46m9s
CI / Build Native (push) Successful in 46m9s
The 'file' package isn't installed in maven:3.9.6-eclipse-temurin-21, so 'file target/...-runner' returned 127 and failed the verify step. Use only 'ldd'; on a static binary ldd exits non-zero with 'not a dynamic executable', which we suppress with '|| echo'.
This commit is contained in:
@@ -67,15 +67,9 @@ jobs:
|
|||||||
- name: Verify native binary
|
- name: Verify native binary
|
||||||
run: |
|
run: |
|
||||||
ls -la target/shot-crafter-calculator-1.0.0-runner
|
ls -la target/shot-crafter-calculator-1.0.0-runner
|
||||||
echo "--- file ---"
|
echo ""
|
||||||
file target/shot-crafter-calculator-1.0.0-runner
|
echo "=== Library dependencies ==="
|
||||||
echo "--- ldd ---"
|
ldd target/shot-crafter-calculator-1.0.0-runner 2>&1 || echo "(not a dynamic executable -> static)"
|
||||||
if ldd target/shot-crafter-calculator-1.0.0-runner >/dev/null 2>&1; then
|
|
||||||
echo "WARNING: binary has dynamic dependencies:"
|
|
||||||
ldd target/shot-crafter-calculator-1.0.0-runner
|
|
||||||
else
|
|
||||||
echo "OK: binary is statically linked (no dynamic dependencies)."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Stage binary for Docker
|
- name: Stage binary for Docker
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user