mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-18 03:40:58 +01:00
add error if no db lib found, add better ci build and test
This commit is contained in:
@@ -6,7 +6,7 @@ labels:
|
|||||||
platform: ${platform}
|
platform: ${platform}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
build-n-test:
|
build-berkeley:
|
||||||
when:
|
when:
|
||||||
event: [push]
|
event: [push]
|
||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
@@ -15,3 +15,17 @@ steps:
|
|||||||
- apk add --no-cache bash build-base words-en gdb perl pcre2 pcre2-dev db db-dev pkgconfig meson ninja
|
- apk add --no-cache bash build-base words-en gdb perl pcre2 pcre2-dev db db-dev pkgconfig meson ninja
|
||||||
- meson setup --reconfigure build
|
- meson setup --reconfigure build
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
|
- build/dbtool -d test.db -i -k "test" -v "blah blah blah"
|
||||||
|
- build/dbtool -d test.db -D | grep blah
|
||||||
|
|
||||||
|
build-gdbm:
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
image: alpine:latest
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add --no-cache bash build-base words-en gdb perl pcre2 pcre2-dev gdbm gdbm-dev pkgconfig meson ninja
|
||||||
|
- meson setup --reconfigure build
|
||||||
|
- ninja -C build
|
||||||
|
- build/dbtool -d test.db -i -k "test" -v "blah blah blah"
|
||||||
|
- build/dbtool -d test.db -D | grep blah
|
||||||
|
|||||||
@@ -46,15 +46,19 @@ pcre2 = dependency('libpcre2-8')
|
|||||||
|
|
||||||
|
|
||||||
# manually check for libraries
|
# manually check for libraries
|
||||||
lib_berkeley = cpp.find_library('db_cxx',
|
lib_berkeley = cpp.find_library('db_cxx', required: false,
|
||||||
dirs : ['/usr', '/usr/local'])
|
dirs : ['/usr', '/usr/local'])
|
||||||
inc_berkeley = include_directories('/usr', '/usr/local')
|
inc_berkeley = include_directories('/usr', '/usr/local')
|
||||||
|
|
||||||
lib_gdbm = cpp.find_library('gdbm',
|
lib_gdbm = cpp.find_library('gdbm', required: false,
|
||||||
dirs : ['/usr', '/usr/local'])
|
dirs : ['/usr', '/usr/local'])
|
||||||
inc_gdbm = include_directories('/usr', '/usr/local')
|
inc_gdbm = include_directories('/usr', '/usr/local')
|
||||||
|
|
||||||
|
|
||||||
|
if not lib_gdbm.found() and not lib_berkeley.found()
|
||||||
|
error('neither GDBM nor BerkeleyDB are installed')
|
||||||
|
endif
|
||||||
|
|
||||||
# check commandline options
|
# check commandline options
|
||||||
prefix = get_option('prefix')
|
prefix = get_option('prefix')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user