forked from asivapra/gsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (38 loc) · 1.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
language: go
go: 1.9.x
env:
- PREFIX=$HOME/local GDALVER=2.2.4
services:
- postgresql
cache:
directories:
- $PREFIX
addons:
postgresql: "9.6"
apt:
packages:
- postgresql-9.6-postgis-2.3
- libproj-dev
- libhdf4-dev
- libhdf5-dev
- libnetcdf-dev
- libopenjpeg-dev
- openjpeg-tools
before_script:
- psql -U postgres -c "create extension postgis"
install:
- git clone https://github.com/sstephenson/bats.git
- (cd bats && git checkout 03608115df2071fff4eaaff1605768c275e5f81f && ./install.sh $PREFIX)
- >
if ! test -f $PREFIX/local/lib/libgdal.a ; then
wget --quiet http://download.osgeo.org/gdal/$GDALVER/gdal-$GDALVER.tar.gz{,.md5} || exit 1
md5sum gdal-$GDALVER.tar.gz | cmp - gdal-$GDALVER.tar.gz.md5 || exit 1
tar xfvz gdal-$GDALVER.tar.gz
(cd gdal-$GDALVER && ./configure --with-openjpeg --prefix=$HOME/gdal-install && make -s all install)
fi
script:
- cd $TRAVIS_BUILD_DIR/mas/db && psql -f schema.sql -U postgres
- go tool vet $TRAVIS_BUILD_DIR
- gofmt -d $TRAVIS_BUILD_DIR
# Ensure that gofmt -d produces zero diff output
- test -z "$(gofmt -d $TRAVIS_BUILD_DIR)"