blob: c5fd2586862a160ffffe5427b689a2bc3b13351a [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
13 addons:
14 apt:
15 sources:
16 - ubuntu-toolchain-r-test
17 packages:
18 - g++-7
19 env:
20 - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
21 - os: osx
22 compiler: gcc
23 allow_failures:
24 - os: osx
25
26branches:
27 only:
28 - libyang2
29
30before_install:
31 - eval "${MATRIX_EVAL}"
32 - git clone git://git.cryptomilk.org/projects/cmocka.git
33 - cd cmocka && mkdir build && cd build
34 - cmake .. && make -j2 && sudo make install
35 - cd ../..
36 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
37 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind; fi
38 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
39
40script:
41 - mkdir build && cd build
42 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
43 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; fi
44 - make -j2 && ctest --output-on-failure
45 - cd -
46
47after_success:
48 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then codecov; fi