You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

76 lines
2.1 KiB

language: r
r:
- release
- devel
sudo: required
dist: trusty
cache:
- packages
- ccache
latex: false
r_github_packages:
- r-dbi/DBI
- r-dbi/RPostgres
- r-lib/covr
- r-spatial/lwgeom
- r-spatial/stars
addons:
postgresql: "9.6"
apt:
sources:
- sourceline: 'ppa:opencpu/jq'
- sourceline: 'ppa:ubuntugis/ubuntugis-unstable'
- sourceline: 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main'
key_url: 'https://www.postgresql.org/media/keys/ACCC4CF8.asc'
packages:
- libprotobuf-dev
- protobuf-compiler
- libv8-3.14-dev
- libjq-dev
- libudunits2-dev
- libproj-dev
- libgeos-dev
- libspatialite-dev
- libgdal-dev
- libjson-c-dev
- libnetcdf-dev
- netcdf-bin
- postgresql-server-dev-9.6
before_install:
# install postgis from source, to avoid dependency conflict with GDAL >= 2.0:
- wget http://download.osgeo.org/postgis/source/postgis-2.4.3.tar.gz
- (mv postgis* /tmp; cd /tmp; tar xzf postgis-2.4.3.tar.gz)
- (cd /tmp/postgis-2.4.3 ; ./configure; make; sudo make install)
# activate liblwgeom by:
- sudo ldconfig
# create postgis databases:
- sudo service postgresql restart
- createdb postgis
- psql -d postgis -c "CREATE EXTENSION postgis;"
- psql -d postgis -c "GRANT CREATE ON DATABASE postgis TO travis"
- psql -d postgis -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO travis"
- createdb empty
- psql -d empty -c "CREATE EXTENSION postgis;"
- R -q -e 'install.packages("remotes"); remotes::install_github("ropenscilabs/tic"); tic::prepare_all_stages()'
after_success:
- dropdb postgis
- dropdb empty
- createdb postgis
- psql -d postgis -c "CREATE EXTENSION postgis;"
- psql -d postgis -c "GRANT CREATE ON DATABASE postgis TO travis"
- psql -d postgis -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO travis"
- createdb empty
- psql -d empty -c "CREATE EXTENSION postgis;"
- R -q -e 'covr::codecov(quiet = FALSE)'
install: R -q -e 'tic::install()'
script: R -q -e 'tic::script()'