forked from pgbouncer/pgbouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (71 loc) · 2.44 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
dist: focal
language: c
env:
global:
- PGVERSION=11
jobs:
include:
- env: configure_args=''
- env: configure_args='' PGVERSION=9.6
- env: configure_args='--with-cares'
- env: configure_args='--with-udns'
dist: bionic
- env: configure_args='--disable-evdns'
- env: configure_args='--with-pam'
- env: configure_args='--without-openssl'
- env: configure_args='--with-systemd'
- compiler: clang
- dist: xenial
- dist: bionic
- arch: arm64
- arch: ppc64le
- env: use_valgrind=yes
- env: use_valgrind=yes PGVERSION=9.6
- env: use_efence=yes configure_args='--with-pam'
dist: xenial
- env: use_efence=yes PGVERSION=9.6 configure_args='--with-pam'
dist: xenial
- env: CFLAGS='-fno-sanitize-recover=all -fsanitize=leak -fsanitize=undefined -fsanitize-address-use-after-scope'
before_install: |
set -e
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt-get update
install: |
set -e
pkgs="libc-ares-dev libevent-dev libudns-dev pandoc python"
pkgs="$pkgs postgresql-${PGVERSION}"
case $configure_args in *with-systemd*) pkgs="$pkgs libsystemd-dev";; esac
if [ x"$use_efence" = x"yes" ]; then pkgs="$pkgs electric-fence"; fi
if [ x"$use_valgrind" = x"yes" ]; then pkgs="$pkgs valgrind"; fi
sudo apt-get -y install $pkgs
script: |
set -e
PATH=/usr/lib/postgresql/${PGVERSION}/bin:$PATH
./autogen.sh
./configure --prefix=$HOME/install --enable-cassert --enable-werror --without-cares $configure_args
PACKAGE_VERSION=$(sed -n 's/PACKAGE_VERSION = //p' config.mak)
make
(
if [ x"$use_efence" = x"yes" ]; then
export LD_PRELOAD=/usr/lib/libefence.so
export EF_ALLOW_MALLOC_0=1
fi
if [ x"$use_valgrind" = x"yes" ]; then
export BOUNCER_EXE_PREFIX="valgrind --quiet --leak-check=full --show-reachable=no --track-origins=yes --error-markers=VALGRIND-ERROR-BEGIN,VALGRIND-ERROR-END --log-file=$HOME/valgrind.%p.log"
fi
make check USE_SUDO=1
if [ x"$use_valgrind" = x"yes" ]; then
if grep -q VALGRIND-ERROR $HOME/valgrind.*.log; then
cat $HOME/valgrind.*.log
exit 1
fi
fi
)
make install
make dist
tar -x -f pgbouncer-${PACKAGE_VERSION}.tar.gz
cd pgbouncer-${PACKAGE_VERSION}/
./configure --prefix=$HOME/install2 --enable-werror --without-cares $configure_args
make
make install