language:
  cpp

sudo:
  required

notifications:
  email: true

services:
  - docker

before_install:
  - docker build -t nazara .

script:
  - docker run --name Nazara -v `pwd`:/NazaraEngine nazara
      sh -c "
        cd build &&
        ./premake5-linux64 --cc=clang gmake &&
        cd gmake &&
        make -j4 &&
        cd ../../tests &&
        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../lib/gmake/x64/:../extlibs/lib/gmake/x64/ &&
        ./NazaraUnitTestsServer
      "
