core: add Travis CI builds with Python 3 and without GnuTLS

v2.8-utf8proc
Sébastien Helleu 2014-11-08 14:02:30 +01:00
parent cde0aa2a4d
commit 2f7dbd746e
2 changed files with 25 additions and 6 deletions

View File

@ -5,13 +5,17 @@ compiler:
- clang
env:
- BUILDTOOL=cmake
- BUILDTOOL=autotools
- BUILDTOOL="cmake" BUILDARGS=""
- BUILDTOOL="cmake" BUILDARGS="-DENABLE_PYTHON3=ON"
- BUILDTOOL="cmake" BUILDARGS="-DENABLE_GNUTLS=OFF"
- BUILDTOOL="autotools" BUILDARGS=""
- BUILDTOOL="autotools" BUILDARGS="--enable-python3"
- BUILDTOOL="autotools" BUILDARGS="--disable-gnutls"
before_script:
- echo 'APT::Install-Recommends "false";' | sudo tee -a /etc/apt/apt.conf
- sudo apt-get update -qq
- sudo apt-get -y install devscripts equivs python-pip libenchant-dev autopoint asciidoc source-highlight xsltproc docbook-xsl docbook-xml cmake pkg-config libncursesw5-dev gem2deb libperl-dev python-dev libaspell-dev liblua5.1-0-dev tcl8.5-dev guile-2.0-dev libcurl4-gnutls-dev libgcrypt11-dev libgnutls-dev zlib1g-dev
- sudo apt-get -y install devscripts equivs python-pip libenchant-dev autopoint asciidoc source-highlight xsltproc docbook-xsl docbook-xml cmake pkg-config libncursesw5-dev gem2deb libperl-dev python-dev python3-dev libaspell-dev liblua5.1-0-dev tcl8.5-dev guile-2.0-dev libcurl4-gnutls-dev libgcrypt11-dev libgnutls-dev zlib1g-dev
- wget http://weechat.org/files/tests/ubuntu/precise/amd64/libcpputest-dev_3.4-3_amd64.deb
- sudo dpkg -i libcpputest-dev_3.4-3_amd64.deb
- sudo pip install msgcheck pylint

View File

@ -21,6 +21,16 @@
#
# Build WeeChat with CMake or autotools, according to environment variable
# $BUILDTOOL or first script argument (if given).
# The optional variable $BUILDARGS can be set with arguments for cmake or
# configure commands.
#
# Syntax to run the script with environment variables:
# BUILDTOOL=cmake|autotools ./build.sh
# BUILDTOOL=cmake|autotools BUILDARGS="arguments" ./build.sh
#
# Syntax to run the script with arguments on command line:
# ./build.sh cmake|autotools
# ./build.sh cmake|autotools arguments
#
# This script is used to build WeeChat in Travis CI environment.
#
@ -38,7 +48,12 @@ run ()
BUILDDIR="build-tmp-$$"
if [ $# -ge 1 ]; then
BUILDTOOL=$1
BUILDTOOL="$1"
shift
fi
if [ $# -ge 1 ]; then
BUILDARGS="$*"
fi
if [ -z "$BUILDTOOL" ]; then
@ -52,7 +67,7 @@ run "cd $BUILDDIR"
if [ "$BUILDTOOL" = "cmake" ]; then
# build with CMake
run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON"
run "cmake .. -DENABLE_MAN=ON -DENABLE_DOC=ON -DENABLE_TESTS=ON ${BUILDARGS}"
run "make VERBOSE=1 -j$(nproc)"
run "sudo make install"
run "ctest -V"
@ -61,7 +76,7 @@ fi
if [ "$BUILDTOOL" = "autotools" ]; then
# build with autotools
run "../autogen.sh"
run "../configure --enable-man --enable-doc --enable-tests"
run "../configure --enable-man --enable-doc --enable-tests ${BUILDARGS}"
run "make -j$(nproc)"
run "sudo make install"
run "./tests/tests -v"