Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis CI builds for Qt 5.7 #7

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
sudo: required
dist: trusty
language: generic

install:
- sudo add-apt-repository -y ppa:beineri/opt-qt56-trusty
- sudo apt-get update
- sudo apt-get -y install qt56declarative qt56quickcontrols qt56graphicaleffects qt56tools qt56svg
- sudo apt-get -y install xvfb
services:
- docker

env:
- QT_VERSION=qt:5.6.1
- QT_VERSION=qt:5.7.0

addons:
apt:
packages:
- xvfb

script:
- source /opt/qt56/bin/qt56-env.sh
- qmake . && make && sudo make install
- xvfb-run -a -s "-screen 0 800x600x24" make check
- export PATH=$PWD/scripts:$PATH
- docker_exec.sh "qmake . && make && sudo make install && xvfb-run -a -s \\\"-screen 0 800x600x24\\\" make check"
- git clean -xfd

notifications:
Expand Down
23 changes: 23 additions & 0 deletions scripts/docker_exec.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

ENTRY_POINT="/tmp/dock_paper_entry_point.sh"
: ${QT_VERSION:="qt:5.7.0"}

cat > ${ENTRY_POINT} << EOF
#!/bin/bash
echo "Preparing image with $QT_VERSION"
apt update &> /tmp/log && apt install sudo xvfb -y &> /tmp/log
groupadd -g $(getent group $USER | cut -d: -f3) $USER
useradd -g $USER -G sudo -N -u $UID $USER
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "Command: $@"
/bin/su $USER -c "cd $PWD && qmake --version && $@"

EOF
chmod +x ${ENTRY_POINT}

VOLUMES="-v ${ENTRY_POINT}:${ENTRY_POINT}:ro"
VOLUMES="${VOLUMES} -v $PWD:$PWD"

docker run --rm ${VOLUMES} --entrypoint=${ENTRY_POINT} approximator/$QT_VERSION
rm ${ENTRY_POINT}