forked from markummitchell/engauge-digitizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
68 lines (62 loc) · 1.93 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
dist: trusty
language: cpp
matrix:
include:
- os: linux
- os: linux
env: BUILD_DEBUG="1"
- os: osx
env: ARCH="x86_64"
compiler: "clang"
- os: osx
env: ARCH="x86_64" BUILD_DEBUG="1"
compiler: "clang"
before_script:
- if [ `uname` = "Linux" ]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
sleep 3;
fi
before_install:
- if [ `uname` = "Linux" ]; then
sudo apt-get update -qq;
sudo apt-get install --yes --no-install-recommends qtbase5-dev qttools5-dev qt5-default qttools5-dev-tools qt5-qmake liblog4cpp5-dev libfftw3-dev libqt5sql5-sqlite xvfb;
elif [ `uname` = "Darwin" ]; then
brew update;
brew install homebrew/versions/qt55 fftw log4cpp;
export QT5BREWHOME=`brew --prefix homebrew/versions/qt55`;
fi
script:
- if [ `uname` = "Darwin" ]; then
export CPPFLAGS="-I$QT5BREWHOME/include";
export LDFLAGS="-L$QT5BREWHOME/lib";
export PATH=$QT5BREWHOME/bin:$PATH;
export FFTW_HOME="/usr/local/Cellar/fftw/3.3.6-pl2";
export LOG4CPP_HOME="/usr/local/Cellar/log4cpp/1.1.3";
fi
- if [ "$BUILD_DEBUG" = "1" ]; then
export BUILD_FLAGS="CONFIG+=debug";
fi
- qmake $BUILD_FLAGS engauge.pro
#hacks
- if [ `uname` = "Darwin" ]; then
sed -ibak '/^LIBS/s/-lQt5/-framework Qt/g' Makefile;
sed -ibak2 's|-L/usr/local/Cellar|-F/usr/local/Cellar|g' Makefile;
sed -ibak3 's|-F/usr/local/Cellar/log4cpp|-L/usr/local/Cellar/log4cpp|g' Makefile;
fi
- make
- cd help && ./build && cd ..;
- if [ `uname` = "Darwin" -a "$BUILD_DEBUG" = "1" ]; then
cp $FFTW_HOME/lib/lib* src;
cp $LOG4CPP_HOME/lib/lib* src;
fi
#no gui tests on OSX for release version
- if [ `uname` != "Darwin" -o "$BUILD_DEBUG" = "1" ]; then
cd src && ./build_and_run_all_gui_tests && cd ..;
fi
#no cli tests on OSX
- if [ `uname` = "Linux" ]; then
cd src && ./build_and_run_all_cli_tests && cd ..;
fi
after_success:
- file bin/engauge*