blob: 29c8b725c444d9cd7db24bb9f15865c4006d52d8 [file] [log] [blame]
Radek Krejci562a8002018-09-18 17:09:54 +02001language: c
2
3matrix:
4 include:
5 - os: linux
6 dist: trusty
7 sudo: required
8 compiler: clang
9 - os: linux
10 dist: trusty
11 sudo: required
12 compiler: gcc
Radek Krejci562a8002018-09-18 17:09:54 +020013 - os: osx
14 compiler: gcc
15 allow_failures:
16 - os: osx
17
18branches:
19 only:
20 - libyang2
21
22before_install:
23 - eval "${MATRIX_EVAL}"
Radek Krejci59e168b2018-09-19 08:58:51 +020024 - wget https://cmocka.org/files/1.1/cmocka-1.1.2.tar.xz
25 - tar -xf cmocka-1.1.2.tar.xz
26 - cd cmocka-1.1.2; mkdir build; cd build
Radek Krejci562a8002018-09-18 17:09:54 +020027 - cmake .. && make -j2 && sudo make install
28 - cd ../..
29 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
30 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind; fi
Radek Krejci73c1c322018-10-09 12:12:05 +020031 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
Radek Krejci562a8002018-09-18 17:09:54 +020032
33script:
34 - mkdir build && cd build
35 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
36 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; fi
37 - make -j2 && ctest --output-on-failure
38 - cd -
39
40after_success:
Radek Krejci73c1c322018-10-09 12:12:05 +020041 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; fi