forked from shogun-toolbox/shogun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
96 lines (96 loc) · 3.64 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
90
91
92
93
94
95
96
sudo: required
language: cpp
cache: ccache
notifications:
email: false
irc:
channels:
- "irc.freenode.org#shogun"
on_success: change
on_failure: always
template:
- "it's %{author}'s turn to pay the next round of drinks for the massacre he caused in %{repository}: %{build_url}"
matrix:
fast_finish: true
include:
- compiler: gcc
services: docker
- compiler: clang
services: docker
- compiler: gcc
services: docker
env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON -DENABLE_CCACHE=OFF"
- CODE_COVERAGE=1
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_PYTHON=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_RUBY=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_JAVA=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_CSHARP=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_LUA=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
- compiler: gcc
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_OCTAVE=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- INTERFACE_OCTAVE=true
- compiler: clang
services: docker
env:
- CMAKE_OPTIONS="-DINTERFACE_R=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
- CC=clang
- CXX=clang++
# - compiler: clang
# services: docker
# env:
# - CMAKE_OPTIONS="-DScala=ON -DTRAVIS_DISABLE_UNIT_TESTS=ON -DTRAVIS_DISABLE_LIBSHOGUN_TESTS=ON"
# - CC=clang
# - CXX=clang++
allow_failures:
- compiler: gcc
services: docker
env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON -DENABLE_CCACHE=OFF"
- CODE_COVERAGE=1
before_install:
- docker pull shogun/shogun-dev
- perl -pe 's/\$(\w+)/$ENV{$1}/g' configs/shogun-sdk/travis.env.in > travis.env
- docker run -t -d -P --env-file travis.env --name devenv -v $HOME/.ccache:/root/.ccache -v $PWD:/opt/shogun shogun/shogun-dev /bin/sh -c "mkdir /opt/shogun/build;bash"
before_script:
- docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; cmake -DCMAKE_INSTALL_PREFIX=$HOME/shogun-build -DENABLE_TESTING=ON $CMAKE_OPTIONS .."
script:
- |
if [ $CC == "gcc" ] && [ -z ${INTERFACE_OCTAVE} ]; then
docker exec -t devenv /bin/sh -c "cd /opt/shogun/; if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/check_format.sh "$TRAVIS_PULL_REQUEST_BRANCH" "$TRAVIS_BRANCH"; fi"
fi
- docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; make -j2"
- docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; make install"
- docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; ctest --output-on-failure -j 2"
after_success:
- |
if [ $CODE_COVERAGE ] ; then
docker exec -t devenv /bin/sh -c "cd /opt/shogun/build; lcov --directory src/shogun/ --capture --output-file all_coverage.info; lcov --remove all_coverage.info '/usr/*' > coverage.info; rm all_coverage.info; codecov -X gcov"
fi