Add matrix to the .travis.yml file

This commit is contained in:
mastertheknife 2013-09-28 13:04:41 +03:00
parent 48f11a8064
commit db48a3d8fb
1 changed files with 16 additions and 13 deletions

View File

@ -9,15 +9,19 @@ env:
- LD_LIBRARY_PATH="/usr/local/lib:/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH"
- DEB_HOST_GNU_TYPE=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
- DEB_BUILD_GNU_TYPE=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE)
- CXXFLAGS=" -DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO -msse2 -I/usr/local/include"
- CFLAGS="-DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO -I/usr/local/include"
- CXXFLAGS="$CFLAGS"
matrix:
- ZM_BUILDMETHOD=cmake
- ZM_BUILDMETHOD=autotools
compiler:
- gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get upgrade -y -qq
- sudo apt-get install -y -qq apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf libjpeg-turbo8-dev libjpeg-turbo8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev 2>&1 > /dev/null
- sudo apt-get install -y -qq apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf cmake libjpeg-turbo8-dev libjpeg-turbo8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev
install:
- git clone --depth=10 --branch=master git://source.ffmpeg.org/ffmpeg.git
- git clone git://source.ffmpeg.org/ffmpeg.git
- cd ffmpeg
- ./configure --enable-shared --enable-swscale --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-libtheora
- make -j `grep processor /proc/cpuinfo|wc -l`
@ -25,17 +29,16 @@ install:
- sudo make install-libs
before_script:
- cd $TRAVIS_BUILD_DIR
- libtoolize --force
- aclocal
- autoheader
- automake --force-missing --add-missing
- autoconf
- mysql -e 'create database zm;'
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then libtoolize --force; fi
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then aclocal; fi
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi
script:
- CXXFLAGS="$CXXFLAGS" ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes ZM_SSL_LIB=openssl ZM_DB_USER=travis ZM_DB_PASS='' ZM_DB_NAME=zm
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then ./configure --prefix=/usr --with-libarch=lib/$DEB_HOST_GNU_TYPE --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-ffmpeg=/usr --with-webdir=/usr/share/zoneminder/www --with-cgidir=/usr/libexec/zoneminder/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=yes --disable-debug --enable-mmap=yes ZM_SSL_LIB=openssl ZM_DB_USER="travis" ZM_DB_PASS=""; fi
- if [ "$ZM_BUILDMETHOD" = "cmake" ]; then cmake -DCMAKE_INSTALL_PREFIX="/usr" -DZM_DB_USER="travis" -DZM_DB_PASS=""; fi
- make
- sed -i 's/zmpass//' zm.conf
- sudo make install
after_success:
- mysql -u travis < db/zm_create.sql
- mysql -u travis zm < db/test.monitor.sql
- sudo zmpkg.pl start
- if [ "$ZM_BUILDMETHOD" = "cmake" ]; then sudo ./zmlinkcontent.sh; fi