maint: import build script for continuous integration

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2015-10-18 14:10:11 +02:00
parent 5075494e42
commit 652e97303d

89
maint/utils/travis-build.sh Executable file
View File

@ -0,0 +1,89 @@
#!/bin/bash
#
# Midnight Commander - build and test common configurations
#
# Copyright (C) 2015
# The Free Software Foundation, Inc.
#
# Written by:
# Slava Zanko <slavazanko@gmail.com>, 2015
# Yury V. Zaytsev <yury@shurup.com>, 2015
#
# This file is part of the Midnight Commander.
#
# The Midnight Commander is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The Midnight Commander is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
set -x
function do_build() {
make
make check
make install
}
# Build default configuration (S-Lang)
mkdir -p build-default && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--with-screen=slang \
--enable-maintainer-mode \
--enable-mclib \
--enable-charset \
--enable-tests \
--enable-werror
do_build
popd
# Build default configuration (ncurses)
mkdir -p build-ncurses && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--with-screen=ncurses \
--enable-maintainer-mode \
--enable-mclib \
--enable-charset \
--enable-tests \
--enable-werror
do_build
popd
# Build all disabled
mkdir -p build-all-disabled && pushd $_
../configure \
--prefix="$(pwd)/INSTALL_ROOT" \
--disable-maintainer-mode \
--disable-mclib \
--disable-charset \
--disable-largefile \
--disable-nls \
--disable-vfs \
--disable-background \
--without-mmap \
--without-x \
--without-gpm-mouse \
--without-subshell \
--enable-tests \
--enable-werror
do_build
popd