-
Notifications
You must be signed in to change notification settings - Fork 214
/
.travis.yml
89 lines (83 loc) · 2.98 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
# dist: affects ubuntu. See https://docs.travis-ci.com/user/reference/overview/ gives distribution options
# google searches on 'ubuntu focal 20.04' for example:
# ubuntu focal 20.04 uses qt 5.15 (but has problems with xcb)
# ubuntu bionic 18.04 uses qt 5.9
# ubuntu xenial 16.04 uses qt 5.5 (but breaks /etc/init.d/xvfb step below)
# ubuntu trusty 14.04 uses qt 5.2 and xcode 9.4.1
# osx_image: affects macos
# xcode versions are set using osx_image (https://docs.travis-ci.com/user/reference/osx and
dist: trusty
language: cpp
matrix:
include:
- os: linux
- os: linux
env: BUILD_DEBUG="1"
- os: osx
env: ARCH="x86_64"
compiler: "clang"
osx_image: xcode12
- os: osx
env: ARCH="x86_64" BUILD_DEBUG="1"
compiler: "clang"
osx_image: xcode12
# xvfb setup is discussed at https://docs.travis-ci.com/user/gui-and-headless-browsers/
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 -E apt-get update -qq;
sudo -E 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 python3 python3-pip python3-lxml python3-numpy python3-pandas gdb;
elif [ `uname` = "Darwin" ]; then
brew update;
brew info qt5;
brew install fftw log4cpp qt5;
export QT5BREWHOME="/usr/local/opt/qt";
fi
script:
- if [ `uname` = "Darwin" ]; then
export CPPFLAGS="-I$QT5BREWHOME/include";
export LDFLAGS="-L$QT5BREWHOME/lib";
export PATH=$QT5BREWHOME/bin:$PATH;
export FFTW_HOME=`brew --prefix homebrew/core/fftw`;
export LOG4CPP_HOME=`brew --prefix homebrew/core/log4cpp`;
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 -j4
- if [ `uname` = "Linux" ]; then
cd help && ./build.bash && cd ..;
else
cd help && ./build_qt5_12_0.bash && cd ..;
fi
- 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 python tests on OSX. cd test && ./DumpGraphAndScreenCoordinates_test.py && cd ..;
- if [ `uname` = "Linux" ]; then
export ENGAUGE_EXECUTABLE=../bin/engauge;
cd test && ./DumpGraphAndScreenCoordinates_test.py && 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*