Merge branch '2.3' into 2.4

This commit is contained in:
Johan Wikman
2019-11-12 08:50:17 +02:00
6 changed files with 59 additions and 19 deletions

View File

@ -5,25 +5,26 @@
set -x
cd ./MaxScale
cpus=$(grep -c processor /proc/cpuinfo)
cd ./MaxScale
mkdir _build
cd _build
cmake .. $cmake_flags
export LD_LIBRARY_PATH=$PWD/log_manager:$PWD/query_classifier
make || exit 1
make -j $cpus || exit 1
if [[ "$cmake_flags" =~ "BUILD_TESTS=Y" ]]
then
# We don't care about memory leaks in the tests (e.g. servers are never freed)
export ASAN_OPTIONS=detect_leaks=0
# All tests must pass otherwise the build is considered a failure
ctest --output-on-failure || exit 1
ctest --output-on-failure -j 100 || exit 1
fi
export LD_LIBRARY_PATH=$(for i in `find $PWD/ -name '*.so*'`; do echo $(dirname $i); done|sort|uniq|xargs|sed -e 's/[[:space:]]/:/g')
make package
make package -j $cpus
res=$?
if [ $res != 0 ] ; then
echo "Make package failed"
@ -35,7 +36,7 @@ sudo rm CMakeCache.txt
echo "Building tarball..."
cmake .. $cmake_flags -DTARBALL=Y
sudo make package
sudo make package -j $cpus
cp _CPack_Packages/Linux/DEB/*.deb ../
@ -57,7 +58,7 @@ then
export LD_LIBRARY_PATH=""
cmake .. $cmake_flags -DTARGET_COMPONENT=$component
export LD_LIBRARY_PATH=$(for i in `find $PWD/ -name '*.so*'`; do echo $(dirname $i); done|sort|uniq|xargs|sed -e 's/[[:space:]]/:/g')
make package
make package -j $cpus
cp _CPack_Packages/Linux/DEB/*.deb ../
cd ..
cp _build/*.deb .
@ -68,7 +69,7 @@ fi
if [ "$BUILD_RABBITMQ" == "yes" ] ; then
cmake ../rabbitmq_consumer/ $cmake_flags
sudo make package
sudo make package -j $cpus
res=$?
if [ $res != 0 ] ; then
exit $res

View File

@ -5,19 +5,21 @@
set -x
cpus=$(grep -c processor /proc/cpuinfo)
cd ./MaxScale
mkdir _build
cd _build
cmake .. $cmake_flags
make || exit 1
make -j $cpus || exit 1
if [[ "$cmake_flags" =~ "BUILD_TESTS=Y" ]]
then
# We don't care about memory leaks in the tests (e.g. servers are never freed)
export ASAN_OPTIONS=detect_leaks=0
# All tests must pass otherwise the build is considered a failure
ctest --output-on-failure || exit 1
ctest --output-on-failure -j 100 || exit 1
# See if docker is installed and run REST API and MaxCtrl tests if it is
command -v docker
@ -41,7 +43,7 @@ sudo rm -rf /usr/bin/strip
sudo touch /usr/bin/strip
sudo chmod a+x /usr/bin/strip
sudo make package
sudo make package -j $cpus
res=$?
if [ $res != 0 ] ; then
echo "Make package failed"
@ -53,7 +55,7 @@ sudo rm CMakeCache.txt
echo "Building tarball..."
cmake .. $cmake_flags -DTARBALL=Y
sudo make package
sudo make package -j $cpus
cd ..
cp _build/*.rpm .
@ -66,7 +68,7 @@ then
cd _build
rm CMakeCache.txt
cmake .. $cmake_flags -DTARGET_COMPONENT=$component
sudo make package
sudo make package -j $cpus
cd ..
cp _build/*.rpm .
cp _build/*.gz .
@ -75,7 +77,7 @@ fi
if [ "$BUILD_RABBITMQ" == "yes" ] ; then
cmake ../rabbitmq_consumer/ $cmake_flags
sudo make package
sudo make package -j $cpus
res=$?
if [ $res != 0 ] ; then
exit $res

View File

@ -6,6 +6,8 @@
# Build in a temp directory so we don't pollute cwd
tmpdir=$(mktemp -d)
cpus=$(grep -c processor /proc/cpuinfo)
cd $tmpdir
command -v apt-get
@ -129,7 +131,7 @@ if [ "`echo -e "3.7.1\n$cmake_version"|sort -V|head -n 1`" != "3.7.1" ] ; then
cd cmake-3.7.1
./bootstrap
gmake
make -j $cpus
sudo make install
cd ..
fi
@ -149,7 +151,7 @@ fi
cd rabbitmq-c
git checkout v0.7.1
cmake . -DCMAKE_C_FLAGS=-fPIC -DBUILD_SHARED_LIBS=N -DCMAKE_INSTALL_PREFIX=/usr
sudo make install
sudo make install -j $cpus
cd ../../
# TCL
@ -178,7 +180,7 @@ then
tar xzf tcl8.6.5-src.tar.gz
cd tcl8.6.5/unix
./configure
sudo make install
sudo make install -j $cpus
cd ../../..
fi
@ -196,7 +198,7 @@ git checkout v2.9
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DJANSSON_INSTALL_LIB_DIR=$install_libdir
make
make -j $cpus
sudo make install
cd ../../
@ -216,7 +218,7 @@ pushd $avro_dir/build
# Make sure the library isn't linked against snappy
sed -i 's/find_package(Snappy)//' ../lang/c/CMakeLists.txt
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC
make
make -j $cpus
sudo make install
popd