Radek Krejci | 1ba11c4 | 2015-06-15 13:40:36 +0200 | [diff] [blame] | 1 | language: c |
Radek Krejci | 6757fae | 2015-06-15 14:42:01 +0200 | [diff] [blame] | 2 | |
Radek Krejci | a028759 | 2016-07-19 14:04:07 +0200 | [diff] [blame] | 3 | matrix: |
| 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 Krejci | 6757fae | 2015-06-15 14:42:01 +0200 | [diff] [blame] | 17 | |
Radek Krejci | 1ba11c4 | 2015-06-15 13:40:36 +0200 | [diff] [blame] | 18 | branches: |
| 19 | only: |
| 20 | - master |
Radek Krejci | 2bb207f | 2015-08-13 08:11:10 +0200 | [diff] [blame] | 21 | - devel |
Radek Krejci | 1ba11c4 | 2015-06-15 13:40:36 +0200 | [diff] [blame] | 22 | |
Radek Krejci | 5936e19 | 2015-10-05 15:56:31 +0200 | [diff] [blame] | 23 | before_install: |
Lukas Macko | 5f490e6 | 2016-10-31 11:08:39 +0100 | [diff] [blame] | 24 | - git clone git://git.cryptomilk.org/projects/cmocka.git |
| 25 | - cd cmocka && mkdir build && cd build |
Radek Krejci | 51aa74c | 2018-02-01 08:56:25 +0100 | [diff] [blame] | 26 | - cmake .. && make -j2 && sudo make install |
Radek Krejci | 1f8d223 | 2015-10-05 16:34:12 +0200 | [diff] [blame] | 27 | - cd ../.. |
Michal Vasko | b469b6d | 2018-02-15 15:53:44 +0100 | [diff] [blame] | 28 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi |
Michal Vasko | aad3998 | 2018-02-15 14:14:08 +0100 | [diff] [blame] | 29 | - 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 Krejci | a028759 | 2016-07-19 14:04:07 +0200 | [diff] [blame] | 30 | - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi |
Radek Krejci | 5936e19 | 2015-10-05 15:56:31 +0200 | [diff] [blame] | 31 | |
Michal Vasko | fe4b7c7 | 2016-05-18 13:44:21 +0200 | [diff] [blame] | 32 | script: |
Michal Vasko | 57e70c9 | 2018-02-15 15:56:01 +0100 | [diff] [blame] | 33 | - 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 Krejci | 9d42d0a | 2017-04-28 13:33:33 +0200 | [diff] [blame] | 37 | - cd - |
Radek Krejci | 6757fae | 2015-06-15 14:42:01 +0200 | [diff] [blame] | 38 | |
Radek Krejci | 1a7c6e0 | 2016-02-04 16:10:52 +0100 | [diff] [blame] | 39 | after_success: |
PavolVican | 728416d | 2017-06-07 15:05:44 +0200 | [diff] [blame] | 40 | - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; ./packages/create-package.sh; fi |