1# .travis.yml Travis CI configuration file for MindForger 2# 3# Copyright (C) 2014-2020 Martin Dvorak <martin.dvorak@mindforger.com> 4# 5# This program is free software; you can redistribute it and/or 6# modify it under the terms of the GNU General Public License 7# as published by the Free Software Foundation; either version 2 8# of the License, or (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18os: 19 - linux 20 21# 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 22matrix: 23 include: 24 - os: linux 25 addons: 26 apt: 27 sources: 28 - ubuntu-toolchain-r-test 29 packages: 30 - g++-5 31 env: 32 - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5" # IMPROVE prepend ccache to speed up 2nd build (MF after units) 33 34language: cpp # see https://docs.travis-ci.com/user/languages/cpp/ 35compiler: 36 - gcc # Travis CI defines CXX=g++ env var 37sudo: required 38dist: trusty # Travis CI provides Precise and Trusty only 39 40before_install: 41 - sudo apt-get update -qq 42 - "export DISPLAY=:99.0" 43 - "sh -e /etc/init.d/xvfb start" 44 - sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa 45 - sudo apt-get update -qq 46 - eval "${MATRIX_EVAL}" 47 48install: 49 - sudo apt-get install -qq qtbase5-dev libqt5webkit5-dev 50 - sudo apt-get install -qq qt5-default qttools5-dev-tools 51 - sudo apt-get install -qq ccache 52 - sudo apt-get install -qq libgtest-dev 53 - "export M8RHOME=`pwd`" 54 - cd /usr/src/gtest # I have to build Google Test Framework myself 55 - sudo apt-get install -qq cmake 56 - sudo cmake . 57 - sudo make 58 - sudo mv libg* /usr/lib/ 59 60script: # make lib unit tests > run lib unit tests > make MF > install MF 61 - cd "${M8RHOME}" 62 - eval "${MATRIX_EVAL}" 63 - cd deps/cmark-gfm && mkdir -v build && cd build && cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF .. && cmake --build . && cd ../../.. 64 - "echo \"M8RDEBUG: g++ compiler is set to: ${CXX}\"" 65 - cd lib/test # UNIT tests 66 - qmake -r CONFIG+=mfnocxx CONFIG+=mfunits QMAKE_CXX=${CXX} mindforger-lib-unit-tests.pro 67 - make 68 - cd src && export M8R_GIT_PATH="${M8RHOME}" && ./mindforger-lib-unit-tests > /tmp/mindforger-unit-tests.log 2>&1 # ; true 69 - cd ../../.. 70 - cat /tmp/mindforger-unit-tests.log 71 - qmake -r CONFIG+=mfnocxx QMAKE_CXX=${CXX} mindforger.pro 72 - make 73 - sudo make install 74