sudo: required

language: c

os:
  - linux

compiler:
  - gcc

dist: xenial

before_install:
  - echo $PWD
  - git rev-parse --abbrev-ref HEAD
  - git checkout $TRAVIS_BRANCH
  #
  # 'make travis-docker-image' reads the branch name
  # <travis>-<distro>-<rel> or default Fedora 32
  #
  - sudo add-apt-repository -y ppa:projectatomic/ppa
  - sudo apt-get update -qq
  - sudo apt-get install -qq -y software-properties-common podman
  - sudo mkdir -p /etc/containers
  - sudo sh -c 'echo "[registries.search]\nregistries = [\"docker.io\", \"registry.fedoraproject.org\", \"quay.io\", \"registry.access.redhat.com\", \"registry.centos.org\"]" > /etc/containers/registries.conf'
    #  - sudo sh -c 'echo -e "[registries.search]\nregistries = [\"docker.io\"]" > /etc/containers/registries.conf'
  - cat /etc/containers/registries.conf
  - sudo podman --version
  - make TRAVIS_ENABLED=true travis-docker-image
  - git fetch --tags
  - git fetch --depth=100000
  - make TRAVIS_ENABLED=true travis-docker-start

script:
  - make TRAVIS_ENABLED=true travis-docker-make || travis_terminate 1;
  - make TRAVIS_ENABLED=true travis-docker-make-install || travis_terminate 1;
