forked from pgbouncer/pgbouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
251 lines (245 loc) · 7.63 KB
/
.cirrus.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
env:
CIRRUS_CLONE_SUBMODULES: true
DEBIAN_FRONTEND: noninteractive
LANG: C
PGVERSION: 14
task:
name: Linux (Debian/Ubuntu)
matrix:
- container:
image: ubuntu:20.04
- container:
image: ubuntu:20.04
env:
configure_args: '--with-cares --with-pam'
- container:
image: ubuntu:20.04
env:
configure_args: '--with-udns --without-openssl'
- container:
image: ubuntu:20.04
env:
configure_args: '--disable-evdns'
- container:
image: ubuntu:20.04
env:
CC: clang
- container:
image: ubuntu:20.04
env:
CFLAGS: -fno-sanitize-recover=all -fsanitize=undefined -fsanitize-address-use-after-scope -fno-sanitize=shift
- container:
image: ubuntu:20.04
env:
use_valgrind: yes
CFLAGS: -O0 -g
- container:
image: ubuntu:20.04
env:
use_valgrind: yes
CFLAGS: -O0 -g
PGVERSION: 9.6
- container:
image: ubuntu:20.04
env:
use_scan_build: yes
- arm_container:
image: ubuntu:20.04
- container:
image: ubuntu:22.04
- container:
image: ubuntu:18.04
env:
PGVERSION: 10
- container:
image: ubuntu:16.04
env:
PGVERSION: 9.6
- container:
image: debian:stable
env:
PGVERSION: 13
- container:
image: debian:oldstable
env:
PGVERSION: 11
setup_script:
- apt-get update
- apt-get -y install curl gnupg lsb-release
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
- echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
- apt-get update
- pkgs="autoconf automake ca-certificates cpio libc-ares-dev libevent-dev libssl-dev libsystemd-dev libtool libudns-dev make pandoc postgresql-$PGVERSION pkg-config python3"
- case $CC in clang) pkgs="$pkgs clang";; esac
- if [ x"$use_valgrind" = x"yes" ]; then pkgs="$pkgs valgrind"; fi
- if [ x"$use_scan_build" = x"yes" ]; then pkgs="$pkgs clang-tools"; fi
- apt-get -y install $pkgs
- useradd user
- chown -R user .
build_script:
- su user -c "./autogen.sh"
- su user -c "${use_scan_build:+scan-build} ./configure --prefix=$HOME/install --enable-cassert --enable-werror --without-cares --with-systemd $configure_args"
- su user -c "${use_scan_build:+scan-build} make"
test_script:
- |
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=/tmp/valgrind.%p.log"
fi
- su user -c "PATH=/usr/lib/postgresql/${PGVERSION}/bin:$PATH make check"
- |
if [ x"$use_valgrind" = x"yes" ]; then
if grep -q VALGRIND-ERROR /tmp/valgrind.*.log; then
cat /tmp/valgrind.*.log
exit 1
fi
fi
install_script:
- make install
dist_script:
- make dist
- PACKAGE_VERSION=$(sed -n 's/PACKAGE_VERSION = //p' config.mak)
- tar -x -v -f pgbouncer-${PACKAGE_VERSION}.tar.gz
- cd pgbouncer-${PACKAGE_VERSION}/
- ./configure --prefix=$HOME/install2 --enable-werror --without-cares $configure_args
- make
- make install
tarball_artifacts:
path: "pgbouncer-*.tar.gz"
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Linux (Red Hat)
container:
matrix:
- image: rockylinux:8
- image: centos:centos7
setup_script:
- yum -y install autoconf automake diffutils file libevent-devel libtool make openssl-devel pkg-config postgresql-server systemd-devel wget
- if cat /etc/centos-release | grep -q ' 7'; then yum -y install python; else yum -y install python3; fi
- wget -O /tmp/pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/2.10.1/pandoc-2.10.1-linux-amd64.tar.gz
- tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/
- useradd user
- chown -R user .
build_script:
- su user -c "./autogen.sh"
- su user -c "./configure --prefix=$HOME/install --enable-cassert --enable-werror --with-systemd"
- su user -c "make"
test_script:
# XXX: postgresql too old on centos7
- if cat /etc/centos-release | grep -q ' 7'; then true; else su user -c "make check"; fi
install_script:
- make install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Linux (Alpine)
container:
matrix:
- image: alpine:latest
setup_script:
- apk update
- apk add autoconf automake bash build-base libevent-dev libtool openssl openssl-dev pkgconf postgresql python3 wget
- wget -O /tmp/pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/2.10.1/pandoc-2.10.1-linux-amd64.tar.gz
- tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/
- adduser --disabled-password user
- chown -R user .
build_script:
- su user -c "./autogen.sh"
- su user -c "./configure --prefix=$HOME/install --enable-cassert --enable-werror"
- su user -c "make"
test_script:
- su user -c "make check"
install_script:
- make install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: FreeBSD
freebsd_instance:
image_family: freebsd-13-0
env:
HAVE_IPV6_LOCALHOST: yes
setup_script:
- pkg install -y autoconf automake bash gmake hs-pandoc libevent libtool pkgconf postgresql12-server python
- pw useradd user
- chown -R user .
env:
CPPFLAGS: -I/usr/local/include
LDFLAGS: -L/usr/local/lib
M4: /usr/local/bin/gm4
build_script:
- su user -c "./autogen.sh"
- su user -c "./configure --prefix=$HOME/install --enable-werror"
- su user -c "gmake"
test_script:
- su user -c "gmake check"
install_script:
- gmake install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: macOS
osx_instance:
matrix:
- image: monterey-base
env:
HAVE_IPV6_LOCALHOST: yes
setup_script:
- brew install autoconf automake bash libevent libtool openssl pandoc pkg-config postgresql
env:
CPPFLAGS: -I/usr/local/opt/openssl/include
LDFLAGS: -L/usr/local/opt/openssl/lib
build_script:
- ./autogen.sh
- ./configure --prefix=$HOME/install --enable-werror
- make
test_script:
- make check
install_script:
- make install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Windows
windows_container:
image: cirrusci/windowsservercore:cmake
env:
PATH: C:/tools/msys64/usr/bin;%PATH%
HOME: .
HAVE_IPV6_LOCALHOST: yes
matrix:
- env:
MSYSTEM: MINGW64
- env:
MSYSTEM: MINGW32
setup_script:
- choco install -y --no-progress msys2
- sh -l -c "pacman --noconfirm -S --needed base-devel ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-libevent ${MINGW_PACKAGE_PREFIX}-openssl ${MINGW_PACKAGE_PREFIX}-postgresql autoconf automake libtool python zip"
- choco install -y --no-progress pandoc
build_script:
- sh -l -c "./autogen.sh"
- sh -l -c "./configure --prefix=$HOME/install --enable-werror PANDOC=/c/programdata/chocolatey/bin/pandoc LDFLAGS=-static LIBS=-liphlpapi PKG_CONFIG='pkg-config --static'"
- sh -l -c "make"
test_script:
- sh -l -c "make check tls_support=no"
- sh -l -c "windres pgbouncer.exe"
install_script:
- sh -l -c "make install"
dist_script:
- sh -l -c "make zip"
zip_artifacts:
path: "pgbouncer-*.zip"
always:
configure_artifacts:
path: "config.log"
type: text/plain