blob: 7755bda8c2f5c5579eba9be7cecc089c9463dc3a [file] [log] [blame]
Radek Krejcic22fd3a2016-01-19 14:14:32 +01001os: linux
2sudo: required
3dist: trusty
4language: c
5
6compiler:
7 - clang
8 - gcc
9
10branches:
11 only:
12 - master
13 - devel
14
15before_install:
16 - sudo apt-get install -y zlib1g-dev
17 - sudo apt-get install -y libssl-dev
Michal Vasko5e9acf12016-02-25 15:30:41 +010018 - sudo apt-get install -y libval-dev
Michal Vasko88408892016-02-09 14:23:19 +010019 - wget https://red.libssh.org/attachments/download/177/libssh-0.7.2.tar.xz
20 - tar -xJf libssh-0.7.2.tar.xz
21 - mkdir libssh-0.7.2/build && cd libssh-0.7.2/build
Radek Krejcic22fd3a2016-01-19 14:14:32 +010022 - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
23 - cd ../..
24
25 - wget https://cmocka.org/files/1.0/cmocka-1.0.1.tar.xz
26 - tar -xJf cmocka-1.0.1.tar.xz
27 - mkdir cmocka-1.0.1/build && cd cmocka-1.0.1/build
28 - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
29 - cd ../..
30
Radek Krejcic22fd3a2016-01-19 14:14:32 +010031 - git clone https://github.com/CESNET/libyang.git
32 - mkdir libyang/build && cd libyang/build
Radek Krejciff596c52016-07-14 16:17:03 +020033 - git checkout devel
Radek Krejcic22fd3a2016-01-19 14:14:32 +010034 - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. && make -j2 && sudo make install
35 - cd ../..
36
Radek Krejci3b5d23d2016-02-10 14:58:31 +010037 - if [ "${CC}" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
Radek Krejcic1bf9bf2016-02-04 17:20:37 +010038
Michal Vasko50c8d3e2016-02-25 15:03:15 +010039script:
Michal Vasko989fc1d2016-02-25 15:15:44 +010040 - mkdir build_none && cd build_none ; cmake -DENABLE_TLS=OFF -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd ..
41 - mkdir build_tls && cd build_tls ; cmake -DENABLE_TLS=ON -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd ..
42 - mkdir build_ssh && cd build_ssh ; cmake -DENABLE_TLS=OFF -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd ..
43 - mkdir build_ssh_tls && cd build_ssh_tls ; cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && make test && cd ..
44 - mkdir build_all && cd build_all ; cmake -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=ON .. && make -j2 && make test && cd ..
Radek Krejcic22fd3a2016-01-19 14:14:32 +010045
Radek Krejcic1bf9bf2016-02-04 17:20:37 +010046after_success:
Radek Krejci1cbe0b12016-02-04 18:00:37 +010047 - if [ "${CC}" = "gcc" ]; then codecov; fi
Radek Krejcic1bf9bf2016-02-04 17:20:37 +010048