-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
83 lines (75 loc) · 2.29 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
language: R
sudo: required
dist: trusty
cache:
- packages
- ccache
r:
- release
#- dev
deploy.skip_cleanup: true
latex: false
# r_github_packages:
# - cran/survival
# - cran/bindrcpp
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:
- devscripts # checkbashisms
- 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 -e 'install.packages("rgdal", repos="http://R-Forge.R-project.org")'
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()'
before_deploy: R -q -e 'tic::before_deploy()'
deploy:
provider: script
script: R -q -e 'tic::deploy()'
on:
branch: master
condition:
- $TRAVIS_PULL_REQUEST = false
- $TRAVIS_EVENT_TYPE != cron
- $TRAVIS_R_VERSION_STRING = release