diff --git a/.forgejo/workflows/android-ci.yml b/.forgejo/workflows/android-ci.yml index 1ec5565..bed8806 100644 --- a/.forgejo/workflows/android-ci.yml +++ b/.forgejo/workflows/android-ci.yml @@ -184,8 +184,13 @@ jobs: # claims to. A missing marker fails the job: an APK whose on-device node # can only fail is the regression this gate exists to catch. unzip -p "$apk" "lib/$abi/libonionwire_sdk.so" > /tmp/libonionwire_sdk.so - strings -a /tmp/libonionwire_sdk.so | grep -c 'target_max_memory' || true - if ! strings -a /tmp/libonionwire_sdk.so | grep -q 'target_max_memory'; then + # `grep -c`, deliberately not `grep -q`: under `set -o pipefail` a `-q` + # match closes the pipe early, `strings` dies on SIGPIPE (141), and the + # pipeline then reports failure even though the marker was there — this + # gate failed its own green build once that way. + marker="$(strings -a /tmp/libonionwire_sdk.so | grep -c 'target_max_memory' || true)" + echo "target_max_memory occurrences: ${marker:-0}" + if [ "${marker:-0}" -lt 1 ]; then echo "lib/$abi/libonionwire_sdk.so carries no cuprated config string: the cuprate-daemon feature is NOT in this APK" >&2 exit 1 fi