Skip to content

Commit c55dfb9

Browse files
committed
chore: cleanup static build detection for macos
1 parent af73172 commit c55dfb9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

actions/enforce_static_builds/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
fi
1414
1515
if ! find . -name 'libsession_util_nodejs.node' | grep -q .; then
16-
echo -e "\n\n\n\n\e[31;1mNo libsession_util_nodejs.node file found\e[0m\n\n\n"
16+
echo -e "\nNo libsession_util_nodejs.node file found\n"
1717
exit 1
1818
fi
1919
@@ -27,22 +27,23 @@ runs:
2727
while IFS= read -r node_file; do
2828
if [ "$RUNNER_OS" == "macOS" ]; then
2929
if otool -L "$node_file" | \
30-
grep -Ev '^.*\.node:|^\t(/usr/lib/lib(System\.|c\+\+|objc))|/System/Library/Frameworks/(CoreFoundation|NetworkExtension|Foundation|Network)\.framework'; then
30+
grep -Ev '^.*@rpath/libsession_util_nodejs.node:?|^\t(/usr/lib/lib(System\.|c\+\+|objc))|/System/Library/Frameworks/(CoreFoundation|NetworkExtension|Foundation|Network)\.framework'; then
3131
bad=1
3232
fi
3333
elif [ "$RUNNER_OS" == "Linux" ]; then
34+
ldd "$node_file" | grep -Ev '(linux-vdso|ld-linux-(x86-64|armhf|aarch64)|lib(pthread|dl|rt|stdc\+\+|gcc_s|c|m))\.so'
3435
if ldd "$node_file" | grep -Ev '(linux-vdso|ld-linux-(x86-64|armhf|aarch64)|lib(pthread|dl|rt|stdc\+\+|gcc_s|c|m))\.so'; then
3536
bad=1
3637
fi
3738
else
38-
echo -e "\n\n\n\n\e[31;1mDon't know how to check linked libs on $RUNNER_OS\e[0m\n\n\n"
39+
echo -e "\nDon't know how to check linked libs on $RUNNER_OS\n"
3940
exit 1
4041
fi
4142
done < <(find . -name 'libsession_util_nodejs.node')
4243
4344
if [ -n "$bad" ]; then
44-
echo -e "\n\n\n\n\e[31;1mlibsession-util-nodejs links to unexpected libraries\e[0m\n\n\n"
45+
echo -e "\nlibsession-util-nodejs links to unexpected libraries\n"
4546
exit 1
4647
fi
4748
48-
echo -e "\n\n\n\n\e[32;1mNo unexpected linked libraries found\e[0m\n\n\n"
49+
echo -e "\nNo unexpected linked libraries found\n"

0 commit comments

Comments
 (0)