forked from dvorka/mindforger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (69 loc) · 2.73 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
75
# .travis.yml Travis CI configuration file for MindForger
#
# Copyright (C) 2014-2019 Martin Dvorak <[email protected]>
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
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/cmark-gfm && mkdir -v build && cd build && cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF .. && cmake --build . && cd ../../..
- "cd deps/discount && ./configure.sh && make ; cd ../.."
- "echo \"M8RDEBUG: g++ compiler is set to: ${CXX}\""
- cd lib/test # UNIT tests
- qmake -r CONFIG+=mfnocxx 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 ../../..
- cat /tmp/mindforger-unit-tests.log
- qmake -r CONFIG+=mfnocxx QMAKE_CXX=${CXX} mindforger.pro
- make
- sudo make install