dist: trusty
sudo: required

language: generic

env:
    - ZSH_VERSION=5.3.1 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.3.1/zsh-5.3.1.tar.xz
    - ZSH_VERSION=5.2 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.2/zsh-5.2.tar.xz
    - ZSH_VERSION=5.1.1 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.1.1/zsh-5.1.1.tar.xz
    - ZSH_VERSION=5.0.8 URL=https://downloads.sourceforge.net/project/zsh/zsh/5.0.8/zsh-5.0.8.tar.gz

addons:
  apt:
    packages:
        - build-essential

before_install:
    - export LOCAL="$(mktemp --directory --tmpdir=${TMPDIR:/tmp} local.bin.XXXXXX)"
    - wget $URL
    - tar -xf zsh-$ZSH_VERSION.tar.*
    - cd zsh-$ZSH_VERSION
    - ./configure --prefix=$LOCAL
    - make
    - make install
    - cd -
    - export PATH="$LOCAL/bin:$HOME/bin:$PATH"

before_script:
    - mkdir -p ~/bin
    - curl -L https://github.com/zunit-zsh/zunit/releases/download/v0.8.1/zunit > ~/bin/zunit
    - curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > ~/bin/revolver
    - chmod u+x ~/bin/{revolver,zunit}

script:
    - zunit --verbose
