forked from dvorka/mindforger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (51 loc) · 1.84 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
os:
- linux
# Missing codecvt: upgrade from g++ 4.8 to 5 > MATRIX_EVAL sets CXX to g++-5 > qmake CONFIG and QMAKE_CXX sets it to build process
matrix:
include:
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" # IMPROVE prepend ccache to speed up 2nd build (MF after units)
language: cpp # see https://docs.travis-ci.com/user/languages/cpp/
compiler:
- gcc # Travis CI defines CXX=g++ env var
sudo: required
dist: trusty # Travis CI provides Precise and Trusty only
before_install:
- sudo apt-get update -qq
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa
- sudo apt-get update -qq
- eval "${MATRIX_EVAL}"
install:
- sudo apt-get install -qq qtbase5-dev libqt5webkit5-dev
- sudo apt-get install -qq qt5-default qttools5-dev-tools
- sudo apt-get install -qq ccache
- sudo apt-get install -qq libgtest-dev
- "export M8RHOME=`pwd`"
- cd /usr/src/gtest # I have to build Google Test Framework myself
- sudo apt-get install -qq cmake
- sudo cmake .
- sudo make
- sudo mv libg* /usr/lib/
script: # make lib unit tests > run lib unit tests > make MF > install MF
- cd "${M8RHOME}"
- eval "${MATRIX_EVAL}"
- cd deps/discount && ./configure.sh && make ; cd ../..
- "echo \"M8RDEBUG: g++ compiler is set to: ${CXX}\""
- cd lib/test # UNIT tests
- qmake -r CONFIG+=travisci CONFIG+=mfunits QMAKE_CXX=${CXX} mindforger-lib-unit-tests.pro
- make
- cd src && export M8R_GIT_PATH="${M8RHOME}" && ./mindforger-lib-unit-tests > /tmp/mindforger-unit-tests.log 2>&1 ; true
- cd ../../..
- tail /tmp/mindforger-unit-tests.log
- qmake -r CONFIG+=travisci QMAKE_CXX=${CXX} mindforger.pro
- make
- sudo make install