From c8d1c60bd812e5535acb2d81d775ed99ab75f798 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 3 Feb 2015 14:42:37 +0100 Subject: [PATCH] This should improve travis build speed --- .travis.yml | 27 ++++-------------- scripts/prepare_travis.sh | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 21 deletions(-) create mode 100755 scripts/prepare_travis.sh diff --git a/.travis.yml b/.travis.yml index b368a08d..1b0bef56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,35 +1,20 @@ language: python +#New container architecture +#http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +#sudo: false + python: - "3.3" - "3.4" cache: + apt: true directories: - build before_install: - - mkdir -p build - - sudo apt-get install -qqm wget build-essential python3-dev - - sudo apt-get install -qqm python3-pyqt4 python3-sip-dev - # install SIP - - cd build - - wget --quiet --output-document=sip.tar.gz http://downloads.sourceforge.net/project/pyqt/sip/sip-4.16.6/sip-4.16.5.tar.gz - - tar -xf sip.tar.gz - - cd sip-4.16.5 - - python -B configure.py - - make - - sudo make install - # install PyQt - - cd $TRAVIS_BUILD_DIR/build - - wget --quiet --output-document=pyqt.tar.gz http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz - - tar -xf pyqt.tar.gz - - cd PyQt-x11-gpl-4.11.3 - - python -B configure.py --confirm-license - - make - - sudo make install - - python -c 'import PyQt4' # Check if it's ok - - cd $TRAVIS_BUILD_DIR + - sh scripts/prepare_travis.sh notifications: email: diff --git a/scripts/prepare_travis.sh b/scripts/prepare_travis.sh new file mode 100755 index 00000000..023795ef --- /dev/null +++ b/scripts/prepare_travis.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Copyright (C) 2015 GNS3 Technologies Inc. +# +# This program 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. +# +# This program 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 . + + +set -e + +SIP=4.16.5 +PYQT=4.11.3 + +echo "Install sip $SIP and PyQT $PYQT" + +mkdir -p build +cd build + +# install SIP +if [ ! -d "sip-${SIP}" ] +then + wget --quiet --output-document=sip.tar.gz "http://downloads.sourceforge.net/project/pyqt/sip/sip-${SIP}/sip-${SIP}.tar.gz" + tar -xf sip.tar.gz + cd "sip-${SIP}" + python -B configure.py + make + cd .. +fi + +cd "sip-${SIP}" +sudo make install + +# install PyQt +if [ ! -d "PyQt-x11-gpl-${PYQT}" ] +then + wget --quiet --output-document=pyqt.tar.gz "http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-${PYQT}/PyQt-x11-gpl-${PYQT}.tar.gz" + tar -xf pyqt.tar.gz + cd "PyQt-x11-gpl-${PYQT}" + python -B configure.py --confirm-license + make + cd .. +fi + +cd PyQt-x11-gpl-${PYQT} +sudo make install + +python -c 'import PyQt4' # Check if it's ok +