Replace existing use of std::cout and std::cerr with fmt::print[ln]():
this is simpler and more convenient and also faster to compile.
Also configure all CI jobs to clone submodules, as fmt submodule is
required now.
Fix the workflow which was added in master to make it possible to use
it, but which didn't work yet.
Build SOCI under Windows using MSVC and run the tests that we can easily
run in the GitHub Actions environment (to run the other ones we would
need to set up PostgreSQL ODBC drivers and MySQL and SQL Server
databases ourselves).
UBSAN gives nonsensical errors for the ODBC job running under Ubuntu
18.04, e.g. it complains that
src/core/session.cpp:246:16: runtime error: member call on address
0x607000000250 which does not point to an object of type
'session_backend'
1: 0x607000000250: note: object is of type 'soci::odbc_session_backend'
which doesn't make any sense because odbc_session_backend is an object
of type session_backend. But apparently something is broken in this
compiler version, so disable UBSAN for this job for now.
It used to be part of macos-12 image but is not present in the later
ones for whatever reason.
Installing postgresql formula using brew already initializes the
database cluster but does it in a non-default directory, so adjust
PGDATA definition accordingly and remove "pg_ctl init" which is not
needed any longer.
v3 of this action triggers deprecation warnings and will stop working
soon, while v4 doesn't work under Ubuntu 18.04 which we use for ODBC
testing due to https://github.com/actions/checkout/issues/1442Closes#1132.
It's not really clear if it's useful at all, but it's absolutely clear
that it's not worth spending time dealing with the spurious errors in it
that happen almost every time now, so keep it, but don't run it
automatically.
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.
Unfortunately, and despite continued statements to the contrary, Travis
is not usable for open source projects any longer as this involves
constantly nagging Travis support to manually top up the project credit,
which is just infeasible, so we have no choice but to stop using it.
It was nice while it lasted, thanks for all the fish.
"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.