language: generic
before_install:
    - sh package/linux/travis-decrypt-key
script:
    - bash package/linux/travis-setup.sh
    - mkdir build && cd build
    - cmake -DBOOST_ROOT=$BOOST_DIR -DSLIC3R_STATIC=1 ../src
    - cmake --build .
branches:
  only:
  - master
  - cppgui
cache:
  apt: true
  directories:
  - "$HOME/cache"
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-7
    - gcc-7
    - libgtk2.0-0 
    - libgtk2.0-dev
    - freeglut3
    - cmake
    - wx3.0-headers
    - libwxgtk3.0-dev
    - wx-common
  ssh_known_hosts: dl.slic3r.org
notifications:
  irc:
    channels:
    - chat.freenode.net#slic3r
    on_success: change
    on_failure: always
    use_notice: true
dist: trusty
matrix:
    include:
        - os: linux
          env: 
            - WXVERSION=pkg
            - CC=gcc-7
            - CXX=g++-7
            - BOOST_DIR=$HOME/boost_1_63_0
          after_success:
            - cp slic3r ../
            - LD_LIBRARY_PATH=$WXDIR/lib package/linux/make_archive.sh linux-x64
            - package/linux/appimage.sh x86_64
            - package/deploy/sftp.sh linux ~/slic3r-upload.rsa *.bz2 Slic3r*.AppImage
            - package/deploy/sftp-symlink.sh linux ~/slic3r-upload.rsa AppImage Slic3r*.AppImage
            - package/deploy/sftp-symlink.sh linux ~/slic3r-upload.rsa tar.bz2 *.bz2
        - os: osx      
          env:
            - WXVERSION=pkg
            - BOOST_DIR=$HOME/boost_1_63_0
env:
  global:
  - secure: eEVRZNMv7FM6jrOU9iAFkDhWxFQ1WtHBEaObImcvtFUxy6vWSt3ehFFeTRouj3uHQAnbvUzziDyvPPm8/95alv5g/du8ML6YzzqKBKfazM0xQ7SF6R2DQL8lfFIp+RSV7T02byEP1f1g7Zva7xH9szIlDcSfU0pXW4KWbkBFMd8=
  - secure: gj338h+qHGccTD/VQFmEJkqdg2McIe2pO0iZ4Ae9BvY5vxkIML4BpoYZQXQTqiAOETnUjlcknY9lx0hI/PfkDD9MSJc5BC/3fMYRCu3SgAclEwklWf9vvtodUeT69mtnZuw1zze1nTbExuOw2mepbqFjxKKMl+9l5oCz4O54fXU=
