Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5f669c9
Add option for setting zlib/zstd compression algorithms
dveeden May 7, 2023
41057e4
Add GitHub actions
dveeden May 8, 2023
0139aa5
Run the test as well
dveeden May 8, 2023
604c3c9
tests: Fix failing test due to egrep
dveeden May 8, 2023
8e33758
Merge pull request #487 from dveeden/compress_alg
akopytov May 15, 2023
b4aa9f1
Merge pull request #488 from dveeden/ci
akopytov May 15, 2023
db694e7
Merge pull request #489 from dveeden/egrep
akopytov May 15, 2023
39eb421
CI: Update help_drv_mysql.t and status badge
dveeden May 16, 2023
ec457a3
CI: Also build with PostgreSQL support
dveeden May 16, 2023
b72e466
Merge pull request #491 from dveeden/ci_status_help
akopytov Jul 9, 2023
d052b73
Merge pull request #493 from dveeden/ci_pgsql
akopytov Jul 9, 2023
9b5381d
Fix help_drv_pgsql.t
akopytov Jul 9, 2023
2ca9e3f
Merge pull request #502 from akopytov/fix_help_drv_pgsql
akopytov Jul 9, 2023
e17ce0f
Allow building the MySQL driver with MariaDB libraries.
dveeden Jul 14, 2023
fae19ba
CI: Test also with MariaDB
dveeden Jul 14, 2023
0f27db3
Allow mysql-ssl option to differ
dveeden Jul 14, 2023
de18a03
Merge pull request #506 from dveeden/mysql__compression_alg__mariadb
akopytov Jul 28, 2024
f85f63c
build/CI/packaging: modernize autotools files
akopytov Mar 9, 2025
0aff740
Lower the required Autoconf version to 2.70
akopytov Mar 9, 2025
278f8a2
build/CI/packaging: lower the required Autoconf version back to 2.63
akopytov Mar 9, 2025
3ceba0b
build/CI/packaging: automatically set deployment target on MacOS
akopytov Mar 9, 2025
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
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI
on: [push, pull_request]

