-
Notifications
You must be signed in to change notification settings - Fork 30
/
.travis.yml
74 lines (67 loc) · 2.15 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
language: cpp
# TODO See travis Docker support for how to use any ubuntu version!
# https://docs.travis-ci.com/user/docker/
git:
# default is 50, not needed
depth: 5
matrix:
include:
- os: osx
env: CONFIG=Release
compiler: clang
# Mac OS X Sierra (10.12)
osx_image: xcode8.1
- os: linux
# The default Travis Linux image is Ubuntu 12.04 precise, which is way too old:
# - cmake version is 2.8.7
# - wget doesn't support SNI, so dowloading with HTTPS from cmake.org fails. The correct
# solution is NOT --no-check-certificate as wget suggests! The correct solution is to
# use a more recent wget or something that supports SNI.
#
# Switch from Ubuntu 12.04 precise to 14.04 trusty (which is still old but the most
# recent version available on travis, in beta since November 2016).
# By default:
# - cmake version is 3.2.2
# - gcc version is 4.8.4
# - qt5 version is 5.2.1, while we require at least 5.6
#
# See http://stackoverflow.com/a/29818514/561422 for the proper way to get any Qt5 version
# with Travis and 14.04 trusty!
#
dist: trusty
sudo: required
env: CONFIG=Release
compiler: gcc
before_install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Need at least Qt 5.6 for QWebEnginePage::setBackgroundColor
# https://launchpad.net/~beineri/+archive/ubuntu/opt-qt562-trusty
sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y &&
sudo apt-get update -qq
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update &&
brew install qt5 &&
chmod -R 755 /usr/local/opt/qt5/*
fi
install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install -qq qt56base &&
sudo apt-get install -qq qt56webengine &&
source /opt/qt56/bin/qt56-env.sh
fi
script:
- mkdir build && cd build
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
cmake .. &&
cmake --build .
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cmake -D CMAKE_PREFIX_PATH=$(brew --prefix qt5) .. &&
cmake --build .
fi