| language: c |
| |
| matrix: |
| include: |
| - os: linux |
| dist: trusty |
| sudo: required |
| compiler: clang |
| - os: linux |
| dist: trusty |
| sudo: required |
| compiler: gcc |
| - os: osx |
| compiler: gcc |
| allow_failures: |
| - os: osx |
| |
| branches: |
| only: |
| - libyang2 |
| |
| before_install: |
| - eval "${MATRIX_EVAL}" |
| - wget https://cmocka.org/files/1.1/cmocka-1.1.2.tar.xz |
| - tar -xf cmocka-1.1.2.tar.xz |
| - cd cmocka-1.1.2; mkdir build; cd build |
| - cmake .. && make -j2 && sudo make install |
| - cd ../.. |
| - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi |
| - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind; fi |
| - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi |
| |
| script: |
| - mkdir build && cd build |
| - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi |
| - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake ..; fi |
| - make -j2 && ctest --output-on-failure |
| - cd - |
| |
| after_success: |
| - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; fi |