This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.travis.yml
110 lines (98 loc) · 2.85 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
#-----------------------------------------------------------------------------
#
# Configuration for continuous integration service at travis-ci.org
#
#-----------------------------------------------------------------------------
language: cpp
sudo: false
git:
depth: 2
# don't re-build for tags so that [publish binary] is not re-run
# https://github.com/travis-ci/travis-ci/issues/1532
branches:
except:
- /^v[0-9]/
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- pkg-config
- make
- libstdc++-4.8-dev
cache:
directories:
- $HOME/.ccache
matrix:
include:
# Linux
- os: linux
compiler: clang
env: NODE_VERSION="8"
- os: linux
compiler: clang
env: NODE_VERSION="10"
- os: linux
compiler: clang
env: NODE_VERSION="12"
- os: linux
compiler: clang
env: NODE_VERSION="14"
# OS X
- os: osx
osx_image: xcode8
compiler: clang
env: NODE_VERSION="8"
- os: osx
osx_image: xcode8
compiler: clang
env: NODE_VERSION="10"
- os: osx
osx_image: xcode8
compiler: clang
env: NODE_VERSION="12"
- os: osx
osx_image: xcode8
compiler: clang
env: NODE_VERSION="14"
env:
global:
- JOBS: 8
- CLANG_VERSION: "5.0.1"
before_install:
# workaround travis rvm bug
# https://github.com/travis-ci/travis-ci/issues/6307
# http://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
rvm get head || true
fi
- scripts/validate_tag.sh
- if [[ $(uname -s) == 'Darwin' ]]; then brew uninstall --force node; fi;
- source ./scripts/install_node.sh ${NODE_VERSION}
install:
- source ./bootstrap.sh
- if [[ $(uname -s) == 'Linux' ]]; then
./mason/mason install clang++ ${CLANG_VERSION};
export PATH=$(./mason/mason prefix clang++ ${CLANG_VERSION})/bin:${PATH};
export CXX="ccache clang++ -Qunused-arguments";
export CC="ccache clang -Qunused-arguments";
$CXX --version
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python2.7/site-packages;
else
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python/site-packages;
fi;
- git clone --depth=1 --branch=$(node -e "console.log(require('./package.json').libosmium_version)") https://github.com/osmcode/libosmium.git ../libosmium
- git clone --depth=1 --branch=$(node -e "console.log(require('./package.json').protozero_version)") https://github.com/mapbox/protozero.git ../protozero
before_script:
- if [[ ${COVERAGE} == true ]]; then
PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user cpp-coveralls;
make coverage;
else
make;
fi;
- nm lib/binding/osmium.node | grep "GLIBCXX_3.4.2[0-9]" || true
- npm test
- ./scripts/coverage.sh
script:
- ./scripts/publish.sh