sudo: required
dist: trusty

env:
  - PGVERSION=9.5 POSTGISVERSION=2.2 POSTGISFULLVERSION=2.2.3
  - PGVERSION=9.5 POSTGISVERSION=2.3 POSTGISFULLVERSION=2.3.1
  - PGVERSION=9.6 POSTGISVERSION=2.2 POSTGISFULLVERSION=2.2.3
  - PGVERSION=9.6 POSTGISVERSION=2.3 POSTGISFULLVERSION=2.3.1
   
before_install:
  - sudo /etc/init.d/postgresql stop
  - sudo /etc/init.d/postgresql start $PGVERSION
  - sudo apt-get update
  - sudo apt-get install postgresql-server-dev-$PGVERSION postgresql-common
  - sudo apt-get install postgresql-$PGVERSION-postgis-$POSTGISVERSION
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION postgis VERSION '$POSTGISFULLVERSION'"
  - git clone https://github.com/petere/plsh
  - cd plsh
  - make all PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - sudo make install PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION plsh"
  - cd ../
  
script:
  - make build PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - sudo make install PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION frapi"
  - psql --cluster $PGVERSION/main -U postgres -c "SELECT * FROM frapi.adresse_search('route des anges, landéda')"

sudo: required
dist: trusty

env:
  - PGVERSION=9.5
  - PGVERSION=9.6
   
before_install:
  - sudo /etc/init.d/postgresql stop
  - sudo /etc/init.d/postgresql start $PGVERSION
  - sudo apt-get update
  - sudo apt-get install postgresql-server-dev-$PGVERSION postgresql-common
  - sudo apt-get install postgresql-$PGVERSION-postgis
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION postgis"
  - git clone https://github.com/petere/plsh
  - cd plsh
  - make all PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - sudo make install PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION plsh"
  - cd ../
  
script:
  - make build PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - sudo make install PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
  - psql --cluster $PGVERSION/main -U postgres -c "CREATE EXTENSION frapi"
  - psql --cluster $PGVERSION/main -U postgres -c "SELECT * FROM frapi.adresse_search('route des anges, landéda')"

Remove test of older version of postgis altogether
Remove test of older version of postgis altogether