forked from vicrucann/cherish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
101 lines (90 loc) · 3.51 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
language: cpp
os: linux
compiler: gcc
sudo: required
dist: trusty
addons:
apt:
packages:
- cmake
- g++-4.8
# OpenGL related
- libgl1-mesa-dev
- mesa-utils
- libgl1-mesa-glx
coverity_scan:
project:
name: "vicrucann/cherish"
description: "Build submitted via Travis CI"
notification_email: [email protected]
build_command_prepend: "cov-configure --comptype gcc --compiler gcc-4.8 --template"
build_command: "make -j2 VERBOSE=1"
branch_pattern: coverity_scan
branches:
only:
- master
- develop
env:
global:
- CHERISH_SOURCE=${TRAVIS_BUILD_DIR}/src/
- CHERISH_BUILD=${TRAVIS_BUILD_DIR}/build/
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "iWzeGhXtnQ0QgZ/iyhC7DTdm2ppbSaGPZGcxB7VDoi09bIsn2Q8MWsaU4uv6ofwfzIK3l7FZPyXKPKyyXVH463cSxk+LcfJW8Oqj6d8RxotHkzF9ysRPtI5wFcvaIN2vktux+9ufTj5Ay9fl+xDjLCXk/qaGZ6makEYbUHOzAYThXvMMjwC4gvwNyELDttCN0bV/OOAAmkCWbHic+oe/xhHbwxPxJg/en0Zlz1cIHT3KKSqoq+aOyOfK/9yiGAMZVDuZhCbZmmlL7jOh1xDghTKtwl47wI6rjTAY+yGfuvtQnhuJI0C/VZI+m6ucihyr1cOhv899Fct62QETQPhZSOp71UOIU22p8dvHdzdbB9J/K/v6uppfqZ/uOTDUDElqyh11uWkFVp4ouZGGV/pJunzVdb+AttH9XwbJRuM0zM2B9ZBwzzv9GdhXifxpLOKHUGI8XFvJGZW6PhrjTUipSVpBQS9qCp8lf+KmQfMb2molZljyc82R4SDn/k4uImOJh6thWTjBJOsI/7pn+Jtqgj3rXC0kJ8D1DRNJ8E9igfWmB4A814w6z8EdljCDb+wveCd/alL/tREyZfCMgRCdcr/MUWJjYTrVCsdlCh5WVC1y0NBO2AacQPAhZC1XmFPHyTJUWKvXXkb1uBHYqGdh9WEDkzfKtBW55u4TNp0nh4Q="
before_install:
# Qt
- sudo apt-add-repository --yes ppa:beineri/opt-qt551-trusty
- sudo apt-get -qq update
# OpenSceneGraph
- wget https://github.com/vicrucann/OpenSceneGraph/releases/download/OpenSceneGraph-3.4.0/osg-340-deb.tar.gz
- tar -zxvf osg-340-deb.tar.gz
# OpenGL
- sudo apt-add-repository --yes ppa:oibaf/graphics-drivers
- sudo apt-get update -qq -y
- sudo apt-get -yq --force-yes install libgl1-mesa-dev libgl1-mesa-glx mesa-common-dev libglapi-mesa libgl1-mesa-dri
# imitate x server
- export DISPLAY=:99.0
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
- sleep 3
- glxinfo | grep version
install:
- sudo apt-get --yes install qt55base qt55imageformats qt55svg
- export CXX="g++-4.8"
- export CC="gcc-4.8"
- export CXXFLAGS="-std=c++11"
# - sudo apt-get -y install qt55[QPACKAGE]a
- sudo cp -rv osg-340-deb/lib64 /usr/local/
- sudo cp -rv osg-340-deb/include /usr/local/
- sudo cp -rv osg-340-deb/bin /usr/local/
before_script:
# Qt location
- QTDIR="/opt/qt55"
- PATH="$QTDIR/bin:$PATH"
- source /opt/qt55/bin/qt55-env.sh
# OpenSceneGraph download
- export LD_LIBRARY_PATH="/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH"
- export OPENTHREADS_INC_DIR="/usr/local/include"
- export OPENTHREADS_LIB_DIR="/usr/local/lib64:/usr/local/lib"
- export PATH="$OPENTHREADS_LIB_DIR:$PATH"
# create build folder
- mkdir $CHERISH_BUILD
- cd $CHERISH_BUILD
# cmake command
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/qt54/lib/cmake -DCherish_BUILD_TEST=ON -DCherish_VERSION=0.0.0 $CHERISH_SOURCE
script:
- if [[ "${COVERITY_SCAN_BRANCH}" == 1 ]];
then
echo "Don't build on coverty_scan branch.";
exit 0;
fi
# compile everything
- make -j2
# run unit tests
- cd tests/
- ./test_MainWindow
- ./test_SceneState
- ./test_UserScene
- ./test_Canvas
- ./test_Stroke
# - ./test_Bookmarks
- cd ..