-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
61 lines (55 loc) · 1.9 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
language: cpp
compiler:
- gcc
# - clang
sudo: required
dist: trusty
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
# Update the default 'trusty' linker and gcc version for tests to link and pass.
- g++-5
- binutils-2.26
before_script:
# Update the default 'trusty' linker version for tests to link and pass. # Update the default 'trusty' linker and gcc version for tests to link and pass.
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install -y binutils-2.26 && sudo update-alternatives --install sudo update-alternatives --install /usr/bin/ld ld /usr/lib/binutils-2.26/bin/ld 90;
/usr/bin/ld ld /usr/lib/binutils-2.26/bin/ld 90; fi fi
install:
# CppCheck
- sudo apt-get install -qq cppcheck
# Gcovr
- sudo apt-get install gcovr
# mlpack
- sudo add-apt-repository ppa:titas-chanda/armadillo -y
- sudo apt-get update
- sudo apt-get install libarmadillo-dev libgsl0-dev libboost-program-options-dev libboost-math-dev libboost-test-dev libboost-serialization-dev
script:
# Install mlpack
- wget https://github.com/mlpack/mlpack/archive/mlpack-3.0.0.zip
- unzip mlpack-3.0.0.zip
- cd mlpack-mlpack-3.0.0/
- mkdir build
- cd build
- cmake -DBUILD_CLI_EXECUTABLES=OFF -DBUILD_TESTS=OFF ../
- make
- sudo make install
- cd ../../
- rm -rf mlpack-mlpack-3.0.0/
# Runs compilation, cppcheck, tests and coverage collection
- mkdir build
- cd build
- cmake ../ -DENABLE_CODECOV=ON -DENABLE_TESTS=ON -DENABLE_CPPCHECK=ON
- make && make cppcheck && (make coverage || (cat ./Testing/Temporary/LastTest.log && exit 1))
- cd ..
after_success:
# codecov.io
- bash <(curl -s https://codecov.io/bash) -f build/coverage.xml
notifications:
email:
recipients:
on_success: never # default: change
on_failure: always # default: always