language: d

#compiler:
#  - dmd

install:
  # dmd
  # dub
  - DMD_VER=2.066.0
  - DMD=dmd_${DMD_VER}-0_amd64.deb
  - DUB_VER=0.9.21
  - DUB=dub-${DUB_VER}-linux-x86_64
  - wget http://downloads.dlang.org/releases/2014/${DMD}
  - sudo dpkg -i ${DMD} || true
  - sudo apt-get -y update || true
  - sudo apt-get -fy install || true
  - sudo dpkg -i ${DMD}
  - wget http://code.dlang.org/files/${DUB}.tar.gz
  - sudo tar -C /usr/local/bin -zxf ${DUB}.tar.gz

script:
  - dub test
  - for ex in `\ls -1 examples/`; do (echo "[INFO] Building example $ex"; cd examples/$ex && dub build) || exit 1; done
  - for ex in `\ls -1 tests/`; do (echo "[INFO] Running test $ex"; cd tests/$ex && dub) || exit 1; done

services:
  - mongodb
  - redis-server

language: d

#compiler:
#  - dmd

install:
  # dmd
  # dub
  - DMD_VER=2.066.0
  - DMD=dmd_${DMD_VER}-0_amd64.deb
  - DUB_VER=0.9.22
  - DUB=dub-${DUB_VER}-linux-x86_64
  - wget http://downloads.dlang.org/releases/2014/${DMD}
  - sudo dpkg -i ${DMD} || true
  - sudo apt-get -y update || true
  - sudo apt-get -fy install || true
  - sudo dpkg -i ${DMD}
  - wget http://code.dlang.org/files/${DUB}.tar.gz
  - sudo tar -C /usr/local/bin -zxf ${DUB}.tar.gz

script:
  - dub test
  - for ex in `\ls -1 examples/`; do (echo "[INFO] Building example $ex"; cd examples/$ex && dub build) || exit 1; done
  - for ex in `\ls -1 tests/`; do (echo "[INFO] Running test $ex"; cd tests/$ex && dub) || exit 1; done

services:
  - mongodb
  - redis-server

Use latest DUB for Travis to avoid an issue with '+' in version strings.
Use latest DUB for Travis to avoid an issue with '+' in version strings.
