blob: 8afd57008a270ecbbe6f138490ea0b6009d9011d [file] [log] [blame]
Radek Krejci1ba11c42015-06-15 13:40:36 +02001language: c
Radek Krejci6757fae2015-06-15 14:42:01 +02002
Radek Krejcia0287592016-07-19 14:04:07 +02003matrix:
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 - os: osx
14 compiler: gcc
15 allow_failures:
16 - os: osx
Radek Krejci6757fae2015-06-15 14:42:01 +020017
Radek Krejci1ba11c42015-06-15 13:40:36 +020018branches:
19 only:
20 - master
Radek Krejci2bb207f2015-08-13 08:11:10 +020021 - devel
Radek Krejci1ba11c42015-06-15 13:40:36 +020022
Radek Krejci5936e192015-10-05 15:56:31 +020023before_install:
Michal Vasko3e107ed2018-03-22 16:05:25 +010024 - eval "${MATRIX_EVAL}"
Lukas Macko5f490e62016-10-31 11:08:39 +010025 - git clone git://git.cryptomilk.org/projects/cmocka.git
26 - cd cmocka && mkdir build && cd build
Radek Krejci51aa74c2018-02-01 08:56:25 +010027 - cmake .. && make -j2 && sudo make install
Radek Krejci1f8d2232015-10-05 16:34:12 +020028 - cd ../..
Michal Vaskob469b6d2018-02-15 15:53:44 +010029 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
Mislav Novakovic1ec78bd2018-09-04 15:44:26 +020030 - 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.12-1.2_amd64.deb; sudo dpkg -i ./swig/swig_3.0.12-1_amd64.deb; fi
PavolVicand30c3d92018-06-25 15:29:20 +020031 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
Radek Krejci5936e192015-10-05 15:56:31 +020032
Michal Vaskofe4b7c72016-05-18 13:44:21 +020033script:
Michal Vasko57e70c92018-02-15 15:56:01 +010034 - mkdir build && cd build
35 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
36 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON ..; fi
37 - make -j2 && ctest --output-on-failure
Radek Krejci9d42d0a2017-04-28 13:33:33 +020038 - cd -
Radek Krejci6757fae2015-06-15 14:42:01 +020039
Radek Krejci1a7c6e02016-02-04 16:10:52 +010040after_success:
PavolVicand30c3d92018-06-25 15:29:20 +020041 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then codecov; ./packages/create-package.sh; fi