forked from mapnik/mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (91 loc) · 3.04 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
language: cpp
git:
depth: 10
submodules: false
env:
global:
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- PREFIX=/tmp/mapnik
- PYTHON=python3
cache:
directories:
- $HOME/.ccache
dist: xenial
matrix:
include:
- os: linux
name: Linux clang
env: >-
CXX="ccache clang++ -Qunused-arguments"
CC="clang"
addons:
postgresql: "9.5"
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'xutils-dev', 'libstdc++-6-dev', 'postgresql-9.5-postgis-2.4' ]
- os: linux
name: Linux clang + coverage
env: >-
CXX="ccache clang++ -Qunused-arguments"
CC="clang"
COVERAGE=true
QUIET=true
before_install:
- export LLVM_COV="llvm-cov"
addons:
postgresql: "9.5"
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'xutils-dev', 'libstdc++-6-dev','postgresql-9.5-postgis-2.4' ]
- os: osx
name: OSX clang
#https://docs.travis-ci.com/user/reference/osx#macos-version
osx_image: xcode12.2
env: >-
CXX="ccache clang++ -Qunused-arguments"
before_install:
install:
- source scripts/travis-common.sh
# workaround travis rvm bug
# http://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- on 'osx' rvm get head || true
- export PATH=${PREFIX}/bin:$(pwd)/mason_packages/.link/bin:${PATH}
- export COVERAGE=${COVERAGE:-false}
- export BENCH=${BENCH:-false}
- on 'osx' export DATA_PATH=$(brew --prefix)/var/postgres
- on 'osx' rm -rf ${DATA_PATH}
- on 'osx' initdb ${DATA_PATH} -E utf8
- on 'osx' pg_ctl -w start -l postgres.log --pgdata ${DATA_PATH};
- on 'osx' cat postgres.log;
- on 'osx' createuser -s postgres
- psql -c 'create database template_postgis;' -U postgres
- psql -c 'create extension postgis;' -d template_postgis -U postgres
- enabled ${COVERAGE} curl -S -f https://codecov.io/bash -o codecov
- enabled ${COVERAGE} chmod +x codecov
before_script:
- export JOBS=${JOBS:-4}
- export HEAVY_JOBS=${HEAVY_JOBS:-2}
- export SCONSFLAGS='--debug=time'
- source bootstrap.sh
- ccache --version
- ccache -p || true
- ccache --show-stats || true
- commit_message_parse
script:
- git_submodule_update --init deps/
- on 'osx' brew unlink $(brew list --formula)
- on 'osx' brew link git postgresql postgis
- configure BENCHMARK=${BENCH} ENABLE_GLIBC_WORKAROUND=${ENABLE_GLIBC_WORKAROUND:-false} QUIET=${QUIET:-false}
#- cat config.log => comment out to reduce log size limit on travis-ci
# we limit the `make` to 40 min
# to ensure that slow builds still upload their
# ccache results and therefore should be faster
# (and might work) for the next build
- DEADLINE=$(( $(date +%s) + 40 * 60 ))
- scripts/travis-command-wrapper.py -s "date" -i 120 --deadline="$DEADLINE" make
- test_ok && git_submodule_update --init --depth=50 test/
- test_ok && make test
- test_ok && enabled ${COVERAGE} coverage
- test_ok && enabled ${BENCH} make bench
- ./scripts/check_glibcxx.sh