Commit Graph

113 Commits

Author SHA1 Message Date
Vadim Zeitlin f6c8aa8203 Add missing "sudo" calls to mold installation step
Also install wget when running on minimal system without it.
2023-12-11 15:17:04 +01:00
Vadim Zeitlin 9f7722b477 Use mold for GitHub Actions builds 2023-12-07 22:00:08 +01:00
Vadim Zeitlin 249d1a4704 Fix CI install script to work on bare OS install too
Don't assume that sudo and lsb-release are always available, this is not
the case when using a Docker container image, for example.
2023-04-18 18:20:45 +02:00
Vadim Zeitlin 193ef4ddf8 Install PostgreSQL server in ODBC install script
It is needed and is not guaranteed to be already installed when running
inside a container.
2023-04-18 18:19:33 +02:00
Vadim Zeitlin d9b499a992 Don't install recommended packages
Try to speed up the installation process a bit by installing fewer
packages.
2023-04-18 18:19:30 +02:00
Vadim Zeitlin e7b5d1f4cd Ignore leaks from SQLDriverConnect() in Unix ODBC tests
Switching to Debian UnixODBC packages exposed memory leaks in
SQLDriverConnect() that we don't seem to be able to do anything about.
2023-02-23 15:38:02 +01:00
Vadim Zeitlin bb8ca5481d Also install debug symbols for Unix ODBC package 2023-02-23 15:38:02 +01:00
Vadim Zeitlin e82fdcdfeb Work around a problem with incompatible unixodbc-dev package
The package already installed on the system results in build errors when
trying to use it:

In file included from /usr/include/sql.h:19:0,
                 from /usr/include/sqlext.h:43,
                 from /home/runner/work/soci/soci/include/soci/odbc/soci-odbc.h:25,
                 from /home/runner/work/soci/soci/src/backends/odbc/factory.cpp:9:
/usr/include/sqltypes.h:56:10: fatal error: unixodbc.h: No such file or directory
 #include "unixodbc.h"
          ^~~~~~~~~~~~

so remove it before installing the Debian version.

See https://github.com/microsoft/linux-package-repositories/issues/36
2023-02-23 15:38:02 +01:00
Vadim Zeitlin c5adff3925 Add CI build using C++17
This is needed at least to run C++17-only tests.

See #1001.
2022-10-28 00:09:44 +02:00
Vadim Zeitlin 1fd22cf9b1 Remove Microsoft apt repositories before apt-updating
If nothing else, this should speed up the process a little, but it might
also fix spurious errors that we get in CodeQL builds all the time now.
2022-10-27 23:43:13 +02:00
Vadim Zeitlin e99534f372 Add run_apt function for running apt-get with "quiet" options
Set Dpkg::Use-Pty=0 to avoid more useless output and use this function
in all CI scripts instead of specifying the same apt-get options in all
of them.
2022-10-27 23:26:31 +02:00
Vadim Zeitlin 88e6ca2853 Use /bin/sh for common.sh instead of bash
This script must be sourced from all the other ones, including
install.sh which is used to install bash under FreeBSD, so it can't rely
on bash being already available.
2022-10-27 23:26:31 +02:00
Vadim Zeitlin 0fb07e8aca Use Firebird 3.0 under Ubuntu Jammy too 2022-10-27 23:25:50 +02:00
Vadim Zeitlin fc3ec8089d Give the name of the unknown Ubuntu release in the error message
No real changes, just make things a bit more clear.
2022-10-27 23:25:50 +02:00
Vadim Zeitlin fc365a9cc8 Set up MySQL to allow CREATE FUNCTION in the CI builds
This is necessary with MySQL 8.
2022-10-27 23:25:50 +02:00
Vadim Zeitlin 9ecda7e5af Remove SOCI_CI_PACKAGES and always install CMake under Linux
It doesn't make much sense to configure this outside of the installation
script when we can already just install it from the script itself.

No real changes.
2022-10-27 18:27:01 +02:00
Vadim Zeitlin c1a4b7606f Require C++14 in CMake makefiles
Remove SOCI_CXX11 option which doesn't make sense any longer.
2022-09-18 17:28:57 +02:00
Vadim Zeitlin 98b55bf86c Merge branch 'dont-use-dynamic-cast'
Don't use dynamic cast to avoid ELF visibility problems with libc++.

