Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the build when liblz4 is missing and test it #693

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/nolz4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI Tests (no liblz4)

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up dependencies
run: |
sudo apt update
sudo apt install -y libsqlite3-dev libuv1-dev
sudo apt remove -y liblz4-dev

- name: Build dqlite (liblz4 not present)
run: |
autoreconf -i
./configure --enable-build-raft
make -j$(nproc)
make clean

- name: Build dqlite (liblz4 requested and not present)
run: |
autoreconf -i
! ./configure --enable-build-raft --with-lz4
- name: Install liblz4
run: |
sudo apt install liblz4-dev

- name: Build dqlite (liblz4 present but ignored)
run: |
./configure --enable-build-raft --without-lz4
make -j$(nproc)
! ldd .libs/libdqlite.so | grep lz4
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ AS_IF([test "x$enable_build_raft" = "xyes"],
[AS_IF([test "x$with_lz4" != "xno"],
[PKG_CHECK_MODULES(LZ4, [liblz4 >= 1.7.1], [have_lz4=yes], [have_lz4=no])],
[have_lz4=no])
AS_IF([test "x$with_lz4" != "xno" -a "x$have_lz4" = "xno"],
AS_IF([test "x$with_lz4" = "xyes" -a "x$have_lz4" = "xno"],
[AC_MSG_ERROR([liblz4 required but not found])],
[])],
# Not building raft
Expand Down
Loading