Skip to content

Commit 3e69d79

Browse files
committed
fix(ci): try improving how we detect the generated lib binary
1 parent d04852c commit 3e69d79

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/common.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ common::resolve_extension() {
144144
return 0
145145
fi
146146

147-
echo "Unable to locate RabbitRs extension (looked for ${debug_candidate} and ${release_candidate}). Run 'cargo build' first." >&2
147+
# Look for CI build artefacts (target/ci/<job>/release).
148+
local ci_root="$root/target/ci"
149+
if [[ -d "$ci_root" ]]; then
150+
while IFS= read -r -d '' candidate; do
151+
if [[ -f "$candidate" ]]; then
152+
echo "$candidate"
153+
return 0
154+
fi
155+
done < <(find "$ci_root" -maxdepth 3 -type f -name "librabbit_rs.${ext}" -print0)
156+
fi
157+
158+
echo "Unable to locate RabbitRs extension (looked for ${debug_candidate}, ${release_candidate}, or ${root}/target/ci/**/librabbit_rs.${ext}). Run 'cargo build' first." >&2
148159
return 1
149160
}

0 commit comments

Comments
 (0)