Skip to content

Commit 9362883

Browse files
Remove libpcre3-dev dependency from build and CI
1 parent 39266ec commit 9362883

File tree

7 files changed

+57
-14
lines changed

7 files changed

+57
-14
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: CI
22

3+
# CI testing includes:
4+
# - Debian versions: 11 (bullseye), 12 (bookworm), 13 (trixie), sid (unstable)
5+
# - Various smoke test images (configurable via repository variables)
6+
# - TLS and no-TLS builds
7+
# - Code coverage and static analysis
8+
39
on: [push, pull_request]
410

511
jobs:
@@ -30,20 +36,58 @@ jobs:
3036
run: |
3137
apt-get -qq update -y
3238
apt-get install -y \
33-
build-essential autoconf automake libpcre3-dev libevent-dev \
39+
build-essential autoconf automake libevent-dev \
3440
pkg-config zlib1g-dev libssl-dev libboost-all-dev cmake flex
3541
3642
- name: Build
3743
run: autoreconf -ivf && ./configure && make -j
3844

45+
test-debian-versions:
46+
runs-on: ubuntu-latest
47+
continue-on-error: true
48+
env:
49+
DEBIAN_FRONTEND: noninteractive
50+
strategy:
51+
matrix:
52+
debian_version:
53+
- "debian:bullseye" # Debian 11 (oldstable)
54+
- "debian:bookworm" # Debian 12 (stable)
55+
- "debian:trixie" # Debian 13 (testing)
56+
- "debian:sid" # Debian unstable
57+
container: ${{ matrix.debian_version }}
58+
name: Test ${{ matrix.debian_version }}
59+
steps:
60+
- name: Install git and basic tools
61+
run: |
62+
apt-get update -qq
63+
apt-get install -y git ca-certificates
64+
65+
- name: Checkout code
66+
uses: actions/checkout@v4
67+
68+
- name: Install build dependencies
69+
run: |
70+
apt-get update -qq
71+
apt-get install -y \
72+
build-essential \
73+
autoconf \
74+
automake \
75+
pkg-config \
76+
libevent-dev \
77+
zlib1g-dev \
78+
libssl-dev
79+
80+
- name: Build
81+
run: autoreconf -ivf && ./configure && make -j
82+
3983
build-notls:
4084
runs-on: ubuntu-latest
4185
steps:
4286
- uses: actions/checkout@v4
4387
- name: Install dependencies
4488
run: |
4589
sudo apt-get -qq update
46-
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev
90+
sudo apt-get install lcov autoconf automake pkg-config libevent-dev
4791
4892
- name: Build
4993
run: autoreconf -ivf && ./configure --disable-tls && make -j
@@ -55,7 +99,7 @@ jobs:
5599
- name: Install dependencies
56100
run: |
57101
sudo apt-get -qq update
58-
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev
102+
sudo apt-get install lcov autoconf automake pkg-config libevent-dev
59103
60104
- name: Build
61105
run: autoreconf -ivf && ./configure --disable-tls && make -j
@@ -70,7 +114,7 @@ jobs:
70114
- name: Install dependencies
71115
run: |
72116
sudo apt-get -qq update
73-
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libpcre3-dev libssl-dev
117+
sudo apt-get install lcov autoconf automake pkg-config libevent-dev libssl-dev
74118
75119
- name: Build
76120
# for coverage reports we need to use Ubuntu 22.04 or lower

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
run: |
6363
sudo apt-get update && \
6464
sudo apt-get install \
65-
build-essential autoconf automake libpcre3-dev libevent-dev \
65+
build-essential autoconf automake libevent-dev \
6666
pkg-config zlib1g-dev libssl-dev libboost-all-dev cmake flex \
6767
debhelper dput
6868
- name: Create changelog

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ RUN apt-get update
33
RUN \
44
DEBIAN_FRONTEND=noninteractive \
55
apt-get install -y \
6-
build-essential autoconf automake libpcre3-dev libevent-dev \
6+
build-essential autoconf automake libevent-dev \
77
pkg-config zlib1g-dev libssl-dev libboost-all-dev cmake flex
88
COPY . /memtier_benchmark
99
WORKDIR /memtier_benchmark

