forked from sysrepo/sysrepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (73 loc) · 3.71 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
language:
- c
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
dist: trusty
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- USE_SR_MEM_MGMT=OFF
- os: linux
dist: trusty
sudo: required
compiler: clang
- os: osx
compiler: gcc
cache:
pip: true
directories:
- $HOME/local
before_install:
- eval "${MATRIX_EVAL}"
- test $TRAVIS_BRANCH != coverity -o "$CC" = "clang" || exit 0
- test $TRAVIS_BRANCH != devel-coverity -o "$CC" = "clang" || exit 0
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash deploy/travis/install-libs.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sh deploy/travis/install-libs-osx.sh; fi
before_script:
- ulimit -c unlimited -S
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sysctl -w kernel.core_pattern=$(pwd)/build/core.%e.%p; fi
script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_C_FLAGS="-Werror -coverage" -DLOG_THREAD_ID=ON -DLONG_REQUEST_TIMEOUT=30 -DUSE_SR_MEM_MGMT=${USE_SR_MEM_MGMT:-ON} -DENABLE_NACM=ON .. && make -j2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build ; cd build ; cmake -DGEN_LANGUAGE_BINDINGS=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_C_FLAGS="-Werror -coverage" -DLOG_THREAD_ID=ON -DLONG_REQUEST_TIMEOUT=30 -DENABLE_NACM=ON .. && make -j2; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ( sudo sh ../deploy/travis/watch-bt.sh & ); fi
- ctest --output-on-failure
- CTEST=`which ctest` && sudo $CTEST --output-on-failure --tests-regex ac_test
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sh ../deploy/travis/install-test-users.sh; fi
- CTEST=`which ctest` && sudo $CTEST --output-on-failure --tests-regex nacm_cl_test || (sleep 5; ls -al /var/log; ls -rt /var/log/syslog* | xargs sudo cat; exit 1)
- sudo make install
after_success:
- if [ "$CC" = "gcc" ]; then codecov; fi
after_failure:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then bash ../deploy/travis/report-crash.sh; fi
env:
global:
# COVERITY_SCAN_TOKEN
- secure: "dV/BjJUU5YLYVJk58qmbKjUoORZ7ipQzmMVsqGAgcNzpPxsYyL7c6+vvLhNPNE4oiYEUvB9f2yIE+gu6Tt1BIlm2lVzPfR4E9ArOhufzJ+8VYwYj9P9m9vZTL433t5RG4dyVVxCgo6HG7Sebp5qF4gH+bpwdFiKS2lvtwJ0h3zAMVALoE0nZDhiykrJfRpKfpb2qiWqxaxFK9syn2hwb7oOWQlBj2q21EJXUY4aPcK6a5SHfAORKcGl49Z7qR46GGpv9YKVqlNqyczRQB2krKPiHtVU0QdwI+7snG2sDYU8sOqZ5ppFuzXiARkYSuqHufnZYn0w4U2F7MIIXg8rIBh1r3NOAbM8bAlRGWKx+qptNBdHKzdkrzJFhRVOEE9wi9YhvY2IqtPLxQ1HUMeqsDXM+Vk1ZkzwSw1dIHMPWzb4pKKnoIaDZppxYZVx84lHVO7oceJ7zLwv/x/l+4MyHbqz1OXsGE8IxVMGlJSVT7TnmQd5bQ80Jc3tT4nWbqFEy6KRpCwhvvTR8z0RsSECc6V9+rDATYFWWzfZxl/zLB8tKOkiaPjH/C1Hmq8Om58wZ+PHaJKnkwMcT24iCXpi3sjyHWDlgUUdekJBVPUchyIqIcXEsKE6pFsbr5USyZFX+mD8p8+r14KRiW8nJRoVxB3EktSXiHvXFU8E4Qo6uJKs="
addons:
coverity_scan:
project:
name: "sysrepo/sysrepo"
notification_email: [email protected]
build_command_prepend: "mkdir build ; cd build ; cmake -DENABLE_NACM=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME/local .. && make clean"
build_command: "make -j 2"
branch_pattern: ".*coverity"