2014-09-09 28 views
7

Tôi đang cố gắng sử dụng Travis CI với một dự án Qt5, nhưng tôi không thể có được xây dựng để vượt qua.Travis CI cho một dự án Qt5

My .travis.yml

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

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

phân khúc cuối của nhật ký lỗi:

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/

Điều này có cái gì để làm với nó không phải là một gói phần mềm chính thức?

+0

Một số tự xúc tiến ở đây: [tại travis_cpp_tutorial GitHub] (https://github.com/richelbilderbeek/travis_cpp_tutorial) bạn có thể tìm thấy hàng chục thiết lập Travis CI. [travis_qmake_gcc_cpp14_qt5] (https://github.com/richelbilderbeek/travis_qmake_gcc_cpp14_qt5) là một ví dụ tối thiểu trả lời câu hỏi của bạn. – richelbilderbeek

Trả lời

11

Bạn cần phải thêm kho chính xác và cập nhật apt:

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

bạn .travis.yml sau đó sẽ trông giống như:

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)

Các vấn đề liên quan