diff --git a/bin/build-macos-universal.sh b/bin/build-macos-universal.sh old mode 100644 new mode 100755 index 618dd9f..4168945 --- a/bin/build-macos-universal.sh +++ b/bin/build-macos-universal.sh @@ -44,18 +44,7 @@ fi # :: Clone dependencies ::::::::::::::::::::::::::::::::::::::::::::::::::::::: -if [ ! -d "${DIR_THIRDPARTY}/bde-tools" ]; then - git clone https://github.com/bloomberg/bde-tools "${DIR_THIRDPARTY}/bde-tools" -fi -if [ ! -d "${DIR_THIRDPARTY}/bde" ]; then - git clone --depth 1 https://github.com/bloomberg/bde.git "${DIR_THIRDPARTY}/bde" -fi -if [ ! -d "${DIR_THIRDPARTY}/ntf-core" ]; then - git clone --depth 1 https://github.com/bloomberg/ntf-core.git "${DIR_THIRDPARTY}/ntf-core" -fi -if [ ! -d "${DIR_THIRDPARTY}/blazingmq" ]; then - git clone --depth 1 https://github.com/bloomberg/blazingmq.git "${DIR_THIRDPARTY}/blazingmq" -fi +source ./bin/clone-dependencies.sh # Build and install BDE # Refer to https://bloomberg.github.io/bde/library_information/build.html @@ -114,9 +103,8 @@ if [ ! -e "${DIR_BUILD}/blazingmq/.complete" ]; then -DFLEX_ROOT="${FLEX_ROOT}" -G "Ninja") cmake -B "${DIR_BUILD}/blazingmq" -S "." "${CMAKE_OPTIONS[@]}" - cmake --build "${DIR_BUILD}/blazingmq" -j 16 --target bmq - cmake --install "${DIR_BUILD}/blazingmq" --component mwc-all - cmake --install "${DIR_BUILD}/blazingmq" --component bmq-all + cmake --build "${DIR_BUILD}/blazingmq" -j 16 --target all + cmake --install "${DIR_BUILD}/blazingmq" popd touch "${DIR_BUILD}/blazingmq/.complete" fi diff --git a/bin/build-manylinux.sh b/bin/build-manylinux.sh old mode 100644 new mode 100755 index 84825a1..7ec89d6 --- a/bin/build-manylinux.sh +++ b/bin/build-manylinux.sh @@ -42,15 +42,9 @@ fi # :: Clone dependencies ::::::::::::::::::::::::::::::::::::::::::::::::::::::: -if [ ! -d "${DIR_THIRDPARTY}/bde-tools" ]; then - git clone https://github.com/bloomberg/bde-tools "${DIR_THIRDPARTY}/bde-tools" -fi -if [ ! -d "${DIR_THIRDPARTY}/bde" ]; then - git clone --depth 1 https://github.com/bloomberg/bde.git "${DIR_THIRDPARTY}/bde" -fi -if [ ! -d "${DIR_THIRDPARTY}/ntf-core" ]; then - git clone --depth 1 https://github.com/bloomberg/ntf-core.git "${DIR_THIRDPARTY}/ntf-core" -fi +source ./bin/clone-dependencies.sh + +# Download additional dependencies that are not packaged on manylinux: if [ ! -d "${DIR_THIRDPARTY}/google-benchmark" ]; then git clone --depth 1 https://github.com/google/benchmark.git "${DIR_THIRDPARTY}/google-benchmark" fi @@ -58,9 +52,6 @@ if [ ! -d "${DIR_THIRDPARTY}/bison" ]; then mkdir -p "${DIR_THIRDPARTY}/bison" curl https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.xz | tar -Jx -C "${DIR_THIRDPARTY}/bison" --strip-components 1 fi -if [ ! -d "${DIR_THIRDPARTY}/blazingmq" ]; then - git clone --depth 1 https://github.com/bloomberg/blazingmq.git "${DIR_THIRDPARTY}/blazingmq" -fi if [ ! -e "${DIR_THIRDPARTY}/cmake/.complete" ]; then mkdir -p "${DIR_THIRDPARTY}/cmake" diff --git a/bin/clone-dependencies.sh b/bin/clone-dependencies.sh new file mode 100755 index 0000000..fcf349a --- /dev/null +++ b/bin/clone-dependencies.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# This script clones the dependencies of the BlazingMQ Python SDK that are not +# in a package manager. This script should not be run by users directly, but +# is instead sourced by the `./build-*.sh` scripts in this directory. + + +set -e +set -u +[ -z "$BASH" ] || shopt -s expand_aliases + + +# These are the release tags for each of the dependencies we manually clone. +# Update these to update the version of each dependency we build against. +BDE_TOOLS_TAG=3.124.0.0 +BDE_TAG=3.124.0.0 +NTF_CORE_TAG=latest +BLAZINGMQ_TAG=BMQBRKR_0.90.20 + + +if [ ! -d "${DIR_THIRDPARTY}/bde-tools" ]; then + git clone \ + --depth 1 \ + --branch ${BDE_TOOLS_TAG} \ + https://github.com/bloomberg/bde-tools \ + "${DIR_THIRDPARTY}/bde-tools" +fi + +if [ ! -d "${DIR_THIRDPARTY}/bde" ]; then + git clone \ + --depth 1 \ + --branch ${BDE_TAG} \ + https://github.com/bloomberg/bde.git \ + "${DIR_THIRDPARTY}/bde" +fi + +if [ ! -d "${DIR_THIRDPARTY}/ntf-core" ]; then + git clone \ + --depth 1 \ + --branch ${NTF_CORE_TAG} \ + https://github.com/bloomberg/ntf-core.git \ + "${DIR_THIRDPARTY}/ntf-core" +fi + +if [ ! -d "${DIR_THIRDPARTY}/blazingmq" ]; then + git clone \ + --depth 1 \ + --branch ${BLAZINGMQ_TAG} \ + https://github.com/bloomberg/blazingmq.git \ + "${DIR_THIRDPARTY}/blazingmq" +fi