You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
bootstrap script openSUSE support removed, compression library install added
force running unittests on build, with options to skip it
This commit is contained in:
committed by
Andrey Piskunov
parent
54ef54fb22
commit
ef8337fd60
@ -5,13 +5,11 @@
|
|||||||
# - the script is to be run under root.
|
# - the script is to be run under root.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SCRIPT_LOCATION=$(dirname "$0")
|
SCRIPT_LOCATION=$(dirname "$0")
|
||||||
MDB_SOURCE_PATH=$(realpath $SCRIPT_LOCATION/../../../..)
|
MDB_SOURCE_PATH=$(realpath $SCRIPT_LOCATION/../../../..)
|
||||||
|
|
||||||
source $SCRIPT_LOCATION/utils.sh
|
source $SCRIPT_LOCATION/utils.sh
|
||||||
|
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
if [ "$EUID" -ne 0 ]
|
||||||
then error "Please run script as root to install MariaDb to system paths"
|
then error "Please run script as root to install MariaDb to system paths"
|
||||||
exit 1
|
exit 1
|
||||||
@ -20,7 +18,7 @@ fi
|
|||||||
message "Building Mariadb Server from $color_yellow$MDB_SOURCE_PATH$color_normal"
|
message "Building Mariadb Server from $color_yellow$MDB_SOURCE_PATH$color_normal"
|
||||||
|
|
||||||
BUILD_TYPE_OPTIONS=("Debug" "RelWithDebInfo")
|
BUILD_TYPE_OPTIONS=("Debug" "RelWithDebInfo")
|
||||||
DISTRO_OPTIONS=("Ubuntu" "CentOS" "Debian" "openSUSE" "Rocky")
|
DISTRO_OPTIONS=("Ubuntu" "CentOS" "Debian" "Rocky")
|
||||||
BRANCHES=($(git branch --list --no-color| grep "[^* ]+" -Eo))
|
BRANCHES=($(git branch --list --no-color| grep "[^* ]+" -Eo))
|
||||||
|
|
||||||
optparse.define short=t long=build-type desc="Build Type: ${BUILD_TYPE_OPTIONS[*]}" variable=MCS_BUILD_TYPE
|
optparse.define short=t long=build-type desc="Build Type: ${BUILD_TYPE_OPTIONS[*]}" variable=MCS_BUILD_TYPE
|
||||||
@ -28,6 +26,7 @@ optparse.define short=d long=distro desc="Choouse your OS: ${DISTRO_OPTIONS[*]}"
|
|||||||
optparse.define short=s long=skip-deps desc="Skip install dependences" variable=SKIP_DEPS default=false value=true
|
optparse.define short=s long=skip-deps desc="Skip install dependences" variable=SKIP_DEPS default=false value=true
|
||||||
optparse.define short=C long=force-cmake-reconfig desc="Force cmake reconfigure" variable=FORCE_CMAKE_CONFIG default=false value=true
|
optparse.define short=C long=force-cmake-reconfig desc="Force cmake reconfigure" variable=FORCE_CMAKE_CONFIG default=false value=true
|
||||||
optparse.define short=S long=skip-columnstore-submodules desc="Skip columnstore submodules initialization" variable=SKIP_SUBMODULES default=false value=true
|
optparse.define short=S long=skip-columnstore-submodules desc="Skip columnstore submodules initialization" variable=SKIP_SUBMODULES default=false value=true
|
||||||
|
optparse.define short=u long=skip-unit-tests desc="Skip UnitTests" variable=SKIP_UNIT_TESTS default=false value=true
|
||||||
optparse.define short=b long=branch desc="Choouse git branch ('none' for menu)" variable=BRANCH
|
optparse.define short=b long=branch desc="Choouse git branch ('none' for menu)" variable=BRANCH
|
||||||
|
|
||||||
source $( optparse.build )
|
source $( optparse.build )
|
||||||
@ -73,17 +72,20 @@ install_deps()
|
|||||||
{
|
{
|
||||||
message "Installing deps"
|
message "Installing deps"
|
||||||
if [[ $OS = 'Ubuntu' || $OS = 'Debian' ]]; then
|
if [[ $OS = 'Ubuntu' || $OS = 'Debian' ]]; then
|
||||||
sudo apt-get -y update
|
apt-get -y update
|
||||||
apt-get -y install build-essential automake libboost-all-dev bison cmake \
|
apt-get -y install build-essential automake libboost-all-dev bison cmake \
|
||||||
libncurses5-dev libaio-dev libsystemd-dev libpcre2-dev \
|
libncurses5-dev libaio-dev libsystemd-dev libpcre2-dev \
|
||||||
libperl-dev libssl-dev libxml2-dev libkrb5-dev flex libpam-dev git \
|
libperl-dev libssl-dev libxml2-dev libkrb5-dev flex libpam-dev git \
|
||||||
libsnappy-dev libcurl4-openssl-dev libgtest-dev libcppunit-dev googletest libsnappy-dev libjemalloc-dev
|
libsnappy-dev libcurl4-openssl-dev libgtest-dev libcppunit-dev googletest libsnappy-dev libjemalloc-dev \
|
||||||
|
liblz-dev liblzo2-dev liblzma-dev liblz4-dev libbz2-dev
|
||||||
|
|
||||||
elif [[ $OS = 'CentOS' || $OS = 'Rocky' ]]; then
|
elif [[ $OS = 'CentOS' || $OS = 'Rocky' ]]; then
|
||||||
yum -y install epel-release \
|
yum -y install epel-release \
|
||||||
&& yum -y groupinstall "Development Tools" \
|
&& yum -y groupinstall "Development Tools" \
|
||||||
&& yum config-manager --set-enabled powertools \
|
&& yum config-manager --set-enabled powertools \
|
||||||
&& yum -y install bison ncurses-devel readline-devel perl-devel openssl-devel libxml2-devel gperf libaio-devel libevent-devel tree wget pam-devel snappy-devel libicu \
|
&& yum -y install bison ncurses-devel readline-devel perl-devel openssl-devel libxml2-devel gperf libaio-devel libevent-devel tree wget pam-devel snappy-devel libicu \
|
||||||
&& yum -y install vim wget strace ltrace gdb rsyslog net-tools openssh-server expect boost perl-DBI libicu boost-devel initscripts jemalloc-devel libcurl-devel gtest-devel cppunit-devel systemd-devel
|
&& yum -y install vim wget strace ltrace gdb rsyslog net-tools openssh-server expect boost perl-DBI libicu boost-devel initscripts jemalloc-devel libcurl-devel gtest-devel cppunit-devel systemd-devel \ && yum -y install lzo-devel xz-devel lz4-devel bzip2-devel
|
||||||
|
|
||||||
if [[ "$OS_VERSION" == "7" ]]; then
|
if [[ "$OS_VERSION" == "7" ]]; then
|
||||||
yum -y install cmake3
|
yum -y install cmake3
|
||||||
CMAKE_BIN_NAME=cmake3
|
CMAKE_BIN_NAME=cmake3
|
||||||
@ -93,12 +95,6 @@ install_deps()
|
|||||||
if [ $OS = 'Rocky' ]; then
|
if [ $OS = 'Rocky' ]; then
|
||||||
yum install -y checkpolicy
|
yum install -y checkpolicy
|
||||||
fi
|
fi
|
||||||
elif [ $OS = 'openSUSE' ]; then
|
|
||||||
zypper install -y bison ncurses-devel readline-devel libopenssl-devel cmake libxml2-devel gperf libaio-devel libevent-devel python-devel ruby-devel tree wget pam-devel snappy-devel libicu-devel \
|
|
||||||
&& zypper install -y libboost_system-devel libboost_filesystem-devel libboost_thread-devel libboost_regex-devel libboost_date_time-devel libboost_chrono-devel libboost_atomic-devel \
|
|
||||||
&& zypper install -y vim wget strace ltrace gdb rsyslog net-tools expect perl-DBI libicu boost-devel jemalloc-devel libcurl-devel liblz4-devel lz4 \
|
|
||||||
&& zypper install -y gcc gcc-c++ git automake libtool gtest cppunit-devel pcre2-devel systemd-devel libaio-devel snappy-devel cracklib-devel policycoreutils-devel ncurses-devel \
|
|
||||||
&& zypper install -y make flex libcurl-devel automake libtool rpm-build lsof iproute pam-devel perl-DBI expect createrepo
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +201,6 @@ build()
|
|||||||
cd -
|
cd -
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
check_user_and_group()
|
check_user_and_group()
|
||||||
{
|
{
|
||||||
if [ -z "$(grep mysql /etc/passwd)" ]; then
|
if [ -z "$(grep mysql /etc/passwd)" ]; then
|
||||||
@ -220,6 +215,18 @@ check_user_and_group()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_unit_tests()
|
||||||
|
{
|
||||||
|
if [[ $SKIP_UNIT_TESTS = true ]] ; then
|
||||||
|
warn "Skipping unittests"
|
||||||
|
else
|
||||||
|
message "Running unittests"
|
||||||
|
cd $MDB_SOURCE_PATH
|
||||||
|
ctest . -R columnstore: -j $(nproc)
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
install()
|
install()
|
||||||
{
|
{
|
||||||
message "Installing MariaDB"
|
message "Installing MariaDB"
|
||||||
@ -289,7 +296,6 @@ socket=/run/mysqld/mysqld.sock" > /etc/my.cnf.d/socket.cnf'
|
|||||||
chmod 777 /var/log/mariadb/columnstore
|
chmod 777 /var/log/mariadb/columnstore
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
select_branch
|
select_branch
|
||||||
|
|
||||||
if [[ $SKIP_DEPS = false ]] ; then
|
if [[ $SKIP_DEPS = false ]] ; then
|
||||||
@ -299,6 +305,7 @@ fi
|
|||||||
stop_service
|
stop_service
|
||||||
clean_old_installation
|
clean_old_installation
|
||||||
build
|
build
|
||||||
|
run_unit_tests
|
||||||
install
|
install
|
||||||
start_service
|
start_service
|
||||||
message "$color_green FINISHED $color_normal"
|
message "$color_green FINISHED $color_normal"
|
||||||
|
Reference in New Issue
Block a user