See #975.
2022-09-17 22:46:19 +02:00
Vadim Zeitlin 0914905949 Fail if there are no tests in the CI builds
This can happen if a backend is unexpectedly not detected and we want to
fail the CI build in this case instead of silently ignoring the problem.
2022-09-17 22:02:09 +02:00
Vadim Zeitlin 2748194f76 Initialize PostgreSQL database under Mac
Otherwise the CI build fails to start the database.
2022-09-14 17:08:27 +02:00
Vadim Zeitlin fdd704b6c1 Revert "Turn off visibility support for FreeBSD CI builds"
This reverts commit 23e57e3f18 which is
not needed any longer now that the problem with using ELF visibility
with libc++ was fixed.
2022-06-22 16:10:03 +02:00
Vadim Zeitlin 23e57e3f18 Turn off visibility support for FreeBSD CI builds
Using visibility with clang (which is the default FreeBSD compiler)
doesn't work currently, see #913.
2022-06-22 12:29:13 +02:00
Vadim Zeitlin f9c3d7c07c Move FreeBSD-specific installation commands to install.sh
Try to keep as little logic in the Cirrus CI-specific file as possible,
even if it's just a single command.
2022-06-22 01:44:06 +02:00
Vadim Zeitlin 0cc89c7c6e Only run Linux-specific commands under Linux in install.sh
No real changes, just make sure we don't run apt-get under non-Linux
systems.

This commit is best viewed ignoring whitespace-only changes.
2022-06-22 01:43:53 +02:00
Vadim Zeitlin f721fa88e0 Detect number of available CPUs under FreeBSD too
This is done using the same command as under Darwin there.
2022-06-22 00:58:41 +02:00
Vadim Zeitlin 69d25bb316 Explicitly turn off Boost support if WITH_BOOST is set to OFF
Pass the option to CMake too, instead of just skipping Boost
installation in this case because this didn't prevent any Boost
libraries already available on the system from being used.
2022-06-21 23:04:50 +02:00
Vadim Zeitlin 282c834159 Use common CMake options in all builds
This was always the intention, but it wasn't actually done, resulting in
not enabling -Werror and, also, building static libraries which is more
or less useless.
2022-06-21 23:04:50 +02:00
Vadim Zeitlin 186128d601 Don't hardcode bash path to improve portability
Under FreeBSD, for example, bash is installed only in /usr/local/bin and
/bin/bash is not available, so use "/usr/bin/env bash" to find it any
location.

As there doesn't seem to be any portable way to pass "-e" option to bash
when using env ("env -S" doesn't work with older GNU coreutils used in
GitHub CI Linux builds), set this option in common.sh once now instead
of doing it on the shebang line of all the scripts.

It would be even better to rewrite the scripts to avoid requiring bash,
but this would require more effort.
2022-06-21 20:09:44 +02:00
Vadim Zeitlin b8560cca41 Fix typo in a comment in build.bat script
No real changes.
2022-02-16 00:26:15 +01:00
Lukas Zanner 17e8e40d37 Add example build to CI 2022-01-13 21:55:24 +01:00
Ilya Sinitsyn 6fc0cfac6c Suppress FB memory leaks 2021-10-11 21:58:17 +07:00
Ilya Sinitsyn 8a23e534db Enable XXX-dbgsym repositories 2021-10-11 21:42:04 +07:00
Ilya Sinitsyn c32aae32e5 Setup Oracle library path 2021-10-11 21:42:00 +07:00
Ilya Sinitsyn 8c6701f168 Fix Firebird installation script for Ubuntu Bionic 2021-10-11 21:41:55 +07:00
Ilya Sinitsyn e873cb507e Fix the postgresql symbols package name for Ubuntu 18.04 2021-10-11 21:41:51 +07:00
Ilya Sinitsyn a896ea9e89 Don't use ubuntu release name in postgresql packacges names 2021-10-11 21:41:46 +07:00
Vadim Zeitlin ea2912b0e1 Merge branch 'minor-ci-fixes'
Some minor improvements to the CI scripts, no real changes.
2021-07-10 11:51:50 +02:00
Vadim Zeitlin b41c0bad46 Add simple CodeQL analysis workflow
Try using CodeQL with SOCI.

