branches:
  only:
    - develop
    - develop-osx

language: cpp

matrix:
  include:
    - os: osx
      osx_image: xcode8.3
      compiler: clang
      env: >
        ONEDATA_GIT_URL="https://github.com/onedata"
        OSX_CODENAME=sierra
        PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/opt/nss/lib/pkgconfig"

cache:
  directories:
    - $HOME/Library/Caches/Homebrew
    - $HOME/.ccache

before_install:
  - brew update
  - brew install ccache
  - PATH=/usr/local/opt/ccache/libexec:$PATH
  - brew install gnu-sed --with-default-names && brew link --force gnu-sed
  - brew upgrade python
  - brew outdated boost || brew upgrade boost
  - brew install boost-python
  - brew install libtool
  - brew install libsodium && brew link --force libsodium
  - brew install ninja && brew link --force ninja
  - brew outdated poco || brew upgrade poco
  - brew outdated libevent || brew upgrade libevent
  - brew outdated openssl || brew upgrade openssl
  - brew install nspr && brew unlink nspr && brew link --force nspr
  - brew install nss && brew unlink nss && brew link --force nss
  - brew install tbb && brew unlink tbb && brew link --force tbb
  - brew install glog && brew unlink glog && brew link glog
  - brew install protobuf
  - brew install protobuf-c
  - brew install erlang
  - brew install aws-sdk-cpp
  - brew tap onedata/onedata
  - brew install onedata/onedata/folly
  - brew install libiberty
  - brew install swift-cpp-sdk
  - brew install glusterfs-api
  - brew install Caskroom/cask/osxfuse

script:
  - >
    make release WITH_CEPH=OFF
                 WITH_S3=ON
                 WITH_SWIFT=ON
                 WITH_GLUSTERFS=ON
                 OPENSSL_ROOT_DIR=/usr/local/opt/openssl
                 OPENSSL_LIBRARIES=/usr/local/opt/openssl/lib

after_script: set +e
