blob: 35a362fd964eb06bdf8d642fa59ed9d9b8ca831e [file] [log] [blame]
Radek Krejcic22fd3a2016-01-19 14:14:32 +01001language: c
2
Michal Vasko7f5c1c62016-07-21 13:42:53 +02003matrix:
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 Vasko1d70e102018-03-23 13:31:21 +010013 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"
Michal Vasko7f5c1c62016-07-21 13:42:53 +020021 - os: osx
22 compiler: gcc
23 allow_failures:
24 - os: osx
Radek Krejcic22fd3a2016-01-19 14:14:32 +010025
26branches:
27 only:
28 - master
29 - devel
30
31before_install:
Michal Vasko1d70e102018-03-23 13:31:21 +010032 - eval "${MATRIX_EVAL}"
Michal Vasko7f5c1c62016-07-21 13:42:53 +020033 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then bash .travis-deps-linux.sh; fi
34 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
35 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then bash .travis-deps-osx.sh; fi
Radek Krejcic1bf9bf2016-02-04 17:20:37 +010036
Michal Vasko50c8d3e2016-02-25 15:03:15 +010037script:
Radek Krejci29364b82017-05-26 16:33:40 +020038 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then export OPENSSLFLAGS="-DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include"; fi
Michal Vaskof62f6a62018-03-21 12:20:47 +010039 - cd $TRAVIS_BUILD_DIR && mkdir build_none && cd build_none ; cmake -DENABLE_TLS=OFF -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && ctest --output-on-failure
40 - cd $TRAVIS_BUILD_DIR && mkdir build_tls && cd build_tls ; cmake $OPENSSLFLAGS -DENABLE_TLS=ON -DENABLE_SSH=OFF -DENABLE_DNSSEC=OFF .. && make -j2 && ctest --output-on-failure
41 - cd $TRAVIS_BUILD_DIR && mkdir build_ssh && cd build_ssh ; cmake $OPENSSLFLAGS -DENABLE_TLS=OFF -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && ctest --output-on-failure
42 - cd $TRAVIS_BUILD_DIR && mkdir build_ssh_tls && cd build_ssh_tls ; cmake $OPENSSLFLAGS -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=OFF .. && make -j2 && ctest --output-on-failure
43 - cd $TRAVIS_BUILD_DIR && mkdir build_all && cd build_all ; cmake $OPENSSLFLAGS -DENABLE_TLS=ON -DENABLE_SSH=ON -DENABLE_DNSSEC=ON .. && make -j2 && ctest --output-on-failure
PavolVican384786e2017-07-12 15:31:20 +020044 - cd -
Radek Krejcic22fd3a2016-01-19 14:14:32 +010045
Radek Krejcic1bf9bf2016-02-04 17:20:37 +010046after_success:
PavolVican384786e2017-07-12 15:31:20 +020047 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" ]; then codecov; ./packages/create-package.sh; fi