forked from open-gpdb/gpdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
219 lines (204 loc) · 6.14 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
## ----------------------------------------------------------------------
## Travis CI build script for Greenplum Database Open Source Project.
## ----------------------------------------------------------------------
language: cpp
cache: ccache
git:
submodules: false
addons:
apt:
config:
retries: true
sources: &common_sources
- ubuntu-toolchain-r-test
packages: &common_packages
- gcc-8
- libxml2
- libxml2-dev
- libevent-dev
- libperl-dev
- libuv1-dev
- g++-8
- python-dev
- python-yaml
- libapr1-dev
- libzstd1
- libzstd1-dev
matrix:
include:
# OS and Compiler variations
# ----------------------------------------------------------------
#
# Ubuntu Bionic, gcc 8
- os: linux
dist: bionic
compiler: gcc
env:
- T=debug C=""
- OVERRIDE_CC="CC=gcc-8" OVERRIDE_CXX="CXX=g++-8"
addons:
apt:
sources:
- *common_sources
packages:
- *common_packages
# Ubuntu Xenial, clang 7
- os: linux
dist: xenial
compiler: clang
env:
- T=debug C=""
- OVERRIDE_CC="CC=clang-7" OVERRIDE_CXX="CXX=clang++-7"
addons:
apt:
sources:
- *common_sources
- llvm-toolchain-xenial-7
packages:
- *common_packages
- clang-7
# macOS, XCode11
- os: osx
compiler: clang
osx_image: xcode11
env: T=macos
addons:
homebrew:
packages:
- ccache
- stage: check-format
os: linux
dist: focal
addons:
apt:
packages:
- clang-format-11
- parallel
before_install: ~
install: ~
before_script: ~
after_script: ~
script:
- env CLANG_FORMAT=clang-format-11 src/tools/fmt gen
- git diff --exit-code
- env CLANG_FORMAT=clang-format-11 src/tools/fmt chk
stages:
- check-format
- test
## ----------------------------------------------------------------------
## Build tools
## ----------------------------------------------------------------------
python:
- "2.7"
before_install:
- eval "${OVERRIDE_CC}"
- eval "${OVERRIDE_CXX}"
# ccache 3.2 (from Ubuntu Xenial) has CCACHE_CPP2 default to off (this
# setting defaults to on starting from ccache 3.3). That default leads to
# unlegible compiler warning outputs because GCC and Clang will emit
# warnings using the preprocessed output...
- |
if [ "${TRAVIS_DIST}" = xenial ]; then
ccache --set-config run_second_cpp=true
fi
- |
if [ "${TRAVIS_COMPILER}" = clang ]; then
case "${TRAVIS_OS_NAME}" in
linux)
sudo ln -sv ../../bin/ccache /usr/lib/ccache/${CC}
sudo ln -sv ../../bin/ccache /usr/lib/ccache/${CXX}
;;
osx)
PATH=/usr/local/opt/ccache/libexec:$PATH
;;
esac
fi
## ----------------------------------------------------------------------
## Install supporting Python modules
## ----------------------------------------------------------------------
install:
- pip install --user --upgrade pip
- pip install --user --pre psutil
- pip install --user lockfile
- pip install --user setuptools
## ----------------------------------------------------------------------
## Perform build:
## ----------------------------------------------------------------------
before_script:
- ssh-keygen -t "rsa" -f ~/.ssh/id_rsa -N ""
- ssh-keyscan $(hostname) >> ~/.ssh/known_hosts
- cp ~/.ssh/{id_rsa.pub,authorized_keys}
- ccache --zero-stats
script:
- |
set -eo pipefail
if [ "$T" = "debug" ]; then
./configure \
--prefix=${TRAVIS_BUILD_DIR}/gpsql \
--enable-cassert \
--enable-debug \
--enable-debug-extensions \
--with-perl \
--with-python \
--disable-orca \
--with-openssl \
--with-ldap \
--with-libcurl \
--with-libxml \
--enable-mapreduce \
--enable-orafce \
--enable-ic-proxy \
$C
make -s install
source ${TRAVIS_BUILD_DIR}/gpsql/greenplum_path.sh
make -s unittest-check
make -C gpAux/gpdemo cluster
source gpAux/gpdemo/gpdemo-env.sh
make -C src/test/regress installcheck-small
fi
- |
set -eo pipefail
if [ "$T" = "production" ]; then
./configure \
--prefix=${TRAVIS_BUILD_DIR}/gpsql \
--with-perl \
--with-python \
--disable-orca \
--with-openssl \
--with-ldap \
--with-libcurl \
--with-libxml \
--enable-mapreduce \
--enable-orafce \
--enable-ic-proxy \
$C
make -s install
source ${TRAVIS_BUILD_DIR}/gpsql/greenplum_path.sh
make -s unittest-check
make -C gpAux/gpdemo cluster
source gpAux/gpdemo/gpdemo-env.sh
make -C src/test/regress installcheck-small
fi
- |
set -eo pipefail
if [ "$T" = "macos" ]; then
./configure \
--prefix=${TRAVIS_BUILD_DIR}/gpsql \
--with-perl \
--with-python \
--disable-orca \
--enable-orafce \
--disable-gpfdist \
--disable-pxf \
--disable-gpcloud \
--without-zstd \
$C
make -s install
source ${TRAVIS_BUILD_DIR}/gpsql/greenplum_path.sh
make -s unittest-check
fi
after_script:
- ccache --show-stats
- source ${TRAVIS_BUILD_DIR}/gpsql/greenplum_path.sh
- postgres --version
- gpssh --version