dist: trusty

env:
  global:
    - DEPS=$HOME/deps
    - PATH=$DEPS/bin:$PATH
    
before_install:
  - sudo apt-get install python-pip
  - pip install --user awscli
  - export PATH="$PATH:$HOME/.local/bin"
  - curl --silent -L "https://s3-us-west-1.amazonaws.com/kite-data/tensorflow/libtensorflow-cpu-linux-x86_64-1.9.0.tar.gz" | tar -C $HOME -xz
  - curl --silent --compressed --output "$HOME/kited-test" "https://s3-us-west-1.amazonaws.com/kited-test/linux/kited-test"
  - chmod u+x "$HOME/kited-test"

install: |
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"
  C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui "
  git clone --depth 1 https://github.com/vim/vim
  cd vim
  export PATH=/usr/bin:$PATH
  ./configure $C_OPTS
  make
  make install
  cd -
  export PATH=$DEPS/bin:$PATH
  export VIM="$(which vim)"


script:
  - vim --version
  - cd test && bash test
  - export LD_LIBRARY_PATH="$HOME/lib:$LD_LIBRARY_PATH"
  - echo "Running tests with kited-local --------------" && $HOME/kited-test > ~/kite.log 2>&1 & sleep 20 && bash editor_tests && killall kited-test

