forked from csaybar/RQGIS3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
101 lines (90 loc) · 3.28 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
# Default configuration for use with tic package
# tic documentation to get started: https://ropenscilabs.github.io/tic/
# Usually you shouldn't need to change the first part of the file
language: r
cache: packages
addons:
apt:
sources:
- sourceline: 'ppa:ubuntugis/ubuntugis-unstable'
- sourceline: 'deb http://qgis.org/ubuntugis-ltr xenial main'
key_url: 'http://qgis.org/downloads/qgis-2019.gpg.key'
packages:
- libgdal-dev
- libudunits2-dev
- python-gdal
- saga
- grass
# DO NOT CHANGE THE CODE BELOW
before_install:
- R -q -e 'if (!requireNamespace("remotes")) install.packages("remotes")'
- R -q -e 'if (getRversion() < "3.2" && !requireNamespace("curl")) install.packages("curl")'
- R -q -e 'remotes::install_github("ropenscilabs/tic", upgrade = "always"); print(tic::dsl_load()); tic::prepare_all_stages()'
- R -q -e 'tic::before_install()'
# install latest qgis-ltr using aptitude to resolve dependencies
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then sudo aptitude install -y qgis python-qgis; fi
#############
# OSX
#############
# tap osgeo4mac tap
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew tap osgeo/osgeo4mac; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew unlink proj && brew unlink libgeotiff && brew unlink libspatialite && brew unlink postgresql && brew unlink gdal && brew unlink postgis; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then sudo rm -rf /usr/local/gfortran/bin/gfortran; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then ulimit -n 1200 && brew install osgeo-qgis-ltr; fi
install: R -q -e 'tic::install()'
after_install: R -q -e 'tic::after_install()'
before_script:
- export DISPLAY=:99.0
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then ( sudo Xvfb :99 -ac -screen 0 1024x768x8; echo ok )& fi
- sleep 3 # give xvfb some time to start
- R -q -e 'tic::before_script()'
script: R -q -e 'tic::script()'
after_success: R -q -e 'tic::after_success()'
after_failure: R -q -e 'tic::after_failure()'
before_deploy: R -q -e 'tic::before_deploy()'
deploy:
provider: script
script: R -q -e 'tic::deploy()'
on:
all_branches: true
after_deploy: R -q -e 'tic::after_deploy()'
after_script: R -q -e 'tic::after_script()'
# DO NOT CHANGE THE CODE ABOVE
matrix:
include:
- os: linux
sudo: required
latex: false
env: linux=true
install: R -q -e 'tic::install()'
after_install: R -q -e 'tic::after_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:
branches: master
condition:
- $TRAVIS_PULL_REQUEST = false
- $TRAVIS_EVENT_TYPE != cron
after_deploy: R -q -e 'tic::after_deploy()'
after_script: R -q -e 'tic::after_script()'
after_success: R -q -e 'tic::after_success()'
### build QGIS DEV on macOS
- os: osx
latex: false
sudo: false
env: mac=true
install: R -q -e 'tic::install()'
after_install: R -q -e 'tic::after_install()'
script: R -q -e 'tic::script()'
# Custom parts:
#env
env:
global:
- MAKEFLAGS="-j 2"
#services
services:
- xvfb