# run the testsuite on travis-ci.com
---
# versions to run on
env:
  - PG_SUPPORTED_VERSIONS=9.1
  - PG_SUPPORTED_VERSIONS=9.2
  - PG_SUPPORTED_VERSIONS=9.3
  - PG_SUPPORTED_VERSIONS=9.4
  - PG_SUPPORTED_VERSIONS=9.5
  - PG_SUPPORTED_VERSIONS=9.6
  - PG_SUPPORTED_VERSIONS=10
  - PG_SUPPORTED_VERSIONS=11
  - PG_SUPPORTED_VERSIONS=12
  - PG_SUPPORTED_VERSIONS=13

language: c
os: linux
dist: focal
arch:
 - amd64
 - ppc64le

before_install:
  # travis' postgresql-common is missing apt.postgresql.org.sh (2020-05-21)
  - sudo apt-get -qq update
  - sudo apt-get -y install postgresql-common

install:
  - sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -p -v $PG_SUPPORTED_VERSIONS -i
  - sudo -u postgres createuser --superuser $USER

script:
  - make PROFILE="-Werror"
  - sudo make install
  - make installcheck
  - if test -s regression.diffs; then cat regression.diffs; fi
