Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 1 | os: linux |
| 2 | sudo: required |
| 3 | dist: trusty |
| 4 | language: c |
| 5 | |
| 6 | compiler: |
| 7 | - clang |
| 8 | - gcc |
| 9 | |
| 10 | branches: |
| 11 | only: |
| 12 | - master |
| 13 | - devel |
| 14 | |
| 15 | before_install: |
| 16 | - sudo apt-get install -y zlib1g-dev |
| 17 | - sudo apt-get install -y libssl-dev |
Michal Vasko | 8840889 | 2016-02-09 14:23:19 +0100 | [diff] [blame] | 18 | - wget https://red.libssh.org/attachments/download/177/libssh-0.7.2.tar.xz |
| 19 | - tar -xJf libssh-0.7.2.tar.xz |
| 20 | - mkdir libssh-0.7.2/build && cd libssh-0.7.2/build |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 21 | - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 22 | - cd ../.. |
| 23 | |
| 24 | - wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz |
| 25 | - tar -xJf cmocka-1.0.1.tar.xz |
| 26 | - mkdir cmocka-1.0.1/build && cd cmocka-1.0.1/build |
| 27 | - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 28 | - cd ../.. |
| 29 | |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 30 | - git clone https://github.com/CESNET/libyang.git |
| 31 | - mkdir libyang/build && cd libyang/build |
| 32 | - git checkout devel |
| 33 | - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 34 | - cd ../.. |
| 35 | |
Radek Krejci | 3b5d23d | 2016-02-10 14:58:31 +0100 | [diff] [blame] | 36 | - if [ "${CC}" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 37 | |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 38 | script: |
Michal Vasko | 7aea21e | 2016-02-09 14:41:23 +0100 | [diff] [blame] | 39 | - mkdir build && cd build ; cmake -DENABLE_TLS=ON -DENABLE_SSH=ON .. && make -j2 && make test |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 40 | |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 41 | after_success: |
Radek Krejci | 1cbe0b1 | 2016-02-04 18:00:37 +0100 | [diff] [blame] | 42 | - if [ "${CC}" = "gcc" ]; then codecov; fi |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 43 | |