blob: e6312e3dbb3f1b389e830ecfaaaa6f86a9e83d19 [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}"
Radek Krejci59e168b2018-09-19 08:58:51 +020032 - wget https://cmocka.org/files/1.1/cmocka-1.1.2.tar.xz
33 - tar -xf cmocka-1.1.2.tar.xz
34 - cd cmocka-1.1.2; mkdir build; cd build
Radek Krejci562a8002018-09-18 17:09:54 +020035 - cmake .. && make -j2 && sudo make install
36 - cd ../..
37 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
38 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind; fi
39 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
40
41script:
42 - mkdir build && cd build
43 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
44 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; fi
45 - make -j2 && ctest --output-on-failure
46 - cd -
47
48after_success:
49 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then codecov; fi