| language: c |
| |
| matrix: |
| include: |
| - os: linux |
| dist: trusty |
| sudo: required |
| compiler: clang |
| - os: linux |
| dist: trusty |
| sudo: required |
| compiler: gcc |
| addons: |
| apt: |
| sources: |
| - ubuntu-toolchain-r-test |
| packages: |
| - g++-7 |
| env: |
| - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" |
| - os: osx |
| compiler: gcc |
| allow_failures: |
| - os: osx |
| |
| branches: |
| only: |
| - master |
| - devel |
| |
| before_install: |
| - eval "${MATRIX_EVAL}" |
| - git clone git://git.cryptomilk.org/projects/cmocka.git |
| - cd cmocka && 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 osc; sudo dpkg -i ./swig/swig3.0_3.0.8-0ubuntu3_amd64.deb; 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 -DGEN_LANGUAGE_BINDINGS=ON ..; fi |
| - make -j2 && ctest --output-on-failure |
| - cd - |
| |
| after_success: |
| - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; ./packages/create-package.sh; fi |