Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.travis.yml 1.51 KiB
---

language: cpp
sudo: required
dist: trusty

services:
  - docker

notifications:
  email: false

matrix:
  include:
    - os: osx
      osx_image: xcode8
      compiler: clang
      env:
        - OPENSLL_ROOT_DIR=/usr/local/opt/openssl
        - TESTS=OFF
    - os: linux
      compiler: gcc
      env:
        - CXX_VERSION=g++-6
        - TESTS=ON
      addons:
        apt:
          sources:
            - "ubuntu-toolchain-r-test"
          packages:
            - "g++-6"
    - os: linux
      compiler: clang
      env:
        - CXX_VERSION=clang++-5.0
        - LINT=ON
        - TESTS=ON
      addons:
        apt:
          sources:
            - "ubuntu-toolchain-r-test"
            - "llvm-toolchain-trusty-5.0"
          packages:
            - "clang++-5.0"
            - "clang-5.0"
            - "g++-7"

install:
  - if [ $TRAVIS_OS_NAME == linux ]; then sudo add-apt-repository -y ppa:george-edison55/cmake-3.x; fi
  - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get update -qq; fi
  - if [ $TRAVIS_OS_NAME == linux ]; then sudo apt-get install -qq -y cmake; fi

script:
  - if [[ "${CXX_VERSION}" != "" ]]; then export CXX=${CXX_VERSION}; fi

  - $CXX --version
  - cmake --version

  # Build library, examples & tests
  - cmake -H. -Bbuild -DOPENSSL_ROOT_DIR=$OPENSLL_ROOT_DIR -DBUILD_LIB_TESTS=$TESTS -DBUILD_OLM=1
  - cmake --build build

  # Unit & Integration tests
  - if [ $TESTS == ON ]; then make synapse; fi
  - if [ $TESTS == ON ]; then make test; fi

  # Linting
  - if [ $LINT == ON ]; then make lint; fi