language: cpp

matrix:
  include:
    - os: linux
      dist: xenial
      compiler: clang
    - os: linux
      dist: xenial
      compiler: gcc
    - os: osx
      osx_image: xcode10.1
      compiler: clang

deploy:
  provider: releases
  api_key:
    secure: "T9pOxkNsm3cvyUq7tw+uwf4b+6nlDbsYj5Khl9BVUlPJ75q2hfuk6sHe4HaDkJeIgb/ScCNvBNfBOyQXWMfxbne32wMIjRWhemDYppIcHXdbmIb9mBaTmqBFR+EINQES22yM0sfjoKT8isLulKqHO7Yt2qcpdCFmBYgxKUt1+uhSCQtheNHR87BrtY63gJSHdAjq550GDwQR3cTMnMOopqaOzMHO5mTPH7EDF3zCGdt/1sJDfV07p4i/VP5lYQsclDmYTuWcbZ/rP8MO/UiKnJVfvKrW0oyzGeyhWBE5KiOfe9LFcD6yUiPBBGKXHsp44Etw0S4iTgLytsGIGm0efq8nMTldPEOPnUM8g0/+230ELfhQZkMDzyMKZwRNGpENMpDWJhccCaYI5wlI1ugKAga5DusqLVNj4lG+H75ca5BCyTR+cnj2ZgUoDaiJQ6VkbNG6RP7v1yH7rZlUKiP6d6MIDDnJexF6JvZLXaX21FuLHR2qm6Lqwmlkb16TEnJDsRF7I37IqsQXNmEksT4AeUHm1PxbFjWm8BZoYhIQlHC5dAQOftCufns1qhbvqn0xLlHREYgIoxKnmi+RmvXz+GShG6PbIuCpsDE49/fCoMd8sCMGt01icj9lEQXY6B13QvBAJ3WB10IAM9IkXmSZ8YoKfZosT1hBbNrL7AoPrS0="
  skip_cleanup: true
  on:
    tags: true
    condition: $CC = clang-7 || "$TRAVIS_OS_NAME" == "osx"
  draft: true

  file:
  - $EMOJICODE_DIST_ARCHIVE

addons:
  homebrew:
    packages:
    - llvm@7
    - ninja

before_install:
- source .travis/install.sh

script:
- mkdir build && cd build && cmake .. -GNinja && ninja && ninja tests && EMOJICODE_DIST_ARCHIVE=$(python3 ../dist.py archive)