language: cpp
git:
  submodules: true
jobs:
  include:
  - os: linux
    dist: bionic
    addons:
      apt:
        packages:
        - libjack-dev
        - liblhasa-dev
        - librtmidi-dev
        - libsdl2-dev
        - libzzip-dev
    script: &cmake_build
    - mkdir build
    - pushd build
    - cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 ..
    - cmake --build .
    - cpack
    - popd
  - os: osx
    addons:
      homebrew:
        packages:
        - xmlto
    before_install:
    - pushd resources/pictures/docicons/osx
    - wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/docerator/docerator-2.0.zip
    - unzip docerator-2.0.zip -d docerator
    - rm docerator-2.0.zip
    - "/usr/bin/python genicons.py"
    - popd
    script: *cmake_build
deploy:
  provider: releases
  token: $GITHUB_TOKEN
  skip_cleanup: true
  file_glob: true
  file: build/milkytracker-*
  on:
    repo: milkytracker/MilkyTracker
    tags: true
