language: c
sudo: true

env:
  - CFLAGS=-Wno-error=shadow

install:
  - sudo apt-get update -qq
  - sudo apt-get install -y autoconf gettext autopoint libtool check indent
  - sudo apt-get install -y e2fslibs-dev libaspell-dev libglib2.0-dev libgpm-dev libncurses5-dev libslang2-dev libssh2-1-dev libx11-dev unzip
  - sudo apt-get install -y wget exuberant-ctags python-pygments ruby

before_script:
  - git fetch --tags

script:
  - ./maint/utils/check-indent.sh
  - ./autogen.sh
  - ./maint/utils/travis-build.sh

after_success:
  - openssl aes-256-cbc -K $encrypted_036881b9e9dd_key -iv $encrypted_036881b9e9dd_iv -in ./maint/utils/deploy-key.enc -out $HOME/.ssh/deploy-key -d
  - chmod 600 $HOME/.ssh/deploy-key
  - echo "Host github.com" >> $HOME/.ssh/config
  - echo "  IdentityFile ~/.ssh/deploy-key" >> $HOME/.ssh/config

deploy:
  provider: script
  script: ./maint/utils/travis-deploy.sh
  on:
    branch: master
