/
.travis.yml
68 lines (61 loc) · 2.46 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
language: cpp
sudo: required
dist: trusty
os:
- linux
# - osx
env:
- CONFIG=Release
# - CONFIG=Debug
branches:
only:
- master
- /^\d+\.\d+(\.\d+)?$/
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
wget --no-check-certificate https://cmake.org/files/v3.3/cmake-3.3.0-Linux-x86_64.tar.gz
&& tar -xzf cmake-3.3.0-Linux-x86_64.tar.gz
&& sudo cp -fR cmake-3.3.0-Linux-x86_64/* /usr
&& sudo apt-get install software-properties-common
&& sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
&& sudo apt-add-repository -y ppa:beineri/opt-qt562-trusty
&& sudo apt-get -qq update
&& sudo apt-get -qq install gcc-4.9 g++-4.9 libgl1-mesa-dev libglu1-mesa-dev ninja-build
&& sudo apt-get -qq install qt56location qt56multimedia qt56sensors qt56svg qt56tools qt56webchannel
&& sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50
&& sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 50
;
else
brew update
&& curl -O https://raw.githubusercontent.com/Homebrew/homebrew-core/106d0878ee812cb8f5c403f717bdebe836445aee/Formula/qt5.rb
&& brew install ./qt5.rb ninja
&& export OPENSSL_ROOT_DIR=/usr/local/opt/openssl
&& chmod -R 755 /usr/local/opt/qt5/*
;
fi
script:
# Note: on Linux, the linking of CellMLTextView_conversiontests and
# CellMLTextView_parsingtests results in an error regarding
# __cxa_throw_bad_array_new_length@Qt_5 not being defined in
# libqscintilla2_qt5.so.13. This is most likely related to our use of
# GCC/G++ 4.9. However, a simple workaround is to build QScintilla, so
# this is what we are doing here...
- cd build
&& if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cmake -G Ninja -DCMAKE_BUILD_TYPE=$CONFIG -DENABLE_TRAVIS_CI=ON -DCMAKE_PREFIX_PATH=/opt/qt56/lib/cmake -DUSE_PREBUILT_QSCINTILLA_PACKAGE=OFF -DENABLE_SAMPLE_PLUGINS=ON -DENABLE_TEST_PLUGINS=ON -DENABLE_TESTS=ON ..
;
else
cmake -G Ninja -DCMAKE_BUILD_TYPE=$CONFIG -DENABLE_TRAVIS_CI=ON -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake -DENABLE_SAMPLE_PLUGINS=ON -DENABLE_TEST_PLUGINS=ON -DENABLE_TESTS=ON ..
;
fi
&& ninja
&& cd ..
&& if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
build/bin/runtests
;
else
build/OpenCOR.app/Contents/MacOS/runtests
;
fi
notifications:
email: team@opencor.ws