Skip to content

Commit 903f0e1

Browse files
committed
Add validation that each supported target binary produces unique output
1 parent 18ab906 commit 903f0e1

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lmdb/compile-lmdb-macos.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ fi
66
cd ./lmdb/libraries/liblmdb || exit
77
git checkout LMDB_0.9.33
88

9+
declare -A build_outputs
910
declare -A supported_targets=(
1011
[ios-arm/native/liblmdb.dylib]="make CC='xcrun --sdk iphoneos --toolchain iphoneos clang -arch armv7s' LDFLAGS='-s' XCFLAGS='-DNDEBUG'"
1112
[ios-arm64/native/liblmdb.dylib]="make CC='xcrun --sdk iphoneos --toolchain iphoneos clang -arch arm64' LDFLAGS='-s' XCFLAGS='-DNDEBUG'"
@@ -33,11 +34,20 @@ function compile_lib() {
3334
exit 1
3435
fi
3536
echo "Build succeeded for $2"
37+
output_hash=$(md5 ./liblmdb.so)
38+
echo "$2 $output_hash"
39+
build_outputs["$output_hash"]="$2"
3640
cp ./liblmdb.so ../../../../src/LightningDB/runtimes/"$2"
3741
sleep 10
3842
#seems to be a stateful race condition on the docker run processes so this allows everything to succeed
3943
}
4044

4145
for key in "${!supported_targets[@]}"; do
4246
compile_lib "${supported_targets[$key]}" $key
43-
done
47+
done
48+
49+
if [ ${#supported_targets[@]} -eq ${#build_outputs[@]} ]; then
50+
echo "All builds for lmdb supported targets have succeeded"
51+
else
52+
echo "Not all supported targets have produced unique output"
53+
fi

0 commit comments

Comments
 (0)