diff --git a/.travis.yml b/.travis.yml index f80ec2a8f..c744b7271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,39 @@ +os: + - linux + - osx +# TODO: osx must manually request http://docs.travis-ci.com/user/multi-os/ language: cpp compiler: - clang cache: apt install: true env: - - FFMPEG=ffmpeg-2.2.5 + global: + - LANG="en_US.UTF-8" + matrix: + - QT=4.8.6 AV=ffmpeg-1.0.10 + - QT=5.0.2 AV=ffmpeg-1.2.10 + - QT=5.1.1 AV=ffmpeg-2.0.6 + - QT=5.2.1 AV=ffmpeg-2.2.11 +# - QT=5.3.1 AV=ffmpeg-2.4.4 + allow_failures: + - os: osx + branches: only: - master + - prelease - ci -before_script: - - sudo apt-get update -qq - - sudo apt-get install -qq -y portaudio19-dev libopenal-dev libva-dev libass-dev libxv-dev parallel +git: + submodules: true + +install: . tools/ci/$TRAVIS_OS_NAME/install.sh + script: - - ./tools/ci/travis_build.sh $FFMPEG + - ./tools/ci/$TRAVIS_OS_NAME/script.sh +after_success: ./tools/ci/$TRAVIS_OS_NAME/after_success.sh + notifications: irc: channels: @@ -24,7 +43,3 @@ notifications: - wbsecg1@gmail.com on_success: change on_failure: always -env: - - LANG="en_US.UTF-8" -os: - - linux diff --git a/tools/ci/after_success.sh b/tools/ci/after_success.sh new file mode 100755 index 000000000..be1d7d2e7 --- /dev/null +++ b/tools/ci/after_success.sh @@ -0,0 +1,25 @@ +set -ev + +# download ifw for linux, mingw + +# upload packages + +# TRAVIS_TAG +echo TRAVIS_TAG=$TRAVIS_TAG + +PKG=$QTAV_OUT-$TRAVIS_JOB_NUMBER.tar.xz +tar Jcvf $PKG $QTAV_OUT/{bin,lib*,build.log} + +wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz/download -O sshpass.tar.gz +tar zxf sshpass.tar.gz +cd sshpass-1.05 +./configure +make +sudo make install +export PATH=$PWD:$PATH +cd $TRAVIS_BUILD_DIR +type -a sshpass +# ignore known hosts: -o StrictHostKeyChecking=no +sshpass -p $SF_PWD scp -o StrictHostKeyChecking=no $PKG $SF_USER@frs.sourceforge.net:/home/frs/project/qtav/ci +#rsync --password-file=$PWF -avP -e ssh $PKG $SF_USER@frs.sourceforge.net:/home/frs/project/qtav/ci/ +#curl -H "Accept: application/json" -X PUT -d "default=linux&default=bsd&default=solaris" -d "api_key=$SF_API_KEY" https://sourceforge.net/projects/qtav/files/ci/$PKG diff --git a/tools/ci/linux/after_success.sh b/tools/ci/linux/after_success.sh new file mode 120000 index 000000000..16b617d80 --- /dev/null +++ b/tools/ci/linux/after_success.sh @@ -0,0 +1 @@ +../after_success.sh \ No newline at end of file diff --git a/tools/ci/linux/install.sh b/tools/ci/linux/install.sh new file mode 100755 index 000000000..e36f52510 --- /dev/null +++ b/tools/ci/linux/install.sh @@ -0,0 +1,22 @@ +set -ev +sudo apt-get update -qq +sudo apt-get install -qq -y portaudio19-dev libpulse-dev libopenal-dev libva-dev libass-dev libxv-dev parallel +# TODO: do not use apt, use the latest code instead + +wget http://sourceforge.net/projects/qtav/files/depends/FFmpeg/linux/${AV}-linux-x86+x64.tar.xz/download -O ${AV}-linux-x86+x64.tar.xz +tar Jxf ${AV}-linux-x86+x64.tar.xz + + +wget http://sourceforge.net/projects/buildqt/files/lite/Qt${QT}-Linux64.tar.xz/download -O Qt${QT}-Linux64.tar.xz +tar -I xz -xf Qt${QT}-Linux64.tar.xz + +export FFMPEG_DIR=$PWD/${AV}-linux-x86+x64 +export PATH=$PWD/Qt${QT}-Linux64/bin:$PATH +export CPATH=$FFMPEG_DIR/include +export LIBRARY_PATH=$FFMPEG_DIR/lib/x64 +export LD_LIBRARY_PATH=$FFMPEG_DIR/lib/x64 +export QTAV_OUT=QtAV-${TRAVIS_OS_NAME}-${TRAVIS_COMMIT:0:7} +mkdir -p $QTAV_OUT + +#if [ "$TRAVIS_BRANCH" == "prelease" ]; then +#linux diff --git a/tools/ci/linux/script.sh b/tools/ci/linux/script.sh new file mode 100755 index 000000000..19fabcd4b --- /dev/null +++ b/tools/ci/linux/script.sh @@ -0,0 +1,21 @@ +set -ev + +echo "$TRAVIS_BUILD_DIR" + +tail -n 27 /proc/cpuinfo +uname -a +cat /etc/issue + +echo "QtAV build script for travis-ci" + +jobs=`cat /proc/cpuinfo |grep 'cpu cores' |wc -l` + + +cd $QTAV_OUT + +rm -f build.log +type -a moc +qmake -r $TRAVIS_BUILD_DIR -spec linux-clang "CONFIG+=recheck" +make -j$jobs 2>&1 |tee build.log + +cd $TRAVIS_BUILD_DIR diff --git a/tools/ci/osx/after_success.sh b/tools/ci/osx/after_success.sh new file mode 100755 index 000000000..a93443610 --- /dev/null +++ b/tools/ci/osx/after_success.sh @@ -0,0 +1,20 @@ +cd tools +git clone https://github.com/andreyvit/create-dmg.git + +./deploy_osx.sh $QTAV_OUT + + +PKG=QtAV-QMLPlayer-$TRAVIS_JOB_NUMBER.tar.xz +mv QMLPlayer.dmg $PKG + +wget http://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz/download -O sshpass.tar.gz +tar zxf sshpass.tar.gz +cd sshpass-1.05 +./configure +make +sudo make install +export PATH=$PWD:$PATH +cd $TRAVIS_BUILD_DIR +type -a sshpass +# ignore known hosts: -o StrictHostKeyChecking=no +sshpass -p $SF_PWD scp -o StrictHostKeyChecking=no $PKG $SF_USER@frs.sourceforge.net:/home/frs/project/qtav/ci diff --git a/tools/ci/osx/install.sh b/tools/ci/osx/install.sh new file mode 100755 index 000000000..ac82af937 --- /dev/null +++ b/tools/ci/osx/install.sh @@ -0,0 +1,14 @@ +FFVER=2.6.2 +test -f ffmpeg-${FFVER}-OSX.tar.xz || wget http://sourceforge.net/projects/qtav/files/depends/FFmpeg/OSX/ffmpeg-${FFVER}-OSX.tar.xz/download -O ffmpeg-${FFVER}-OSX.tar.xz +tar Jxf ffmpeg-${FFVER}-OSX.tar.xz + +export FFMPEG_DIR=$PWD/ffmpeg-${FFVER}-OSX +export CPATH=$FFMPEG_DIR/include +export LIBRARY_PATH=$FFMPEG_DIR/lib/x64 +export LD_LIBRARY_PATH=$FFMPEG_DIR/lib/x64 + +# TODO: download qt +brew update +brew install qt5 + +#export QTDIR diff --git a/tools/ci/osx/script.sh b/tools/ci/osx/script.sh new file mode 100755 index 000000000..f7f6d693f --- /dev/null +++ b/tools/ci/osx/script.sh @@ -0,0 +1,21 @@ +set -ev + +echo "$TRAVIS_BUILD_DIR" + +tail -n 27 /proc/cpuinfo +uname -a +cat /etc/issue + +echo "QtAV build script for travis-ci" + +jobs=`sysctl -n hw.ncpu` + + +cd $QTAV_OUT + +rm -f build.log +type -a moc +qmake -r $TRAVIS_BUILD_DIR -spec linux-clang "CONFIG+=recheck" +make -j$jobs 2>&1 |tee build.log + +cd $TRAVIS_BUILD_DIR diff --git a/tools/ci/travis_build.sh b/tools/ci/travis_build.sh index 81aba793e..bf698f69d 100755 --- a/tools/ci/travis_build.sh +++ b/tools/ci/travis_build.sh @@ -6,6 +6,8 @@ # - sudo add-apt-repository ppa:wsnipex/vaapi set -ev +echo "$TRAVIS_BUILD_DIR" + tail -n 27 /proc/cpuinfo uname -a cat /etc/issue diff --git a/tools/deploy_osx.sh b/tools/deploy_osx.sh index f3eac434f..97e75309f 100755 --- a/tools/deploy_osx.sh +++ b/tools/deploy_osx.sh @@ -104,7 +104,7 @@ Plugins = PlugIns Qml2Imports = Resources/qml EOF cd - - test -f ./yoursway-create-dmg/create-dmg && ./yoursway-create-dmg/create-dmg --window-size 500 300 --icon-size 96 --volname "QtAV $APP" --app-drop-link 240 200 QtAV-$APP.dmg $BUILD_DIR/bin/${APP}.app & + test -f ./create-dmg/create-dmg && ./create-dmg/create-dmg --window-size 500 300 --icon-size 96 --volname "QtAV $APP" --app-drop-link 240 200 QtAV-$APP.dmg $BUILD_DIR/bin/${APP}.app & } deploy player