Dockerfile.alpine

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM alpine:latest as builder
22
RUN \
33
apk add \
44
make g++ autoconf automake libtool pkgconfig \
5-
pcre-dev libevent-dev zlib-dev openssl-dev
5+
libevent-dev zlib-dev openssl-dev
66
COPY . /src
77
WORKDIR /src
88
RUN autoreconf -ivf && ./configure && make && make install
@@ -11,6 +11,6 @@ FROM alpine:latest
1111
LABEL Description="memtier_benchmark"
1212
COPY --from=builder /usr/local/bin/memtier_benchmark /usr/local/bin/memtier_benchmark
1313
RUN \
14-
apk add libstdc++ pcre libevent zlib openssl
14+
apk add libstdc++ libevent zlib openssl
1515

1616
ENTRYPOINT ["memtier_benchmark"]

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ brew install memtier_benchmark
6060
The following libraries are required for building:
6161

6262
* libevent 2.0.10 or newer.
63-
* libpcre 8.x.
6463
* OpenSSL (unless TLS support is disabled by `./configure --disable-tls`).
6564

6665
The following tools are required
@@ -75,15 +74,15 @@ The following tools are required
7574
Use the following to install prerequisites:
7675
```
7776
$ sudo yum install autoconf automake make gcc-c++ \
78-
pcre-devel zlib-devel libmemcached-devel libevent-devel openssl-devel
77+
zlib-devel libmemcached-devel libevent-devel openssl-devel
7978
```
8079

8180
#### Ubuntu/Debian
8281

8382
Use the following to install prerequisites:
8483

8584
```
86-
$ sudo apt-get install build-essential autoconf automake libpcre3-dev \
85+
$ sudo apt-get install build-essential autoconf automake \
8786
libevent-dev pkg-config zlib1g-dev libssl-dev
8887
```
8988

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ AC_HEADER_DIRENT
3838
AC_CHECK_HEADERS([stdlib.h string.h sys/time.h getopt.h limits.h malloc.h stdlib.h unistd.h utime.h assert.h sys/socket.h sys/types.h])
3939
AC_CHECK_HEADERS([fcntl.h netinet/tcp.h])
4040
AC_CHECK_HEADERS([pthread.h])
41-
AC_CHECK_HEADERS([pcre.h zlib.h])
41+
AC_CHECK_HEADERS([zlib.h])
4242
AC_CHECK_HEADERS([event2/event.h])
4343

4444
# Checks for typedefs, structures, and compiler characteristics.
@@ -72,7 +72,7 @@ AS_IF([test "x$enable_tls" != "xno"], [
7272
# clock_gettime requires -lrt on old glibc only.
7373
AC_SEARCH_LIBS([clock_gettime], [rt], , AC_MSG_ERROR([rt is required libevent.]))
7474

75-
AC_CHECK_LIB([pcre], [pcre_compile], , AC_MSG_ERROR([pcre is required; try installing libpcre3-dev.]))
75+
7676
AC_CHECK_LIB([z], [deflateInit_], , AC_MSG_ERROR([zlib is required; try installing zlib1g-dev.]))
7777
AC_CHECK_LIB([pthread], [pthread_create], , AC_MSG_ERROR([pthread is required.]))
7878
AC_CHECK_LIB([socket], [gai_strerror])

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: memtier-benchmark
22
Section: admin
33
Priority: optional
44
Maintainer: Redis Ltd. <[email protected]>
5-
Build-Depends: debhelper-compat (= 10), dh-autoreconf, bash-completion, pkg-config, libpcre3-dev, libevent-dev, libssl-dev, zlib1g-dev
5+
Build-Depends: debhelper-compat (= 10), dh-autoreconf, bash-completion, pkg-config, libevent-dev, libssl-dev, zlib1g-dev
66
Standards-Version: 4.4.1
77
Homepage: https://github.com/RedisLabs/memtier_benchmark
88

0 commit comments

Comments
 (0)