language: cpp

os:
  - linux
  - osx

dist: focal

osx_image:
  - xcode12

compiler:
  - gcc
  # - clang

addons:
  apt:
    packages:
      - libboost-all-dev

before_install:
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update            ; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install boost make; fi

script:
  - ./configure
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then gmake             ; else make             ; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then gmake test        ; else make test        ; fi
  - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sudo gmake install; else sudo make install; fi

jobs:
  allow_failures:
    - os: osx

