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 |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 13 | |
| 14 | before_install: |
| 15 | - sudo apt-get install -y zlib1g-dev |
| 16 | - sudo apt-get install -y libssl-dev |
Michal Vasko | 5e9acf1 | 2016-02-25 15:30:41 +0100 | [diff] [blame] | 17 | - sudo apt-get install -y libval-dev |
Radek Krejci | b42427e | 2016-07-15 09:53:22 +0200 | [diff] [blame^] | 18 | - wget https://git.libssh.org/projects/libssh.git/snapshot/libssh-0.7.3.tar.bz2 |
| 19 | - tar -xjf libssh-0.7.3.tar.bz2 |
| 20 | - mkdir libssh-0.7.3/build && cd libssh-0.7.3/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 |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 32 | - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install |
| 33 | - cd ../.. |
| 34 | |
Radek Krejci | 3b5d23d | 2016-02-10 14:58:31 +0100 | [diff] [blame] | 35 | - if [ "${CC}" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 36 | |
Michal Vasko | 50c8d3e | 2016-02-25 15:03:15 +0100 | [diff] [blame] | 37 | script: |
Michal Vasko | 989fc1d | 2016-02-25 15:15:44 +0100 | [diff] [blame] | 38 | - mkdir build_none && cd build_none ; cmake -DENABLE_TLS=OFF -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd .. |
| 39 | - mkdir build_tls && cd build_tls ; cmake -DENABLE_TLS=ON -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd .. |
| 40 | - mkdir build_ssh && cd build_ssh ; cmake -DENABLE_TLS=OFF -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd .. |
| 41 | - mkdir build_ssh_tls && cd build_ssh_tls ; cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd .. |
| 42 | - mkdir build_all && cd build_all ; cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=ON .. && make -j2 && make test && cd .. |
Radek Krejci | c22fd3a | 2016-01-19 14:14:32 +0100 | [diff] [blame] | 43 | |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 44 | after_success: |
Radek Krejci | 1cbe0b1 | 2016-02-04 18:00:37 +0100 | [diff] [blame] | 45 | - if [ "${CC}" = "gcc" ]; then codecov; fi |
Radek Krejci | c1bf9bf | 2016-02-04 17:20:37 +0100 | [diff] [blame] | 46 | |