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

Add CI job for latest SQLite, libuv, liblz4 #630

Merged
merged 3 commits into from
May 22, 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
73 changes: 73 additions & 0 deletions .github/workflows/latest-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI Tests (latest deps)

on:
- push
- pull_request

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Raise aio-max-nr
run: |
sysctl fs.aio-max-nr
sudo sysctl -w fs.aio-max-nr=1000000

- name: Install latest libuv
run: |
version="$(curl -L 'https://dist.libuv.org/dist' | grep -o 'v[0-9]\.[0-9]\{1,2\}\.[0-9]\{1,2\}' | sort -V -r | head -n1)"
echo "Selected libuv $version"
curl -LO "https://dist.libuv.org/dist/$version/libuv-$version.tar.gz"
tar xzf "libuv-$version.tar.gz"
cd "libuv-$version"
sh autogen.sh
./configure
make -j4
sudo make install

- name: Install latest liblz4
run: |
mkdir lz4
cd lz4
git init
git remote add github 'https://github.com/lz4/lz4'
git fetch github 'refs/tags/*:refs/tags/*'
version="$(git tag | sort -V -r | head -n1)"
echo "Selected lz4 $version"
git checkout "$version"
make -j4
sudo make install

- name: ldconfig
run: |
sudo ldconfig

- name: Get latest SQLite
run: |
relative="$(curl -L 'https://sqlite.org/download.html' | grep '^PRODUCT' | grep 'amalgamation' | cut -d',' -f3)"
curl -LO "https://sqlite.org/$relative"
name="$(basename "$relative" .zip)"
echo "Selected $name"
unzip "$name.zip"
cd "$name"
cp sqlite3.{c,h} "$GITHUB_WORKSPACE"

- name: Build dqlite
run: |
autoreconf -i
./configure --enable-debug --enable-sanitize --enable-build-raft --enable-build-sqlite
make -j4 unit-test integration-test \
raft-core-fuzzy-test \
raft-core-integration-test \
raft-core-unit-test \
raft-uv-integration-test \
raft-uv-unit-test
ldd .libs/libdqlite.so

- name: Test
run: |
export LIBDQLITE_TRACE=1
make check || (cat ./test-suite.log && false)
19 changes: 11 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ if DQLITE_NEXT_ENABLED
AM_CFLAGS += -DDQLITE_NEXT
endif

if !BUILD_SQLITE_ENABLED
AM_LDFLAGS += $(SQLITE_LIBS)
endif

if !BUILD_RAFT_ENABLED
AM_CFLAGS += $(RAFT_CFLAGS) -DUSE_SYSTEM_RAFT
AM_LDFLAGS += $(RAFT_LIBS)
Expand Down Expand Up @@ -70,10 +66,6 @@ basic_dqlite_sources = \
src/vfs.c \
src/vfs2.c

if BUILD_SQLITE_ENABLED
basic_dqlite_sources += sqlite3.c
endif

lib_LTLIBRARIES = libdqlite.la
libdqlite_la_CFLAGS = $(AM_CFLAGS) -fvisibility=hidden -DRAFT_API=''
libdqlite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:1:0
Expand Down Expand Up @@ -340,6 +332,17 @@ endif

endif # BUILD_RAFT_ENABLED

if BUILD_SQLITE_ENABLED
noinst_LTLIBRARIES = libsqlite3.la
libsqlite3_la_SOURCES = sqlite3.c
libsqlite3_la_CFLAGS = -g3

unit_test_LDADD += libsqlite3.la
libdqlite_la_LIBADD = libsqlite3.la
else
AM_LDFLAGS += $(SQLITE_LIBS)
endif

TESTS = $(check_PROGRAMS)

if CODE_COVERAGE_ENABLED
Expand Down
Loading