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