blob: 1a519e81c0c5fbbd28dbccf7ec92907bc1bf5326 [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
Michal Vasko3e107ed2018-03-22 16:05:25 +010013 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"
Radek Krejcia0287592016-07-19 14:04:07 +020021 - os: osx
22 compiler: gcc
23 allow_failures:
24 - os: osx
Radek Krejci6757fae2015-06-15 14:42:01 +020025
Radek Krejci1ba11c42015-06-15 13:40:36 +020026branches:
27 only:
28 - master
Radek Krejci2bb207f2015-08-13 08:11:10 +020029 - devel
Radek Krejci1ba11c42015-06-15 13:40:36 +020030
Radek Krejci5936e192015-10-05 15:56:31 +020031before_install:
Michal Vasko3e107ed2018-03-22 16:05:25 +010032 - eval "${MATRIX_EVAL}"
Lukas Macko5f490e62016-10-31 11:08:39 +010033 - git clone git://git.cryptomilk.org/projects/cmocka.git
34 - cd cmocka && mkdir build && cd build
Radek Krejci51aa74c2018-02-01 08:56:25 +010035 - cmake .. && make -j2 && sudo make install
Radek Krejci1f8d2232015-10-05 16:34:12 +020036 - cd ../..
Michal Vaskob469b6d2018-02-15 15:53:44 +010037 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
Mislav Novakovic1ec78bd2018-09-04 15:44:26 +020038 - 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 +020039 - 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 +020040
Michal Vaskofe4b7c72016-05-18 13:44:21 +020041script:
Michal Vasko57e70c92018-02-15 15:56:01 +010042 - mkdir build && cd build
43 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake ..; fi
44 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON ..; fi
45 - make -j2 && ctest --output-on-failure
Radek Krejci9d42d0a2017-04-28 13:33:33 +020046 - cd -
Radek Krejci6757fae2015-06-15 14:42:01 +020047
Radek Krejci1a7c6e02016-02-04 16:10:52 +010048after_success:
PavolVicand30c3d92018-06-25 15:29:20 +020049 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then codecov; ./packages/create-package.sh; fi