sudo: required
dist: bionic
language: c
cache:
  apt: true
  directories:
    - /home/travis/postgresql
env:
  global:
    - enable_coverage=yes
    - PG_PRELOAD=cstore_fdw
  matrix:
    - PGVERSION=9.3
    - PGVERSION=9.4
    - PGVERSION=9.5
    - PGVERSION=9.6
    - PGVERSION=10
    - PGVERSION=11
    - PGVERSION=12

before_install:
  - git clone -b v0.7.13 --depth 1 https://github.com/citusdata/tools.git
  - sudo make -C tools install
  - setup_apt
  - nuke_pg
install:
  - sudo apt-get install protobuf-c-compiler
  - sudo apt-get install libprotobuf-c0-dev
  - sudo locale-gen da_DK
  - sudo locale-gen da_DK.utf8
  - sudo pip install cpp-coveralls
  - install_pg
  - install_custom_pg
before_script:
  - chmod 777 .
  - chmod 777 data
  - chmod 666 data/*
  - config_and_start_cluster
script: pg_travis_test
after_success:
  - sudo chmod 666 *.gcda
  - coveralls --exclude cstore.pb-c.c --exclude cstore.pb-c.h
