forked from pgbouncer/pgbouncer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.cirrus.yml
More file actions
265 lines (258 loc) · 9.63 KB
/
.cirrus.yml
File metadata and controls
265 lines (258 loc) · 9.63 KB
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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
env:
DEBIAN_FRONTEND: noninteractive
LANG: C
PGVERSION: 16
task:
name: Linux (Debian/Ubuntu)
matrix:
- container:
image: ubuntu:22.04
trigger_type: manual
- container:
image: ubuntu:22.04
env:
configure_args: '--with-cares --with-pam --with-ldap'
- container:
image: ubuntu:22.04
env:
configure_args: '--disable-evdns --without-openssl'
- container:
image: ubuntu:22.04
env:
CFLAGS: -fno-sanitize-recover=all -fsanitize=undefined -fsanitize-address-use-after-scope -fno-sanitize=shift
trigger_type: manual
- container:
image: ubuntu:22.04
env:
ENABLE_VALGRIND: yes
CFLAGS: -O0 -g
PGVERSION: 17
- container:
image: ubuntu:22.04
env:
use_scan_build: yes
trigger_type: manual
- arm_container:
image: ubuntu:22.04
trigger_type: manual
- container:
image: ubuntu:24.04
trigger_type: manual
- container:
image: debian:bookworm
env:
PGVERSION: 15
trigger_type: manual
- container:
image: debian:bullseye
env:
PGVERSION: 13
trigger_type: manual
setup_script:
- apt-get update
- apt-get -y --no-install-recommends install gnupg postgresql-common
- /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
- apt-get update
- pkgs="autoconf automake ca-certificates cpio git iptables ldap-utils libc-ares-dev libevent-dev libldap-dev libpam0g-dev libssl-dev libsystemd-dev libtool make pandoc pkg-config postgresql-$PGVERSION python3 python3-pip python3-venv slapd socat sudo"
- case $CC in clang) pkgs="$pkgs clang";; esac
- if [ x"$ENABLE_VALGRIND" = x"yes" ]; then pkgs="$pkgs valgrind"; fi
- if [ x"$use_scan_build" = x"yes" ]; then pkgs="$pkgs clang-tools"; fi
- apt-get -y --no-install-recommends install $pkgs
- python3 -m venv /venv
- /venv/bin/pip install -r requirements.txt
- useradd user
- chown -R user .
- echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
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 -j4"
test_script:
- source /venv/bin/activate && su user -c "PATH=/usr/lib/postgresql/${PGVERSION}/bin:$PATH make -j4 check CONCURRENCY=4"
install_script:
- make -j4 install
dist_script:
- su user -c "make dist"
- PACKAGE_VERSION=$(sed -n 's/PACKAGE_VERSION = //p' config.mak)
- su user -c "tar -x -v -f pgbouncer-${PACKAGE_VERSION}.tar.gz"
- su user -c "cd pgbouncer-${PACKAGE_VERSION}/ && ./configure --prefix=$HOME/install2 --enable-werror --without-cares $configure_args && make -j4"
- cd pgbouncer-${PACKAGE_VERSION}/ && make -j4 install
tarball_artifacts:
path: "pgbouncer-*.tar.gz"
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Linux (Red Hat)
trigger_type: manual
matrix:
- container:
image: rockylinux:9
env:
configure_args: '--with-cares'
- container:
image: rockylinux:8
setup_script:
- dnf -y install 'dnf-command(config-manager)'
- if grep -q -F 'release 9' /etc/redhat-release; then dnf config-manager --set-enabled "plus"; else dnf config-manager --set-enabled "powertools"; fi
- dnf -y install autoconf automake diffutils file iptables libevent-devel libpq-devel libtool make openldap-clients openldap-devel openldap-servers openssl-devel pam-devel pkg-config postgresql-server postgresql-contrib python3 python3-pip socat sudo systemd-devel wget
- case $configure_args in *with-cares*) dnf -y install c-ares-devel; esac
- 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/
- if grep -q -F 'release 9' /etc/redhat-release; then dnf -y install python-unversioned-command; else dnf -y install python39 python39-pip && alternatives --set python /usr/bin/python3.9; fi
- python -m pip install -r requirements.txt
- useradd user
- chown -R user .
- echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
build_script:
- su user -c "./autogen.sh"
- su user -c "./configure --prefix=$HOME/install --enable-cassert --enable-werror --with-ldap --with-pam --with-systemd $configure_args"
- su user -c "make -j4"
test_script:
- su user -c "make -j4 check CONCURRENCY=4"
install_script:
- make -j4 install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Linux (Alpine)
trigger_type: manual
container:
matrix:
- image: alpine:latest
setup_script:
- apk update
- apk add autoconf automake build-base c-ares-dev iptables libevent-dev libtool openldap openldap-clients openldap-dev openssl openssl-dev pkgconf postgresql postgresql-contrib python3 py3-pip socat sudo 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/
- python3 -m venv /venv
- /venv/bin/pip install -r requirements.txt
- adduser --disabled-password user
- chown -R user .
- echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
build_script:
- su user -c "./autogen.sh"
- su user -c "./configure --prefix=$HOME/install --enable-cassert --enable-werror --with-cares --with-ldap"
- su user -c "make -j4"
test_script:
- source /venv/bin/activate && su user -c "make -j4 check CONCURRENCY=4"
install_script:
- make -j4 install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: FreeBSD
freebsd_instance:
image_family: freebsd-14-2
env:
HAVE_IPV6_LOCALHOST: yes
USE_SUDO: true
setup_script:
- pkg install -y autoconf automake gmake hs-pandoc libevent libtool openldap25-client openldap25-server pkgconf postgresql${PGVERSION}-server postgresql${PGVERSION}-contrib python devel/py-pip sudo
- pip install -r requirements.txt
- kldload pf
- echo 'anchor "pgbouncer_test/*"' >> /etc/pf.conf
- echo 'pf_enable="YES"' >> /etc/rc.conf
- service pf start
- pw useradd user
- chown -R user .
- echo 'user ALL=(ALL) NOPASSWD: ALL' >> /usr/local/etc/sudoers
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 --with-ldap"
- su user -c "gmake -j4"
test_script:
- su user -c "gmake -j4 check CONCURRENCY=4"
install_script:
- gmake -j4 install
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: macOS
macos_instance:
image: ghcr.io/cirruslabs/macos-runner:sonoma
env:
HAVE_IPV6_LOCALHOST: yes
USE_SUDO: true
CPPFLAGS: -I/opt/homebrew/opt/openldap/include -I/opt/homebrew/opt/openssl@3/include
LDFLAGS: -L/opt/homebrew/opt/openldap/lib -L/opt/homebrew/opt/openssl@3/lib
PATH: /opt/homebrew/opt/postgresql@${PGVERSION}/bin:$PATH
setup_script:
- brew install autoconf automake libevent libtool openldap openssl pandoc pkg-config postgresql@${PGVERSION}
- python3 -m venv venv
- venv/bin/pip install -r requirements.txt
- echo 'anchor "pgbouncer_test/*"' | sudo tee -a /etc/pf.conf
- sudo pfctl -f /etc/pf.conf
build_script:
- ./autogen.sh
- ./configure --prefix=$HOME/install --enable-werror --with-ldap
- make -j4
test_script:
- source venv/bin/activate && make -j4 check CONCURRENCY=4
install_script:
- make -j4 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 pkg-config ${MINGW_PACKAGE_PREFIX}-python ${MINGW_PACKAGE_PREFIX}-python-pip zip"
- sh -l -c 'pip install -r requirements.txt'
- echo 127.0.0.1 localhost >> c:\Windows\System32\Drivers\etc\hosts
- sh -l -c 'echo "127.0.0.1 localhost" >> /etc/hosts'
- 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 $(pkgconf -libs -static openssl)\" PKG_CONFIG='pkg-config --static'"
- sh -l -c "make -j4"
test_script:
- sh -l -c "make -j4 check CONCURRENCY=3"
- sh -l -c "windres pgbouncer.exe"
install_script:
- sh -l -c "make -j4 install"
dist_script:
- sh -l -c "make -j4 zip"
zip_artifacts:
path: "pgbouncer-*.zip"
always:
configure_artifacts:
path: "config.log"
type: text/plain
task:
name: Formatting checks & linting
container:
image: ubuntu:22.04
setup_script:
- apt-get update
- apt-get install -y --no-install-recommends python3 python3-pip cmake curl gcc g++ git make
- pip install -r dev_requirements.txt
build_script:
- touch config.mak # Fake that configure has run
test_script:
- make format-check
- make lint