Skip to content

Commit 4961c1a

Browse files
committed
Fix ABI compatibility tool on macOS
1 parent d7c14b6 commit 4961c1a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

test/check-shared-library-abi-compatibility.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ cmake \
3737
-DCMAKE_INSTALL_PREFIX=./out \
3838
../../.. > /dev/null
3939

40+
git stash
4041
git checkout -q "${PREVIOUS_VERSION}"
4142
cmake --build . --target install > /dev/null
4243
cmake --build . --target clean > /dev/null
@@ -49,10 +50,16 @@ if [ "$CURRENT_COMMIT" = "$(git rev-parse master)" ]; then
4950
else
5051
git checkout -q "${CURRENT_COMMIT}"
5152
fi
53+
git stash pop
5254

5355
# ABI compatibility check
54-
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.so ./new/out/lib/libcpp-httplib.so
55-
56-
# Clean the build directory
57-
cd ..
58-
rm -rf $BUILD_DIR
56+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
57+
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.so ./new/out/lib/libcpp-httplib.so
58+
exit $?
59+
elif [[ "$OSTYPE" == "darwin"* ]]; then
60+
../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.dylib ./new/out/lib/libcpp-httplib.dylib
61+
exit $?
62+
else
63+
echo "Unknown OS..."
64+
exit 1
65+
fi

0 commit comments

Comments
 (0)