language: minimal
services: docker
sudo: required

env:
  - DOCKER_FILE=".travis/Dockerfile.fedora-rawhide"
  - DOCKER_FILE=".travis/Dockerfile.debian-testing"

before_install:
  # Create a docker image called "myimage".
  - docker build -t myimage -f "$DOCKER_FILE" .

before_script:
  # Create a docker container from the image, mount the current working
  # directory to /app inside the container and let the container running
  # in the background. The resulting container ID will be saved to
  # container_id so we can reference it later on.
  - docker run --privileged --volume "$(pwd):/app" --workdir "/app" --tty --detach myimage bash > container_id
  - docker exec "$(cat container_id)" ansible-playbook -i "localhost," -c local misc/install-test-dependencies.yml

script:
  # Run tests in the running container.
  - docker exec "$(cat container_id)" ./autogen.sh
  - docker exec "$(cat container_id)" ./configure
  - docker exec "$(cat container_id)" make
  - docker exec "$(cat container_id)" make test

after_failure:
  # get the logs
  - docker exec "$(cat container_id)" cat tests/*.log

after_script:
  # Stop the container.
  - docker stop "$(cat container_id)"

language: minimal
arch:
  - amd64
  - ppc64le
services: docker
sudo: required

env:
  - DOCKER_FILE=".travis/Dockerfile.fedora-rawhide"
  - DOCKER_FILE=".travis/Dockerfile.debian-testing"

jobs:
  exclude:
   - arch: ppc64le
     env: DOCKER_FILE=".travis/Dockerfile.fedora-rawhide"

before_install:
  # Create a docker image called "myimage".
  - docker build -t myimage -f "$DOCKER_FILE" .

before_script:
  # Create a docker container from the image, mount the current working
  # directory to /app inside the container and let the container running
  # in the background. The resulting container ID will be saved to
  # container_id so we can reference it later on.
  - >
   if [ "$TRAVIS_CPU_ARCH" = "ppc64le" ]; then
     docker run --volume "$(pwd):/app" --workdir "/app" --tty --detach myimage bash > container_id;
   else
     docker run --privileged --volume "$(pwd):/app" --workdir "/app" --tty --detach myimage bash > container_id;
   fi
  - docker exec "$(cat container_id)" ansible-playbook -i "localhost," -c local misc/install-test-dependencies.yml

script:
  # Run tests in the running container.
  - docker exec "$(cat container_id)" ./autogen.sh
  - docker exec "$(cat container_id)" ./configure
  - docker exec "$(cat container_id)" make
  - docker exec "$(cat container_id)" make test

after_failure:
  # get the logs
  - docker exec "$(cat container_id)" cat tests/*.log

after_script:
  # Stop the container.
  - docker stop "$(cat container_id)"

Add support to ppc64le for debian build
Add support to ppc64le for debian build
