Browse Source

working on travis before CRAN

pull/20/head
boB Rudis 1 year ago
parent
commit
183f7f0a6a
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
2 changed files with 18 additions and 69 deletions
  1. +16
    -68
      .travis.yml
  2. +2
    -1
      DESCRIPTION

+ 16
- 68
.travis.yml View File

@@ -1,73 +1,21 @@
language: r

r:
- release
- devel

sudo: required
language: R
cache: packages
sudo: true
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
# environment variables set for all builds
env:
global:
# don't treat missing suggested packages as error
- _R_CHECK_FORCE_SUGGESTS_=false
# switch off vdiffr by default
- VDIFFR_RUN_TESTS=false

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
after_success:
- Rscript -e 'covr::codecov()'

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)'
- sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes
- sudo apt-get --yes --force-yes update -qq
- sudo apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev
- Rscript -e 'update.packages(ask = FALSE)'

+ 2
- 1
DESCRIPTION View File

@@ -14,7 +14,8 @@ Authors@R: c(
comment = c(ORCID = "0000-0001-8482-8398")),
person("Sebastian", "Meyer", email = "seb.meyer@fau.de", role = "ctb",
comment = c(ORCID = "0000-0002-1791-9449")),
person("James", "Turtle", email = "jturtle@predsci.com", role = "ctb")
person("James", "Turtle", email = "jturtle@predsci.com", role = "ctb",
comment = c(ORCID = "0000-0003-0735-7769"))
)
Maintainer: Bob Rudis <bob@rud.is>
Description: The 'U.S.' Centers for Disease Control and Prevention (CDC) maintain


Loading…
Cancel
Save