forked from sysrepo/sysrepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (52 loc) · 2.7 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:
- c
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
- os: linux
dist: trusty
sudo: required
compiler: gcc
env: 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:
- test $TRAVIS_BRANCH != coverity -o ${TRAVIS_JOB_NUMBER##*.} = 1 || exit 0
- test $TRAVIS_BRANCH != devel-coverity -o ${TRAVIS_JOB_NUMBER##*.} = 1 || 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=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 -DUSE_SR_MEM_MGMT=${USE_SR_MEM_MGMT:-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 .. && make -j2; fi
- ctest --output-on-failure
- sudo ctest --output-on-failure --tests-regex ac_test
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: raszabo@cisco.com
build_command_prepend: "mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$HOME/local .. && make clean"
build_command: "make -j 2"
branch_pattern: ".*coverity"