Installing Qt 5.4 dev packages in Travis CI



  • I want to set up CI for my project that uses Qt 5.4, so I need some ppa for Ubuntu 12.04 with dev packages, or some way to install the SDK without human intervention.

    See http://docs.travis-ci.com/user/build-configuration/ for more info on Travis.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Do you mean what's described "here":http://docs.travis-ci.com/user/installing-dependencies/ ?



  • Thanks :)

    Yes, that's exactly it.


  • Lifetime Qt Champion

    You're welcome !

    Since you have Travis running, please update the thread title prepending [solved] so other forum users may know a solution has been found :)



  • By "that's exactly it", I meant "that are the docs that describe installing deps on Travis". I know how to set up Travis, my problem is that I don't have Qt 5.4 dev packages. The ubuntu ppa I found so far has only Qt 5.0, and the SDK installer requires that you click on some buttons, making it unsuitable for this.

    Sorry for the misunderstanding, I didn't realize how my answer would be interpreted.


  • Lifetime Qt Champion

    In that case why not just use git to clone Qt's repositories ?



  • Yes, I could clone Qt and compile it in Travis, but that would make the CI jobs very slow and CPU intensive. Travis doesn't keep state between builds, so it would have to be compiled every time.

    I could perhaps also create my own packages, but that would take a lot of time on my part, and I'm not sure if it's worth it. Are there really no existing dev packages for 5.4?


  • Lifetime Qt Champion

    Maybe talking with the responsible of "this":https://launchpad.net/~beineri/+archive/ubuntu/opt-qt54-trusty might help



  • Are there any news on this topic? I'd also need Qt 5.4 on Travis. ^_^



  • This seems to be stuck on multiple fronts:

    1. Ubuntu precise lacks the packages, there are a couple of ppa: flying around e.g. ubuntu-sdk-tem
    2. Keep in mind that the current ppa/packages need to be whitelisted to work in the new Travis container infrastructure (here) - added a request please add more for missing qt development packages
    3. Sadly the Qt installers dont work for a headless installation yet - but this is essential for deployment in Windows continuous integration systems.
    • Travis supports OSX, how do we deploy there? No building is no an option.

    True we can just tar an existing installation and host somewhere for CI deployments. But I kind of miss having tarballs of the Qt releases :)



  • Just in case anyone is interested semaphoreci.com is a Travis alternative that runs Ubuntu 14.04, that should make it easier to find PPA sources for Qt 5.4.



  • I just came across this thread while searching some updated information on Travis CI + Qt 5.5. Anyway, because I already use Travis CI + Qt on Linux and OS X, I thought I would share my experience...

    Linux: Travis CI still uses Ubuntu 12.04 LTS (rather than Ubuntu 14.04 LTS, which is what I would have expected and liked to see). Regarding Qt, the only ppa I have found is for Qt 5.4.1 (see here. Unfortunately (although understandably), Stephan Binner, the author of the ppa, doesn't seem to provide newer versions of Qt for Ubuntu 12.04 LTS (as can be seen here), so we are effectively limited to Qt 5.4.1 on Linux on Travis CI.

    OS X: I personally use brew to install whatever version of Qt 5.x that is supported by brew.

    .travis.yml: personally, I set things up as shown here.



  • FWIW, I have contacted Stephan Binner and he's currently working on getting a PPA for Qt 5.5, and he reckons it should be ok to get one for Ubuntu 12.04 LTS (and therefore Travis CI).

    Regarding OS X on Travis CI, I have seen that there is ongoing work on getting brew to support Qt 5.5, so it should be matter of days at most for OS X.



  • I finally managed to get QT5.4 with qmake on Ubuntu 12.04 up and running on Travis!
    https://github.com/pbek/QOwnNotes/blob/develop/.travis.yml

    Thank you for the good leads, @agarny!



  • You are welcome. Otherwise, you may be interested to know that Stephan Binner (the person behind the PPA) has released a Qt 5.5 version of his PPA that can be used with Travis CI. However, it doesn't include QtWebEngine since it apparently requires gcc 4.7 or above while Ubuntu 12.04 LTS ships with gcc 4.6 only.



  • In case other people are struggling with the same problem, i left here the template for using latest version of Qt with Travis:

    sudo: required
    dist: trusty
    
    before_install:
      - sudo add-apt-repository --yes ppa:beineri/opt-qt551-trusty
      - sudo apt-get update -qq
    
    install:
      - sudo apt-get -y install qt55[QTPACKAGE]
    
    script:
      - source /opt/qt55/bin/qt55-env.sh
      - /opt/qt55/bin/qmake
      - make
    

    In case Travis upgrade their build system, just change the dist: trusty to whatever distro they upgrade to.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.