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: |
Michal Vasko | 3e107ed | 2018-03-22 16:05:25 +0100 | [diff] [blame] | 24 | - eval "${MATRIX_EVAL}" |
Lukas Macko | 5f490e6 | 2016-10-31 11:08:39 +0100 | [diff] [blame] | 25 | - git clone git://git.cryptomilk.org/projects/cmocka.git |
| 26 | - cd cmocka && mkdir build && cd build |
Radek Krejci | 51aa74c | 2018-02-01 08:56:25 +0100 | [diff] [blame] | 27 | - cmake .. && make -j2 && sudo make install |
Radek Krejci | 1f8d223 | 2015-10-05 16:34:12 +0200 | [diff] [blame] | 28 | - cd ../.. |
Michal Vasko | b469b6d | 2018-02-15 15:53:44 +0100 | [diff] [blame] | 29 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi |
Mislav Novakovic | 1ec78bd | 2018-09-04 15:44:26 +0200 | [diff] [blame] | 30 | - 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 |
PavolVican | d30c3d9 | 2018-06-25 15:29:20 +0200 | [diff] [blame] | 31 | - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi |
Radek Krejci | 5936e19 | 2015-10-05 15:56:31 +0200 | [diff] [blame] | 32 | |
Michal Vasko | fe4b7c7 | 2016-05-18 13:44:21 +0200 | [diff] [blame] | 33 | script: |
Michal Vasko | 57e70c9 | 2018-02-15 15:56:01 +0100 | [diff] [blame] | 34 | - mkdir build && cd build |
Radek Krejci | 0e6388e | 2018-12-11 09:22:16 +0100 | [diff] [blame] | 35 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi |
Michal Vasko | 57e70c9 | 2018-02-15 15:56:01 +0100 | [diff] [blame] | 36 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON ..; fi |
| 37 | - make -j2 && ctest --output-on-failure |
Radek Krejci | 9d42d0a | 2017-04-28 13:33:33 +0200 | [diff] [blame] | 38 | - cd - |
Radek Krejci | 6757fae | 2015-06-15 14:42:01 +0200 | [diff] [blame] | 39 | |
Radek Krejci | 1a7c6e0 | 2016-02-04 16:10:52 +0100 | [diff] [blame] | 40 | after_success: |
PavolVican | d30c3d9 | 2018-06-25 15:29:20 +0200 | [diff] [blame] | 41 | - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc-7" ]; then codecov; ./packages/create-package.sh; fi |