File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -69,5 +69,5 @@ cert.pem:
6969 ./gen-certs.sh
7070
7171clean :
72- rm -f test test_split test_proxy server_fuzzer * .pem * .0 * .o * .1 * .srl httplib.h httplib.cc
72+ rm -rf test test_split test_proxy server_fuzzer * .pem * .0 * .o * .1 * .srl httplib.h httplib.cc _build *
7373
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- CURRENT_COMMIT=$( git rev-parse HEAD)
3- PREVIOUS_VERSION=$( git describe --tags --abbrev=0 $CURRENT_COMMIT )
4-
2+ PREVIOUS_VERSION=$( git describe --tags --abbrev=0 master)
53BUILD_DIR=_build_for_is_abi_compatible
64
75# Make the build directory
2927
3028# Build the nearest vesion
3129cd old
30+
3231cmake \
3332 -DCMAKE_BUILD_TYPE=Debug \
3433 -DCMAKE_CXX_FLAGS=" -g -Og" \
@@ -37,22 +36,25 @@ cmake \
3736 -DCMAKE_INSTALL_PREFIX=./out \
3837 ../../.. > /dev/null
3938
39+ git stash -q
4040git checkout -q " ${PREVIOUS_VERSION} "
4141cmake --build . --target install > /dev/null
4242cmake --build . --target clean > /dev/null
4343
4444cd ..
4545
4646# Checkout the original commit
47- if [ " $CURRENT_COMMIT " = " $( git rev-parse master) " ]; then
48- git checkout -q master
49- else
50- git checkout -q " ${CURRENT_COMMIT} "
51- fi
47+ git checkout -q master
48+ git stash pop -q
5249
5350# 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
51+ if [[ " $OSTYPE " == " linux-gnu" * ]]; then
52+ ../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.so ./new/out/lib/libcpp-httplib.so
53+ exit $?
54+ elif [[ " $OSTYPE " == " darwin" * ]]; then
55+ ../check-abi-compatibility.sh ./old/out/lib/libcpp-httplib.dylib ./new/out/lib/libcpp-httplib.dylib
56+ exit $?
57+ else
58+ echo " Unknown OS..."
59+ exit 1
60+ fi
You can’t perform that action at this time.
0 commit comments