forked from SpinWaveGenie/SpinWaveGenie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.old
105 lines (98 loc) · 3.5 KB
/
.travis.old
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
99
100
101
102
103
104
105
language: generic
sudo: required
branches:
only:
- master
- coverity_scan
matrix:
include:
- os: linux
dist: trusty
compiler: gcc
- os: linux
dist: trusty
compiler: clang-3.8
env: CLANG_STATIC_ANALYZER=true
- os: linux
dist: trusty
compiler: clang-3.8
env: CLANG_SANITIZERS=true
- os: osx
osx_image: xcode7.3
compiler: clang
- os: osx
osx_image: xcode7.2
compiler: clang
- os: osx
osx_image: xcode7.2
compiler: clang
env: COVERALLS=true
before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ];
then
brew update > /dev/null 2>&1;
brew tap homebrew/science;
brew install --quite cmake;
brew install --quiet eigen;
brew install --quiet tbb --c++11;
brew install --quiet nlopt;
fi
- if [ "$TRAVIS_OS_NAME" == "linux" ];
then
wget -q https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz --no-check-certificate;
tar -xzf cmake-3.5.2-Linux-x86_64.tar.gz;
pwd;
export PATH=$PATH:cmake-3.5.2-Linux-x86_64;
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test;
wget -O llvm.key http://llvm.org/apt/llvm-snapshot.gpg.key && sudo apt-key add llvm.key;
sudo add-apt-repository -y 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main';
sudo apt-get update -qq;
sudo apt-get install -qq libboost-dev libboost-test-dev libeigen3-dev libtbb-dev libstdc++-4.9-dev clang-3.8 clang-tidy-3.8 python3-dev;
cmake --version;
fi
before_script:
- if [ "$COVERALLS" == "true" ];
then
echo "CHECKING CODE COVERAGE, $COVERALLS";
cmake -DWARNINGS_AS_ERRORS=ON -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON .;
elif [ "$CLANG_STATIC_ANALYZER" == "true" ];
then
echo "RUNNING CLANG STATIC ANALYZER, $CLANG_STATIC_ANALYZER";
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWARNINGS_AS_ERRORS=ON -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DUSE_THREADS=OFF .;
elif [ "$CLANG_SANITIZERS" == "true" ];
then
echo "RUNNING CLANG ADDRESS and UNDEFINED BEHAVIOR SANITIZERS, $CLANG_SANITIZERS";
cmake -DWARNINGS_AS_ERRORS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DUSE_THREADS=OFF -DWITH_SANITIZERS=ON -DPYTHON_LIBRARY=/opt/python/3.4.3/lib/libpython3.4m.so -DPYTHON_INCLUDE_DIR=/opt/python/3.4.3/include .;
else
if [ "$TRAVIS_OS_NAME" == "osx" ];
then
echo "OSX RELEASE BUILD";
cmake -DWARNINGS_AS_ERRORS=ON -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON .;
else
echo "LINUX RELEASE BUILD";
./cmake-3.5.2-Linux-x86_64/bin/cmake -DWARNINGS_AS_ERRORS=ON -DBUILD_TESTING=ON -DPYTHON_LIBRARY=/opt/python/3.4.3/lib/libpython3.4m.so -DPYTHON_INCLUDE_DIR=/opt/python/3.4.3/include .;
fi
fi
script:
- if [ "$CLANG_STATIC_ANALYZER" == "true" ];
then
SOURCE_FILES=`find . \( -name '*.cpp' \) -path './*'`;
CHECKS="clang-analyzer-*,-clang-analyzer-alpha.core.CastToStruct,modernize-*,-modernize-pass-by-value,performance-*,google-readability-casting";
for file in $SOURCE_FILES; do
echo Filename:$file;
clang-tidy-3.8 -checks=$CHECKS -p . -header-filter='./libSpinWaveGenie/*' $file;
done
else
make -j 2;
fi
- if [ "$COVERALLS" == "true" ];
then
make coveralls -j 2;
elif [ "$CLANG_STATIC_ANALYZER" != "true" ];
then
ctest --output-on-failure -j 2;
fi
notifications:
email:
on_success: change
on_failure: always