2014-09-09 16 views
7

Sto cercando di utilizzare Travis CI con un progetto Qt5, ma non riesco a far passare la build.Travis CI per un progetto Qt5

mio .travis.yml

install: 
    - sudo apt-get update 
    - sudo apt-get install qt5-default qttools5-dev-tools 

script: 
    - qmake -project 
    - qmake Ultron.pro 
    - make 

ultimo segmento del log degli errori:

0.58s$ sudo apt-get install qt5-default qttools5-dev-tools 
Reading package lists... Done 
Building dependency tree  
Reading state information... Done 
E: Unable to locate package qt5-default 
E: Unable to locate package qttools5-dev-tools 
The command "sudo apt-get install qt5-default qttools5-dev-tools" failed and exited with 100 during . 
Your build has been stopped. 

log completi: http://pastebin.ubuntu.com/8296581/

Questo ha qualcosa a che fare con esso, non essendo un pacchetto ufficiale?

+0

po 'di auto promozione qui: [al travis_cpp_tutorial GitHub] (https://github.com/richelbilderbeek/travis_cpp_tutorial) puoi trovare dozzine di configurazioni di Travis CI. [travis_qmake_gcc_cpp14_qt5] (https://github.com/richelbilderbeek/travis_qmake_gcc_cpp14_qt5) è quello che fornisce un esempio minimo che risponde alla tua domanda. – richelbilderbeek

risposta

11

è necessario aggiungere il repository corretto e l'aggiornamento apt:

sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa 
sudo apt-get update -qq 

tuo .travis.yml sarà quindi simile:

before_install: 
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa 
- sudo apt-get update -qq 
- sudo apt-get install qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev 
- sudo apt-get install qt5-default qttools5-dev-tools 

script: 
- qmake -project 
- qmake Ultron.pro 
- make 

vedi: Travis CI config to build against Qt5.0 on Ubuntu 12.04. Requires installing a PPA and certain packages for qt5 support. (jreese/gist:6207161)