Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clone-dependencies.sh script #5

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions bin/build-macos-universal.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
pniedzielski marked this conversation as resolved.
Show resolved Hide resolved
popd
touch "${DIR_BUILD}/blazingmq/.complete"
fi
15 changes: 3 additions & 12 deletions bin/build-manylinux.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,16 @@ 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
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"
Expand Down
51 changes: 51 additions & 0 deletions bin/clone-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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
Loading