language: cpp
compiler:
- gcc
os:
- linux
- osx
dist: trusty
before_install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install scons mingw32 mingw32-binutils zlib1g-dev libcppunit-dev; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install https://sourceforge.net/p/nsis/code/HEAD/tree/web-scripts/trunk/cppunit.rb?format=raw; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install scons mingw-w64 zlib; fi
install:
- wget -O /tmp/zlib.zip "https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib128-dll.zip?r=&ts=1403402496&use_mirror=hivelocity"
- mkdir /tmp/zlib
- unzip /tmp/zlib.zip -d /tmp/zlib
script:
- scons ZLIB_W32=/tmp/zlib SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG=$CFG_LOG test dist-zip | tee build.log
- zip nsis-*.zip build.log
env:
- CFG_LOG=yes
- CFG_LOG=no
deploy:
  provider: script
  skip_cleanup: true
  script: echo $DEPLOY_KEY | base64 -d > deploy_key && chmod 600 deploy_key && ssh -o "BatchMode yes" -i deploy_key -T kichik,nsis@shell.sourceforge.net create && cat nsis-*.zip | ssh -o "BatchMode yes" -i deploy_key kichik,nsis@shell.sourceforge.net /home/project-web/nsis/bin/nightly-deploy.sh
  on:
    branch: master
    repo: kichik/nsis
    condition: "$CFG_LOG = no && $TRAVIS_OS_NAME = linux"
after_deploy: rm -f deploy_key
addons:
  ssh_known_hosts: shell.sourceforge.net
notifications:
  slack:
    secure: Q61wSM9pOKiRp3WDNinMkZd+HWp6BFe+TlZDKoJgZJstMIT48TtkAaVmqW2h4HXtNxP9HvD1vzXqWGqGMG8vIO6hlQO5Rm/ruVa/rfb1kxLfD/dv+g/63ZloF3QmKKK++xeYKVNmPRVi7aSFjpx1wa+eG4rYPf0frc5XSFDuhVQ=