As a side effect, also add "all" pseudo-backend for building everything.
2021-07-10 11:51:17 +02:00
Vadim Zeitlin d1d6f5b632 De-TAB-ify CI build script
Get rid of a stray hard TAB, no real changes.
2021-07-10 11:49:07 +02:00
Vadim Zeitlin 6776adda63 Add missing "-e" option to CI build script
This script must also fail on error.
2021-07-10 11:49:07 +02:00
Vadim Zeitlin 4c8a7e752b Use platform-appropriate way of getting CPUs number
This is simpler than parsing /sys/devices/system/cpu/online ourselves
and also works under macOS.

Reduce the number of jobs, 1.5*CPU number is too much, so use more
conservative +1 instead.

Also rename TCI_NUMTHREADS (which was another reference to Travis CI) to
just num_cpus.
2021-07-10 11:49:07 +02:00
Vadim Zeitlin 7e52b708ca Don't hardcode 3.4 Python version in the CI build script
Use python3-venv package which should work on all Ubuntu versions,
including Xenial where this script currently runs, and which doesn't
have python3.4-venv.
2021-04-07 21:30:15 +02:00
Vadim Zeitlin 721bb1aa9d Remove trailing whitespace from all files
No real changes.
2021-04-07 19:32:41 +02:00
Vadim Zeitlin 4b3effc19f Try updating Firebird password file again if we failed once
This might help with sporadic failures in Travis CI Firebird build,
which sometimes fails with weird errors like this:

	Unable to complete network request to host "localhost".
	Failed to establish a connection.
	unable to open database
	Error setting new SYSDBA password

Note that dpkg-reconfigure does not return an error in this case, so we
need to check the password file itself to see if it was updated.
2021-04-07 03:57:02 +02:00
Vadim Zeitlin f481d472d3 Replace using PostgreSQL docker container with native server
"services" can't be used with macOS runners and there is no way to limit
them to Linux runners only (i.e. "if:" is not supported here), so we'd
have to use 2 different jobs and duplicate all the other steps if we
wanted to continue using them.

Instead, just install PostgreSQL manually under Linux. This also means
that it isn't done for the builds that don't need it uselessly any more.
2021-03-19 19:17:21 +01:00
Vadim Zeitlin 01b2ebdce3 Launch PostgreSQL database ourselves under macOS
It is installed there but not started by default, so just launch it
ourselves.

Note that we must not use PGHOST etc variables under Mac, as the server
seems to be configured to only listen on the local socket by default, so
don't define them globally and do it only for Linux manually instead.
2021-03-19 19:16:39 +01:00
Vadim Zeitlin 307addcd0b Use C++11 by default for empty backend build
Don't require CMAKE_CXX_STANDARD to be defined, just use a reasonable
default if it isn't.
2021-03-19 14:21:57 +01:00
Vadim Zeitlin 48c0cd4e9c Rename before_install_*.sh to just install_*.sh
It doesn't make sense to call these scripts "before install" because
they do actually install things themselves.

In fact the whole separation into "install" and "before build" is
probably not very useful, but keep it as long as we keep using Travis CI
at all, as it maps better to its config file keys.

No real changes.
2021-03-19 03:02:41 +01:00
Vadim Zeitlin cbe69e5e13 Use teletype debconf frontend for Firebird setup
"readline" frontend doesn't work without a controlling TTY as can be
seen by setting DEBCONF_DEBUG=user before running dpkg-reconfigure, so
use "teletype" instead.

Also note that DEBIAN_FRONTEND environment variable unexpectedly seems
to override the value explicitly passed via dpkg-reconfigure -f option,
so we need to reset it (and then we don't need the -f option at all).
2021-03-19 02:49:54 +01:00
Vadim Zeitlin 6714c8ff44 Update Firebird install script to work with later Ubuntu version
Handle Xenial which is similar to Trusty and also Focal, where we need
to install Firebird 3.0 server and tweak expect command to work with it.

Note that we still use Xenial for GitHub Actions Firebird CI build as
using Focal version results in memory leaks inside Firebird libraries
and there doesn't seem to be a debug symbol package for Firebird 3.0
that would be required to write a suppression file for them.
2021-03-19 02:49:54 +01:00