language: cpp
env:
  global:
  - FORCE_INSTALL=1
  - secure: mdPkBZcp5yTpbT3pfxoXt9ibMPnGxaKhGxgowutc/lTqGb2P+ki/GtbJ7+MriIIH3xmP6yGxyuSWHOD6TaZr3ol9tdPlN/sLGnveRVWlCEaFKkKh7JOzc526gqxcI0AVPJ/OJjz9rgmlUcZ55ZJOIVNJDh8MpIatT5U/N4JpbQINtzTrRi2CjU6Rg/6UWWFqEqhZfPDZDKgIHI2MPJvAbq3oPeZlxBJ96zYP29fDGfKvZJY86UY7bQWSjE76c+EegZ2EG5CrrowioKO0sURlhn+7kEp3GFcQnXBfeYY81AK5Gt1EGZQ5Louaf3C5k7YKNLDRMUuN+3XgihP30Rwaky4G9yaLkRud7B6FsfZVjHDWR9+46j5eKn7/cZOKulFY2WLUYZq7AFJRSZsR4kR0AM7yxw3paN8e/3iStPaeuE2KH4y2vCChJ0SCuuatc/A3/zNbVRZoBfq2yvrBhPXKma4L6Xcd9c/j3nfe1vkfloFBu+JljlCq2d28A4OYQsjAIwsorlgVOmhz6/Gfoq6+VLICiU+WzRSEhwijHD+CydCD0CkRP3MfhqkrDRGJIlRw2/czaFvTRjJOhlW+NTaFDcJEomO54jPWjKsmX/q80tT91EKslSWifNepICLAabaQwdrlgQ7TuIhs5PQlmA0gmIwwzBEcw9JmB4wqD/AUxj8=

matrix:
  include:
  - os: osx
    name: "Build"
    osx_image: xcode10.2
    compiler: clang

    script:
    - "./macbuild.tool"

    deploy:
      provider: releases
      skip_cleanup: true
      file:
      - Binaries/RELEASE/*.zip
      - Binaries/DEBUG/*.zip
      file_glob: true
      on:
        tags: true
      api_key:
        secure: Dtk7GX0mJlhbmYtpPaR5kTFCcRdBOEl5lEMSIODnxb+Oznwdjuj1iXsgG3WtmFY1yLShgHWAuVdHFCLcWWJIZ9bXRrkkZ75Tl3WPpNG48GVdc+ayyQrkCLYne3WIYTxd1NmXNceKfrQpD8O9R4IYQ5SJEY9d0L4KgLYvERtD5V6rsSX/T+OZZI1gTXFa9MvO6EQqfSGptXNTLZnkogZDB7bp/YZi46lFFaj3eutwEVEm9lEPjiND0L/zUjZXsEII7H7NocBSayJGWPGfFuiYa1lsQsEFAQyqbdgTa4+O1eby9qDJOaCHoFwbe2Fs7pi3fzegy2Jk4+zIleyuM0qXv26yS+gnDqmaruphXhXz+PtAkmw0sov40pKrbcHuRPfGx1lUX68PhqEg3S2vtKELPMhmLpRmy5dC8+dr4D7MJ3kQWCLy2vwrNg/EJJtsRhxg+h8Xo504g3aD7a4MOB/sAX0ITeiOZf9r0agxB69vpMaF5Jve7RrF9s0qGSSFA1L82U+WXywZr4qk/RG+ZjpnxlDJb3mMeTnAF1YrpIdsZrSL6eUWZACLpGrDLTTLGmMvgkqUEsXnFMQUovAIkEP3fzxU5mORTtLQu6kYP2fHJZXfI/HLmEFxnh4N43c7Tgh9biPAKHnABlA4csUl8Y4rRu72fQdEEq9cYxR4wFmAkhs=

  - os: osx
    name: "Analyze Coverity"
    osx_image: xcode10.2
    compiler: clang
    
    before_install:
      - curl -Ls https://entrust.com/root-certificates/entrust_l1k.cer -o ~/entrust_l1k.crt || exit 1
      - curl -LS https://curl.haxx.se/ca/cacert.pem -o ~/cacert.pem || exit 1
      - cat ~/entrust_l1k.crt >> ~/cacert.pem || exit 1
      - echo "cacert=\"$HOME/cacert.pem\"" > ~/.curlrc || exit 1
      - echo "ca_certificate=$HOME/cacert.pem" > ~/.wgetrc || exit 1

    script:
      - echo "This script runs coverity..."

    addons:
      coverity_scan:
        project:
          name: "acidanthera/AppleSupportPkg"
          description: "AppleSupportPkg"
        notification_email: $NOTIFICATION_EMAIL
        build_command_prepend: "./macbuild.tool --skip-build --skip-package && cd UDK ; src=$(/usr/bin/curl -Lfs https://raw.githubusercontent.com/acidanthera/Lilu/master/Lilu/Scripts/covstrap.sh) && eval \"$src\" || exit 1"
        build_command: "../macbuild.tool --skip-tests --skip-package RELEASE"
        branch_pattern: master
