language: c
sudo: required
dist: trusty

services:
  - docker

before_script:
  - docker build -t fwupd-fedora -f contrib/ci/Dockerfile-fedora .
  - docker build -t fwupd-debian -f contrib/ci/Dockerfile-debian .
  - docker build -t fwupd-arch -f contrib/ci/Dockerfile-arch .

script:
  - docker run -e CI=true -t -v `pwd`:/build fwupd-fedora ./contrib/ci/build_and_install_rpms.sh
  - docker run -e CI=true -t -v `pwd`:/build fwupd-debian ./contrib/ci/build_and_install_debs.sh
  - docker run -e CI=true -t -v `pwd`:/build fwupd-arch ./contrib/ci/build_and_install_pkgs.sh

language: c
sudo: required
dist: trusty

services:
  - docker

env:
  - OS=Fedora
  - OS=Debian
  - OS=Arch

install:
  - if [[ "$OS" == "Fedora" ]]; then docker build -t fwupd-fedora -f contrib/ci/Dockerfile-fedora .; fi
  - if [[ "$OS" == "Debian" ]]; then docker build -t fwupd-debian -f contrib/ci/Dockerfile-debian .; fi
  - if [[ "$OS" == "Arch" ]];   then docker build -t fwupd-arch -f contrib/ci/Dockerfile-arch .; fi

script:
  - if [[ "$OS" == "Fedora" ]]; then docker run -e CI=true -t -v `pwd`:/build fwupd-fedora ./contrib/ci/build_and_install_rpms.sh; fi
  - if [[ "$OS" == "Debian" ]]; then docker run -e CI=true -t -v `pwd`:/build fwupd-debian ./contrib/ci/build_and_install_debs.sh; fi
  - if [[ "$OS" == "Arch" ]];   then docker run -e CI=true -t -v `pwd`:/build fwupd-arch ./contrib/ci/build_and_install_pkgs.sh; fi

Use a build matrix for the different distros
ci: Use a build matrix for the different distros

This not only speeds up the build, but also makes it easier to spot
errors.
