blob: 469c50ea00d374d948735e470809319bab65dc4d [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:
Lukas Macko5f490e62016-10-31 11:08:39 +010024 - git clone git://git.cryptomilk.org/projects/cmocka.git
25 - cd cmocka && mkdir build && cd build
Radek Krejci51aa74c2018-02-01 08:56:25 +010026 - cmake .. && make -j2 && sudo make install
Radek Krejci1f8d2232015-10-05 16:34:12 +020027 - cd ../..
Michal Vaskob469b6d2018-02-15 15:53:44 +010028 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
Michal Vaskoaad39982018-02-15 14:14:08 +010029 - 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
Radek Krejcia0287592016-07-19 14:04:07 +020030 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
Radek Krejci5936e192015-10-05 15:56:31 +020031
Michal Vaskofe4b7c72016-05-18 13:44:21 +020032script:
Michal Vasko57e70c92018-02-15 15:56:01 +010033 - mkdir build && cd build
34 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
35 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON ..; fi
36 - make -j2 && ctest --output-on-failure
Radek Krejci9d42d0a2017-04-28 13:33:33 +020037 - cd -
Radek Krejci6757fae2015-06-15 14:42:01 +020038
Radek Krejci1a7c6e02016-02-04 16:10:52 +010039after_success:
PavolVican728416d2017-06-07 15:05:44 +020040 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; ./packages/create-package.sh; fi