jobs:
build:
strategy:
matrix:
os: [ ubuntu-22.04, ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
name: Build on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Autogen
run: ./autogen.sh
- name: Configure
run: ./configure --with-mysql --with-pgsql
- name: Build
run: make
- name: MySQL version
run: mysql_config --version
- name: Sysbench version
run: ./src/sysbench --version
- name: Test
run: make test

build_mariadb:
runs-on: ubuntu-22.04
name: Build with MariaDB
steps:
- name: Setup MariaDB Repo
run: |
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64] https://ftp.nluug.nl/db/mariadb/repo/11.0/ubuntu jammy main'
- name: Setup MariaDB Libs
run: sudo apt install libmariadb-dev libmariadb-dev-compat
- name: Checkout
uses: actions/checkout@v3
- name: Autogen
run: ./autogen.sh
- name: Configure
run: ./configure --with-mysql --with-pgsql
- name: Build
run: make
- name: MariaDB version
run: mariadb_config --version
- name: Sysbench version
run: ./src/sysbench --version
- name: Test
run: make test
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Latest Release][release-badge]][release-url]
[![Build Status][travis-badge]][travis-url]
[![Build Status][action-badge]][action-url]
[![Debian Packages][deb-badge]][deb-url]
[![RPM Packages][rpm-badge]][rpm-url]
[![Coverage Status][coveralls-badge]][coveralls-url]
Expand Down Expand Up @@ -298,8 +298,8 @@ For more information on SemVer, please visit [http://semver.org/](http://semver.

[coveralls-badge]: https://coveralls.io/repos/github/akopytov/sysbench/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/akopytov/sysbench?branch=master
[travis-badge]: https://travis-ci.org/akopytov/sysbench.svg?branch=master
[travis-url]: https://travis-ci.org/akopytov/sysbench?branch=master
[action-url]: https://github.com/akopytov/sysbench/actions/workflows/ci.yml
[action-badge]: https://github.com/akopytov/sysbench/actions/workflows/ci.yml/badge.svg
[license-badge]: https://img.shields.io/badge/license-GPLv2-blue.svg
[license-url]: COPYING
[release-badge]: https://img.shields.io/github/release/akopytov/sysbench.svg
Expand Down
30 changes: 16 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.63)
AC_INIT([sysbench],[1.1.0],[https://github.com/akopytov/sysbench/issues],
[sysbench], [https://github.com/akopytov/sysbench])
AC_PREREQ([2.63])
AC_INIT([sysbench],[1.1.0],[https://github.com/akopytov/sysbench/issues],[sysbench],[https://github.com/akopytov/sysbench])
AC_CONFIG_AUX_DIR([config])

# Define m4_ifblank and m4_ifnblank macros from introduced in
Expand Down Expand Up @@ -31,7 +30,7 @@ CXXFLAGS=${SAVE_CXXFLAGS}

AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([src/sysbench.c])
AC_CONFIG_HEADER([config/config.h])
AC_CONFIG_HEADERS([config/config.h])
AC_CONFIG_MACRO_DIR([m4])

m4_pattern_forbid([^PKG_[A-Z_]+$],
Expand All @@ -40,7 +39,6 @@ m4_pattern_forbid([^PKG_[A-Z_]+$],
ACX_USE_SYSTEM_EXTENSIONS

AC_PROG_CC
AC_PROG_CC_C99
AC_PROG_CPP
AM_PROG_CC_C_O

Expand All @@ -58,7 +56,7 @@ AS_CASE([$CFLAGS],

m4_ifdef([AM_PROG_AR], [AM_PROG_AR])

AC_PROG_LIBTOOL
LT_INIT

AC_CHECK_PROG(sb_have_pkg_config, pkg-config, yes, no)
if test x"$sb_have_pkg_config" = xno; then
Expand All @@ -73,10 +71,17 @@ AC_LIB_PREFIX()

CPPFLAGS="-D_GNU_SOURCE ${CPPFLAGS}"

# Mac OS X requires _DARWIN_C_SOURCE for valloc(3) to be visible
case "${host_cpu}-${host_os}" in
*-darwin*) CPPFLAGS="-D_DARWIN_C_SOURCE ${CPPFLAGS}";;
esac
AM_CONDITIONAL([IS_MACOS], [test "$host_os" = "darwin"])

if test "$host_os" = "darwin"; then
# MacOS requires _DARWIN_C_SOURCE for valloc(3) to be visible
CPPFLAGS="-D_DARWIN_C_SOURCE ${CPPFLAGS}"
# LuaJIT also requires MACOSX_DEPLOYMENT_TARGET to be set on MacOS
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
fi
AC_SUBST(MACOSX_DEPLOYMENT_TARGET, $MACOSX_DEPLOYMENT_TARGET)
fi

# Build optimized or debug version ?
# First check for gcc and g++
Expand Down Expand Up @@ -199,9 +204,6 @@ AC_SUBST([USE_PGSQL])
AC_CHECK_AIO
AM_CONDITIONAL(USE_AIO, test x$enable_aio = xyes)

# Checks for header files.
AC_HEADER_STDC

AC_CHECK_HEADERS([ \
errno.h \
fcntl.h \
Expand All @@ -225,7 +227,7 @@ libgen.h \

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_OFF_T
AC_HEADER_TIME

AX_TLS([],
AC_MSG_ERROR([thread-local storage is not suppored by the target platform!])
)
Expand Down
4 changes: 2 additions & 2 deletions m4/ac_check_pgsql.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AC_DEFUN([AC_CHECK_PGSQL],[
if test [ -z "$ac_cv_pgsql_includes" ]
then
AC_ARG_WITH([pgsql-includes],
AC_HELP_STRING([--with-pgsql-includes], [path to PostgreSQL header files]),
AS_HELP_STRING([--with-pgsql-includes], [path to PostgreSQL header files]),
[ac_cv_pgsql_includes=$withval])
fi
if test [ -n "$ac_cv_pgsql_includes" ]
Expand All @@ -24,7 +24,7 @@ fi
if test [ -z "$ac_cv_pgsql_libs" ]
then
AC_ARG_WITH([pgsql-libs],
AC_HELP_STRING([--with-pgsql-libs], [path to PostgreSQL libraries]),
AS_HELP_STRING([--with-pgsql-libs], [path to PostgreSQL libraries]),
[ac_cv_pgsql_libs=$withval])
fi

Expand Down
31 changes: 14 additions & 17 deletions m4/ax_tls.m4
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,28 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.

#serial 14
#serial 15

AC_DEFUN([AX_TLS], [
AC_MSG_CHECKING([for thread local storage (TLS) class])
AC_CACHE_VAL([ac_cv_tls],
[for ax_tls_keyword in thread_local _Thread_local __thread '__declspec(thread)' none; do
AS_CASE([$ax_tls_keyword],
[none], [ac_cv_tls=none ; break],
[AC_TRY_COMPILE(
[#include <stdlib.h>
static void
foo(void) {
static ] $ax_tls_keyword [ int bar;
exit(1);
}],
[],
[ac_cv_tls=$ax_tls_keyword ; break],
ac_cv_tls=none
)])
done
])
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <stdlib.h>],
[static $ax_tls_keyword int bar;]
)],
[ac_cv_tls=$ax_tls_keyword ; break],
[ac_cv_tls=none]
)]
)
done ]
)
AC_MSG_RESULT([$ac_cv_tls])

AS_IF([test "$ac_cv_tls" != "none"],
[AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class define it to that here])
m4_ifnblank([$1],[$1])],
[m4_ifnblank([$2],[$2])])
[AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class, define it to that here])
m4_ifnblank([$1],[$1],[[:]])],
[m4_ifnblank([$2],[$2],[[:]])])
])
Loading