forked from griefly/griefly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (67 loc) · 2.24 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
matrix:
include:
- os: linux
sudo: required
dist: trusty
- os: osx
sudo: required
osx_image: xcode7.3
language: cpp
compiler: gcc
before_install:
- export CXX="g++-4.9"
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
eval "$(gimme 1.6)";
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test;
sudo add-apt-repository -y ppa:beineri/opt-qt58-trusty;
sudo apt-get update -qq;
sudo apt-get install -y g++-4.9;
sudo apt-get install -y qt58base;
sudo apt-get install -y qt58multimedia;
sudo apt-get install -y lcov;
sudo apt-get install -y mesa-common-dev;
sudo apt-get install -y libglu1-mesa-dev;
sudo apt-get install -y python3.5
gem install coveralls-lcov;
sudo /opt/qt58/bin/qt58-env.sh;
export CMAKE_PREFIX_PATH=/opt/qt58/;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update;
brew install gimme;
eval "$(gimme 1.6)";
brew install qt;
brew install python3;
brew info qt;
export CMAKE_PREFIX_PATH=/opt/qt58/;
export PATH="/usr/local/opt/qt/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/qt/lib";
export CPPFLAGS="-I/usr/local/opt/qt/include";
fi
before_script:
- "export DISPLAY=:99.0"
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok )& fi
- if [[ "${TRAVIS_OS_NAME}" = "linux" ]]; then
sh -e /etc/init.d/xvfb start;
fi
- sleep 3
script:
- ./make.sh -DBUILD_TESTS=ON -DBUILD_COVER=ON -DCMAKE_BUILD_TYPE=Debug
- cd exec
- ./KVEngine --run-tests
after_success:
# /usr/* - filter out system code
# /opt/* - filter out qt files
# tests/* - remove tests from coverage
# /griefly/build/ - remove gtest and generated code from coverage
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd ${TRAVIS_BUILD_DIR};
lcov -c -d . -o coverage.info;
lcov --remove coverage.info '/usr/*' --output-file coverage.info;
lcov --remove coverage.info '/opt/*' --output-file coverage.info;
lcov --remove coverage.info 'tests/*' --output-file coverage.info;
lcov --remove coverage.info '/griefly/build/*' --output-file coverage.info;
lcov --list coverage.info;
coveralls-lcov --repo-token=${COVERALLS_TOKEN} coverage.info;
fi