I have been trying to figure out how to make Travis-CI build a QT5-only app.
I has to be Qt5, and include the QSerialPort module, so the stock Ubuntu version is not available (Missing QSerialPort). I installed Qt 5.x onto a 12.04 Ubuntu VM, tar'd up the files into something I placed into another repo, but when I download and extract the Qt5 executables (qmake + sources, etc), I cannot run them, even though qmake is found in the $PATH.
The code is all posted on https://github.com/npotts/QuteSerial.
.travis.yml
language: cpp
compiler:
- gcc
before_install:
- wget https://github.com/npotts/Qt5-Travis-CI/raw/master/Qt5.txz
- tar xfp Qt5.txz -C ${HOME}
install:
- sudo apt-get update -q
- sudo apt-get install build-essential
script:
- export PATH="${HOME}/Qt5.3.2/bin:${PATH}"
- which qmake
- uname -a
- qmake --version
- pwd
- ls *
- ls -alh ${HOME}/Qt5.3.2/*
- ../../Qt5.3.2/bin/qmake
- vendor/../../Qt5.3.2/bin/qmake
- make -j$(nproc)
Build Errors: https://travis-ci.org/npotts/QuteSerial/builds/38996355
It's not pretty, but this before_install
script is what I use to install Qt5 on Travis CI from the Ubuntu repositories.
It's important that the apt-get
commands are used as is; dependencies don't resolve correctly so I am manually fixing them.
before_install:
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty universe"
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu trusty main"
- sudo apt-get install debian-keyring debian-archive-keyring
- sudo apt-key update
- sudo apt-get update
- sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtchooser qttools5-dev qtbase5-dev libgles2-mesa-dev libqt5gui5 libqt5serialport5-dev libqt5printsupport5 libqt5widgets5 libgles2-mesa libgl1-mesa-dev libgl1-mesa-glx libglapi-mesa libegl1-mesa-dev libpango-1.0-0
- sudo apt-get install zlib1g-dev libudev-dev