sudo: false
dist: xenial
addons:
  homebrew:
    packages:
    - openssl

matrix:
  fast_finish: true
  include:
  - language: java
    jdk: openjdk8
    env:
    - MAVEN_OPTS=-Xmx2g MAVEN_SKIP_RC=true
    script:
    - cd java
    - mvn -Panalyze clean package
    - mvn apache-rat:check

  - language: cpp
    compiler: gcc
    os: linux

  - language: cpp
    compiler: clang
    os: linux
    addons:
      apt:
         sources:
           - llvm-toolchain-trusty-4.0
         packages:
           - clang-4.0
    before_script:
      - export CC=clang-4.0
      - export CXX=clang++-4.0

  - language: cpp
    compiler: clang
    os: osx
    osx_image: xcode11.3
    script:
    - brew link --overwrite --force openssl
    - mkdir build
    - cd build
    - cmake -DBUILD_JAVA=OFF -DOPENSSL_ROOT_DIR=`brew --prefix openssl` ..
    - travis_wait 35 make package test-out

  - language: cpp
    compiler: clang
    os: osx
    osx_image: xcode12
    script:
    - brew link --overwrite --force openssl
    - mkdir build
    - cd build
    - cmake -DBUILD_JAVA=OFF -DOPENSSL_ROOT_DIR=`brew --prefix openssl` ..
    - travis_wait 35 make package test-out

cache:
  directories:
  - $HOME/.m2

script:
  - mkdir build
  - cd build
  - cmake -DBUILD_JAVA=OFF ..
  - travis_wait 35 make package test-out
