sudo: false

os:
  - linux

language:
  - cpp

services:
  - docker

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker pull jsuya/thorvg-ci-setup; fi

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo FROM jsuya/thorvg-ci-setup > Dockerfile; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then echo ADD . /root >> Dockerfile; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t withgit .; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker run withgit /bin/sh -c "cd /root && TRAVIS=true meson -Dexamples=true -Dtools=svg2png builddir && ninja -C builddir install"; fi
