Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI for a Qt5 project

Tags:

travis-ci

qt5

I am trying to use Travis CI with a Qt5 project, but I can't get the build to pass.

My .travis.yml

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

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

Last segment of the error log:

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.

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

Does this have something to do with it not being an official package?

like image 462
Quaxton Hale Avatar asked Sep 09 '14 05:09

Quaxton Hale


People also ask

What is the use of Travis CI?

As a continuous integration platform, Travis CI supports your development process by automatically building and testing code changes, providing immediate feedback on the success of the change. Travis CI can also automate other parts of your development process by managing deployments and notifications.

Is Travis CI a CI tool?

Like Jenkins, Travis CI is also one of the early players in the CI/CD tools market. The tool is written in Ruby and is developed & maintained by the Travis CI community. Travis CI was earlier available only for GitHub hosted projects but now it also supports Bitbucket hosted projects.


1 Answers

You need to add the correct repository and update apt:

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

Your .travis.yml will then look like:

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

see: 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)

like image 117
gismo141 Avatar answered Feb 18 '23 17:02

gismo141