forked from yocontra/node-gdal-next
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
137 lines (128 loc) · 6.12 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
language: cpp
compiler:
- gcc
# Prebuild S3 keys
env:
global:
# accessKeyId
- secure: "gj5FMwUZkSneMLBN68BY3fl/YdBxI5Ou5Ohf0ky+E1tArHhxWP8KWr4FjK+bHaP0l3QJRuqE4DZvIAEnfIt+XIZrvNRzR11o3D+KOyWEJPMQo2xmsFbvM2z4E8lHMAiY1QPYiAgBV1XM61E/EgU0KB0iIxXxuwkp22iy/t8q5Dus4mk4KR2QnpCxhjowGbSkER4QH5BZy+EH3NoVX9y2Q7jJnE+cQKdceVMHu3r/E8cdeFZH/q9dpZmYt/uvQbbtI4cIhPjaEmxYsK5/Vwj/q19OlZvuDN8QWyNP1/QjJx+F1IBSBz4lwreswQLOrnp6aeANiWzNDkz/gfP9KkUBOcq1zqIIdN9jkwHcOMmo/bGnk/WuwUM7FK5x2GacIlfFEXVhEnpRHHdbF8Vnt+geTiGl6dAaYjEBCqXUCFNpZ5+YFX6RC1oOw6Z1bcDks6SJYznxjEEn14w8d0bAL0eqms//CChSEmL/77aWAAGcd+Nz+iQMkFWIgbIOo9pOZU4W3WVqVbbYiILkcvs53c9r6lY0EIPRX1YY2VrYLmkE87CHg7eZCCmrGrsHMySS96F7phv7fQwFPsVE+NDNnI8E1jFxsrY5m5TmGBmt4Tm10DvvgxgtaUguGuKDY2uEZr8LF5u7oWXmg+vAusMpZnjCsgO4udMhTwnoHdNvH0Fxm7Q="
# secretKey
- secure: "fDjbyxQSzAIuNbCzPfsmx5Qt96w5FCj+Gft8qatXsSxch7EegCgqBsv58GnrhMFxTrN7zmBCQ0LH9BUCNcafjR2mMa5WFWNHqmaW1bOZk8jBTphV68bhtSfVGnHYNmsK+ah3eQoRwrdygsPUOhc1+2FWxCdrC1xluhP0ybBMGcl/HBCbfzElFSca8NueJx3GXsMWjmqr3hhDGY8UExnPa5IjXEstdCPmWxmrrpftVxtqrUVsD+VLPdS0Fvd48ysZGm6mJ+L4ck/6S2HYDR1LImlVfUrRqxVi+yislvHuMrqKazjdubMnuGpo3tESciocRMKhNicumH4HpHqKZoS1dpinP4FoETjo4+LveRQRA0ex1/ihyCQPTH3t9iJN8oN9Z02/jFPJIXZAzzImTCizZp7lyKwBUiCCOfJkXy5qbMlriQIXuf59rU/pDR4yu9YAzJcobhdqPyz0ukWLabfqzsjW2DVtWptjSr397TCb6w+oPjjH2PofWiuFz1CmpzBK4liMTyFRi5bwbnL0JYrJs84meyL/FlSgi0Ez14f303avQYVIj0L9Pmb9WUt4i+clojeCMJSun0W27DNSd6qVX8LKf5lR3sq9M3jmZrW7Imy1dgOvC9Dju/UN2vjbE3SNzzIB7E6meda3PMTHVq9Rub+DngH2GHET1V8oqoIlFqk="
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- libc6-dev # for libiconv which is needed by libgdal
matrix:
include:
# OSX
- os: osx
env: NODE_NVM_VERSION="15" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="15" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="15" TARGET=TRUNK
- os: osx
env: NODE_NVM_VERSION="14" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="14" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="14" TARGET=TRUNK
- os: osx
env: NODE_NVM_VERSION="13" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="13" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="13" TARGET=TRUNK
- os: osx
env: NODE_NVM_VERSION="12" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="12" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="12" TARGET=TRUNK
- os: osx
env: NODE_NVM_VERSION="11" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="11" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="11" TARGET=TRUNK
- os: osx
env: NODE_NVM_VERSION="10" TARGET=STATIC
- os: osx
env: NODE_NVM_VERSION="10" TARGET=SHARED
- os: osx
env: NODE_NVM_VERSION="10" TARGET=TRUNK
# Linux
- os: linux
env: NODE_NVM_VERSION="15" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="15" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="15" TARGET=TRUNK
- os: linux
env: NODE_NVM_VERSION="14" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="14" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="14" TARGET=TRUNK
- os: linux
env: NODE_NVM_VERSION="13" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="13" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="13" TARGET=TRUNK
- os: linux
env: NODE_NVM_VERSION="12" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="12" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="12" TARGET=TRUNK
- os: linux
env: NODE_NVM_VERSION="11" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="11" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="11" TARGET=TRUNK
- os: linux
env: NODE_NVM_VERSION="10" TARGET=STATIC
- os: linux
env: NODE_NVM_VERSION="10" TARGET=SHARED
- os: linux
env: NODE_NVM_VERSION="10" TARGET=TRUNK
allow_failures:
- env: NODE_NVM_VERSION="15" TARGET=TRUNK
- env: NODE_NVM_VERSION="14" TARGET=TRUNK
- env: NODE_NVM_VERSION="13" TARGET=TRUNK
- env: NODE_NVM_VERSION="12" TARGET=TRUNK
- env: NODE_NVM_VERSION="11" TARGET=TRUNK
- env: NODE_NVM_VERSION="10" TARGET=TRUNK
before_install:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-6 CXXFLAGS=-std=c++11 CC=gcc-6; fi
- COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- PUBLISH_BINARY=false
- if test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE" && test "${TRAVIS_BRANCH}" == "master" && test "${TRAVIS_PULL_REQUEST}" == "false"; then PUBLISH_BINARY=true; fi;
- REPUBLISH_BINARY=false
- if test "${COMMIT_MESSAGE#*'[republish binary]'}" != "$COMMIT_MESSAGE" && test "${TRAVIS_BRANCH}" == "master" && test "${TRAVIS_PULL_REQUEST}" == "false"; then REPUBLISH_BINARY=true; fi;
- git clone https://github.com/creationix/nvm.git ../.nvm && source ../.nvm/nvm.sh
- nvm install $NODE_NVM_VERSION
- nvm use $NODE_NVM_VERSION
- node --version
- npm --version
- $CXX --version
- NPM_CACHE=$(npm config get cache)
- echo $NPM_CACHE
- if [ -d $NPM_CACHE ]; then sudo chown -R $USER $NPM_CACHE; fi;
install:
- if [[ "${TARGET}" == "TRUNK" ]]; then ./scripts/gdal-trunk.sh; fi;
- if [[ "${TARGET}" == "SHARED" && "$(uname -s)" == "Linux" ]]; then sudo apt-get -qq update; sudo apt-get --force-yes -qq install libgdal-dev libc6-dev; fi;
- if [[ "${TARGET}" == "SHARED" || "${TARGET}" == "TRUNK" ]]; then npm install --build-from-source --shared_gdal; fi;
- if [[ "${TARGET}" == "SHARED" || "${TARGET}" == "TRUNK" ]]; then gdal-config --version --version; fi;
- if [[ "${TARGET}" == "STATIC" ]]; then npm install --build-from-source > /dev/null; fi;
- npm test
script:
- ./node_modules/.bin/node-pre-gyp package testpackage
- npm test
- if [[ "${TARGET}" == "STATIC" && "${PUBLISH_BINARY}" == "true" ]]; then ./node_modules/.bin/node-pre-gyp publish; rm -rf {build,lib/binding}; ./node_modules/.bin/node-pre-gyp install --fallback-to-build=false; npm test; fi
- if [[ "${TARGET}" == "STATIC" && "${REPUBLISH_BINARY}" == "true" ]]; then ./node_modules/.bin/node-pre-gyp unpublish publish; rm -rf {build,lib/binding}; ./node_modules/.bin/node-pre-gyp install --fallback-to-build=false; npm test; fi