language: cpp
sudo: false
osx_image: xcode11.6

git:
  submodules: true

script:
  - ./compile-cmake.sh
  
compiler:
# - clang
  - gcc
  
os:
  - linux
  - osx

# before_deploy:
#   # Set up git user name and tag this commit
#   - git config --local user.name Soulghost
#   - git config --local user.email xiuyutong1994@163.com
#   - export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)}
#   - git tag $TRAVIS_TAG

deploy:
  provider: releases
  prerelease: true
  api_key: $deploy_token
  file: 
    - cmake-build/iblessing-darwin
    - cmake-build/iblessing-darwin-all
    - cmake-build/iblessing-linux
    - cmake-build/iblessing-linux-all
    - cmake-build/iblessing-framework-darwin.tar.gz
    - cmake-build/iblessing-framework-linux.tar.gz
    - iblessing/plugins/simprocedure/iblessing-simple-simprocedure.json
  skip_cleanup: true
  on:
    tags: true
