blob: fe72fa19a0de2ec7812e481486bcff4e8b79c177 [file] [log] [blame]
Radek Krejci1ba11c42015-06-15 13:40:36 +02001language: c
Radek Krejci6757fae2015-06-15 14:42:01 +02002
Radek Krejcia0287592016-07-19 14:04:07 +02003matrix:
4 include:
Michal Vaskoe8995492019-10-18 09:14:42 +02005 - arch: amd64
Michal Vasko9b2b1622019-10-18 09:12:11 +02006 os: linux
Michal Vasko849287a2019-10-18 10:13:37 +02007 dist: bionic
Radek Krejcia0287592016-07-19 14:04:07 +02008 sudo: required
9 compiler: clang
Michal Vasko4e8d59c2019-10-18 09:36:38 +020010 env: TRAVIS_ARCH="amd64"
Michal Vaskoe8995492019-10-18 09:14:42 +020011 - arch: amd64
Michal Vasko9b2b1622019-10-18 09:12:11 +020012 os: linux
Michal Vasko849287a2019-10-18 10:13:37 +020013 dist: bionic
Radek Krejcia0287592016-07-19 14:04:07 +020014 sudo: required
15 compiler: gcc
Michal Vasko4e8d59c2019-10-18 09:36:38 +020016 env: TRAVIS_ARCH="amd64"
Michal Vaskoe8995492019-10-18 09:14:42 +020017 - arch: arm64
18 os: linux
Michal Vasko849287a2019-10-18 10:13:37 +020019 dist: bionic
Michal Vaskoe8995492019-10-18 09:14:42 +020020 sudo: required
21 compiler: gcc
Michal Vasko4e8d59c2019-10-18 09:36:38 +020022 env: TRAVIS_ARCH="arm64"
Michal Vaskoe8995492019-10-18 09:14:42 +020023 - arch: amd64
Michal Vasko9b2b1622019-10-18 09:12:11 +020024 os: linux
Michal Vasko849287a2019-10-18 10:13:37 +020025 dist: bionic
Michal Vasko731f9c62019-04-16 16:23:07 +020026 sudo: required
27 compiler: gcc
Michal Vasko4e8d59c2019-10-18 09:36:38 +020028 env: TRAVIS_ARCH="amd64" ENABLE_STATIC=ON
Michal Vasko9b2b1622019-10-18 09:12:11 +020029 - arch: amd64
30 os: osx
Radek Krejcia0287592016-07-19 14:04:07 +020031 compiler: gcc
Michal Vasko4e8d59c2019-10-18 09:36:38 +020032 env: TRAVIS_ARCH="amd64"
Radek Krejcia0287592016-07-19 14:04:07 +020033 allow_failures:
34 - os: osx
Radek Krejci6757fae2015-06-15 14:42:01 +020035
Radek Krejci1ba11c42015-06-15 13:40:36 +020036branches:
37 only:
38 - master
Radek Krejci2bb207f2015-08-13 08:11:10 +020039 - devel
Radek Krejci1ba11c42015-06-15 13:40:36 +020040
Radek Krejci5936e192015-10-05 15:56:31 +020041before_install:
Lukas Macko5f490e62016-10-31 11:08:39 +010042 - git clone git://git.cryptomilk.org/projects/cmocka.git
43 - cd cmocka && mkdir build && cd build
Radek Krejci51aa74c2018-02-01 08:56:25 +010044 - cmake .. && make -j2 && sudo make install
Radek Krejci1f8d2232015-10-05 16:34:12 +020045 - cd ../..
Michal Vaskob469b6d2018-02-15 15:53:44 +010046 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
Michal Vasko65644a32019-10-18 10:22:26 +020047 - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; sudo apt-get install -y valgrind libpcre3-dev python3-dev swig; fi
Michal Vasko29aaab82019-10-18 10:28:00 +020048 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then pip install --user codecov; export CFLAGS="-coverage"; fi
Radek Krejci5936e192015-10-05 15:56:31 +020049
Michal Vaskofe4b7c72016-05-18 13:44:21 +020050script:
Michal Vasko57e70c92018-02-15 15:56:01 +010051 - mkdir build && cd build
Radek Krejci0e6388e2018-12-11 09:22:16 +010052 - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DENABLE_VALGRIND_TESTS=OFF ..; fi
Michal Vasko46241382019-10-18 10:19:49 +020053 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "amd64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_STATIC=${ENABLE_STATIC:-OFF} ..; fi
54 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$TRAVIS_ARCH" = "arm64" ]; then cmake -DGEN_LANGUAGE_BINDINGS=ON -DENABLE_VALGRIND_TESTS=OFF ..; fi
Michal Vasko57e70c92018-02-15 15:56:01 +010055 - make -j2 && ctest --output-on-failure
Radek Krejci9d42d0a2017-04-28 13:33:33 +020056 - cd -
Radek Krejci6757fae2015-06-15 14:42:01 +020057
Radek Krejci1a7c6e02016-02-04 16:10:52 +010058after_success:
Michal Vasko29aaab82019-10-18 10:28:00 +020059 - if [ "$TRAVIS_OS_NAME" = "linux" -a "$CC" = "gcc" -a "$TRAVIS_ARCH" = "amd64" ]; then codecov; ./packages/create-package.sh; fi