2016-06-22 11:42:04 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-07-31 21:04:15 -07:00
|
|
|
set -x
|
|
|
|
|
2016-11-02 20:56:25 -07:00
|
|
|
# Cause the script to exit if a single command fails.
|
|
|
|
set -e
|
|
|
|
|
2016-06-22 11:42:04 -07:00
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
|
|
|
|
2017-07-31 21:04:15 -07:00
|
|
|
if [[ -z "$1" ]]; then
|
|
|
|
PYTHON_EXECUTABLE=`which python`
|
|
|
|
else
|
|
|
|
PYTHON_EXECUTABLE=$1
|
|
|
|
fi
|
|
|
|
echo "Using Python executable $PYTHON_EXECUTABLE."
|
|
|
|
|
2018-03-01 14:29:56 -08:00
|
|
|
bash $ROOT_DIR/setup_thirdparty.sh $PYTHON_EXECUTABLE
|
|
|
|
|
2016-06-25 14:02:33 -07:00
|
|
|
# Determine how many parallel jobs to use for make based on the number of cores
|
|
|
|
unamestr="$(uname)"
|
|
|
|
if [[ "$unamestr" == "Linux" ]]; then
|
|
|
|
PARALLEL=$(nproc)
|
|
|
|
elif [[ "$unamestr" == "Darwin" ]]; then
|
|
|
|
PARALLEL=$(sysctl -n hw.ncpu)
|
|
|
|
else
|
|
|
|
echo "Unrecognized platform."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-01-11 11:09:01 -08:00
|
|
|
# Now we build everything.
|
2017-03-01 23:34:44 -08:00
|
|
|
pushd "$ROOT_DIR/python/ray/core"
|
2017-07-31 21:04:15 -07:00
|
|
|
# We use these variables to set PKG_CONFIG_PATH, which is important so that
|
|
|
|
# in cmake, pkg-config can find plasma.
|
2018-03-01 14:29:56 -08:00
|
|
|
TP_PKG_DIR=$ROOT_DIR/thirdparty/pkg
|
|
|
|
ARROW_HOME=$TP_PKG_DIR/arrow/cpp/build/cpp-install
|
2017-08-07 14:47:34 -07:00
|
|
|
if [[ "$VALGRIND" = "1" ]]; then
|
2018-03-01 14:29:56 -08:00
|
|
|
BOOST_ROOT=$TP_PKG_DIR/boost \
|
2017-08-07 14:47:34 -07:00
|
|
|
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
2017-08-21 17:49:35 -07:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug \
|
2018-01-31 11:01:12 -08:00
|
|
|
-DRAY_USE_NEW_GCS=$RAY_USE_NEW_GCS \
|
2017-08-21 17:49:35 -07:00
|
|
|
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_EXECUTABLE \
|
|
|
|
../../..
|
2017-03-05 02:05:02 -08:00
|
|
|
else
|
2018-03-01 14:29:56 -08:00
|
|
|
BOOST_ROOT=$TP_PKG_DIR/boost \
|
2017-08-07 14:47:34 -07:00
|
|
|
PKG_CONFIG_PATH=$ARROW_HOME/lib/pkgconfig \
|
2017-08-21 17:49:35 -07:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
2018-01-31 11:01:12 -08:00
|
|
|
-DRAY_USE_NEW_GCS=$RAY_USE_NEW_GCS \
|
2017-08-21 17:49:35 -07:00
|
|
|
-DPYTHON_EXECUTABLE:FILEPATH=$PYTHON_EXECUTABLE \
|
|
|
|
../../..
|
2017-03-05 02:05:02 -08:00
|
|
|
fi
|
2017-01-17 16:56:40 -08:00
|
|
|
make clean
|
2017-03-27 20:55:50 -07:00
|
|
|
make -j${PARALLEL}
|
2016-11-18 19:57:51 -08:00
|
|
|
popd
|
2017-07-31 21:04:15 -07:00
|
|
|
|
|
|
|
# Move stuff from Arrow to Ray.
|
2018-03-01 14:29:56 -08:00
|
|
|
cp $ROOT_DIR/thirdparty/pkg/arrow/cpp/build/cpp-install/bin/plasma_store $ROOT_DIR/python/ray/core/src/plasma/
|